Results 1 to 5 of 5
  1. #1
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

    Default Network Host Name

    How can I find my network host name e.g QAZI_PC.cms.net.pk ? I've searched Google but couldn't find, I used this
    Java Code:
    Inet4Address.getLocalHost().getHostName();
    .

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default Re: Network Host Name

    And what did that return?

  3. #3
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

    Default Re: Network Host Name

    Qazi-pc

  4. #4
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,422
    Rep Power
    5

    Default Re: Network Host Name

    You don't want a host name, you want a FQDN (Fully qualified domain name). So check out the class hierarchy. It's there.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  5. #5
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

Similar Threads

  1. Replies: 7
    Last Post: 05-02-2010, 10:35 PM
  2. How to create file into another host from a host
    By varadha in forum Networking
    Replies: 3
    Last Post: 02-10-2010, 09:03 PM
  3. copy file from local host to remote host
    By isotoper in forum New To Java
    Replies: 4
    Last Post: 12-24-2009, 04:41 PM
  4. Replies: 0
    Last Post: 04-07-2009, 10:35 PM
  5. Replies: 0
    Last Post: 10-31-2008, 07:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •