Finding the computer name


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Finding the computer name

Hybrid View

  1. #1
    Joseph Berdat Guest

    Finding the computer name

    How can I find the name of my computer by program?
    Does it exists any method?



  2. #2
    Satish Pamidimarthi Guest

    Re: Finding the computer name


    hi joseph,
    use java.net.URL class to find it...!


    "Joseph Berdat" <jberdat@eim.ch> wrote:
    >How can I find the name of my computer by program?
    >Does it exists any method?
    >
    >



  3. #3
    Nikhil Guest

    Re: Finding the computer name


    please try the following...

    InetAddress.getLocalHost().getHostAddress()

    cheers,
    Nikhil

    "Satish Pamidimarthi" <java@hamarashehar.com> wrote:
    >
    >hi joseph,
    > use java.net.URL class to find it...!
    >
    >
    >"Joseph Berdat" <jberdat@eim.ch> wrote:
    >>How can I find the name of my computer by program?
    >>Does it exists any method?
    >>
    >>

    >



  4. #4
    Nikhil Guest

    Re: Finding the computer name


    My last answer will give you the IP Address, if u need the name then use InetAddress.getLocalHost().getHostName()

    Sorry for that,
    Nikhil


    "Nikhil" <mamo_nil@hotmail.com> wrote:
    >
    >please try the following...
    >
    >InetAddress.getLocalHost().getHostAddress()
    >
    >cheers,
    >Nikhil
    >
    >"Satish Pamidimarthi" <java@hamarashehar.com> wrote:
    >>
    >>hi joseph,
    >> use java.net.URL class to find it...!
    >>
    >>
    >>"Joseph Berdat" <jberdat@eim.ch> wrote:
    >>>How can I find the name of my computer by program?
    >>>Does it exists any method?
    >>>
    >>>

    >>

    >



  5. #5
    Satish Pamidimarthi Guest

    Re: Finding the computer name


    hi nikhil,
    oops I forgot the class name.. yup it was InetAddress...!
    bye,
    Satish Pamdimarthi
    "Nikhil" <mamo_nil@hotmail.com> wrote:
    >
    >please try the following...
    >
    >InetAddress.getLocalHost().getHostAddress()
    >
    >cheers,
    >Nikhil
    >
    >"Satish Pamidimarthi" <java@hamarashehar.com> wrote:
    >>
    >>hi joseph,
    >> use java.net.URL class to find it...!
    >>
    >>
    >>"Joseph Berdat" <jberdat@eim.ch> wrote:
    >>>How can I find the name of my computer by program?
    >>>Does it exists any method?
    >>>
    >>>

    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center