Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reverse host name resolution in JDK1.1

Status
Not open for further replies.

fanningpj

Programmer
Dec 12, 2001
11
IE
I'm stuck with using JDK 1.1.7 and I want to get the fully qualified DNS name of the machine my JVM is running on. If I use the following code:
java.net.InetAdress ia = java.net.InetAdress.getLocalHost();
String addr = ia.getHostName();
The addr is not qualified. Does any know of a way of doing reverse host name resolution based on the IP address?

Thanks in advance,
PJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top