Discussion Locked

InetAddress

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to retrieve the IP Address of any host using InetAddress.getAllByName() but the program is giving an UnknowHostException. We are using a proxy Server, is it because of that? I was successful with the same thing when not using a proxy on a different computer

5 replies

by jamshedd

hi buddy
well yes using a proxy server will give you and unknown host exeption.
I encountered the sam problem while trying to do socket programming.But InetAddress solved it
Goto javaworld.com over there check out the tips section there is a tip to configure yourprogram to run behind a proxy

by okujava

try setting a system property:

System.setProperty("proxy", "server:port");

it should work

s.okujava

This discussion is closed to new replies.