File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes InetAddress's getHostName() Fails to work. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "InetAddress Watch "InetAddress New topic

InetAddress's getHostName() Fails to work.

Parth Bhatt
Ranch Hand

Joined: Oct 19, 2005
Posts: 58
Hi Ranchers,

I have a problem with IP Address resolution in my lan. The following is the code that i used :

The above code fails to resolver the IP Address. I am using RedHat Linux 9. If i try

i get the Hostname, as expected. Can anyone help me as to why fails to IAddr.getHostName() return the hostame.

If your new Big Idea doesn't scare the hell out of you, <br />it's probably not a "new Big Idea".
I agree. Here's the link:
subject: InetAddress's getHostName() Fails to work.
It's not a secret anymore!