Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-15-2008, 09:03 AM
Member
 
Join Date: Oct 2008
Posts: 13
Rep Power: 0
linux0kernel is on a distinguished road
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 ~~
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 10-15-2008, 11:59 PM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 571
Rep Power: 2
fishtoprecords is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-16-2008, 11:48 AM
Member
 
Join Date: Oct 2008
Posts: 13
Rep Power: 0
linux0kernel is on a distinguished road
Default
Yes, the TCP/IP host name, but how can I get all the host from the LANs
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 10-16-2008, 02:43 PM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 571
Rep Power: 2
fishtoprecords is on a distinguished road
Default
Again, I don't understand what you are asking.
Did you look at the javadocs for getHostByName() ?
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking Up the Address of a Host Java Tip java.net 0 04-07-2008 09:11 PM
Getting the host of the applet Java Tip Java Tips 0 03-10-2008 03:56 PM
Getting host name/address Java Tip Java Tips 0 11-19-2007 05:34 PM
IP to HostName Java Tip Java Tips 0 11-11-2007 09:07 PM
org.apache.commons.mail.EmailException: Cannot find valid hostname Ed Advanced Java 2 07-02-2007 09:03 PM


All times are GMT +2. The time now is 09:27 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org