How I can get IP address through proxy
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ben_Joe
Posted On:   Wednesday, March 4, 2009 01:44 PM

			
My machine is behind a proxy.
I want to get the website IP address, like the IP address of www.google.com.
When I use

InetAddress.getByName("www.google.com");

I get java.net.UnknownHostException: www.google.com exception. Even if I set the http proxy, I still get this exceptino.

However, I can get the content of www.google.com once I set the proxy.

Does InetAddress need different proxy?

Any other way I can get a website IP address?

Re: How I can get IP address through proxy

Posted By:   shiladitya_sircar  
Posted On:   Saturday, April 18, 2009 10:02 PM


www.google.com is not the domain that you want to resolve. Its google.com. www is a directive for world wide web.


try
InetAddress.getByName("google.com");

About | Sitemap | Contact