Tuesday, January 30, 2007

java http proxy support

Heres a good post on getting java to use the host machines proxy settings

http://weblogs.java.net/blog/kohsuke/archive/2005/08/we_deserve_a_be.html

Upshot is to include the following in you java prog before making http requests

try {
System.setProperty("java.net.useSystemProxies","true");
} catch (SecurityException e) {
; // failing to set this property isn't fatal
}
Sweet!