Results 1 to 4 of 4
  1. #1
    linux0kernel is offline Member
    Join Date
    Oct 2008
    Posts
    19
    Rep Power
    0

    Cool Get the IP address&hostname of the host from the LANs

    All:
    How can I get the ip&hostname of the host from the LANs?
    Of course, the host must be actively!
    Thank you ~~

  2. #2
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    6

    Default

    I don't understand your question. Do you mean TCP/IP hostname? or some Windows naming system?

    In general, TCP/IP host name <==> IP mapping is handled by DNS
    There is a getHostByName() function in the main Java libraries.
    These names are generally static and work whether or not the other computer is up, accepting connections, etc.

  3. #3
    linux0kernel is offline Member
    Join Date
    Oct 2008
    Posts
    19
    Rep Power
    0

    Default

    Yes, the TCP/IP host name, but how can I get all the host from the LANs

  4. #4
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    6

    Default

    Again, I don't understand what you are asking.
    Did you look at the javadocs for getHostByName() ?

Similar Threads

  1. Replies: 3
    Last Post: 07-25-2011, 03:19 PM
  2. Looking Up the Address of a Host
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 08:11 PM
  3. Getting the host of the applet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-10-2008, 02:56 PM
  4. Getting host name/address
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-19-2007, 04:34 PM
  5. IP to HostName
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-11-2007, 08: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
  •