This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: InetAddress's getHostName() Fails to work.
It's not a secret anymore!