Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sockets: no route to host

807597Oct 3 2005 — edited May 27 2007
Hi,

I'm trying to establish a socket connection, but I fail with a NoRouteToHostException. I guess I have to configure Java somehow for network access, but I don't know how. I'm operating an Ubuntu 5.04 Linux.

This is my code so far:
System.setProperty("proxySet", "true");
System.setProperty("proxyHost", "10.149.32.2");
System.setProperty("proxyPort", "8080");

try {
	Socket clientSocket = new Socket("209.249.116.141", 80);
} catch (UnknownHostException e1) {
	// TODO Auto-generated catch block
	e1.printStackTrace();
} catch (IOException e1) {
	// TODO Auto-generated catch block
	e1.printStackTrace();
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2007
Added on Oct 3 2005
9 comments
917 views