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
posted 12 years ago
i am not absolutly sure about that. But the java classes simply use the operating systems host resolving method. (hosts file, DNS etc.). so it will always give you the same ip like e.g. # ping your.host If you want to have a different ip to be retrieved just change the names config.