This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes InetAddress Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "InetAddress" Watch "InetAddress" New topic
Author

InetAddress

Shaili Suri
Greenhorn

Joined: Dec 12, 2003
Posts: 2
Hi,
I need help in resolving IP address of a supplied server name. Currently, the application is using InetAddress.getHostAddress() to extract IP address from provided server name.
The problem here is this returns the private IP address of the server name. If I need the public IP address, then what should I use?
Thanks,
Shaili
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Are you working on a clustered system? If so, you need the name of the service that uses the logical IP you're trying to retrieve.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: InetAddress