If I hava a Java program, and I do something like the
following:
Properties systemSettings = System.getProperties();
systemSettings.put("http.proxyHost", "127.0.0.1");
systemSettings.put("http.proxyPort", "8118");
System.setProperties(systemSettings);
I'm not sure if you're actually coding the program or not. If you do,
then you should probably have a look at the ProxySelector class:
http://java.sun.com/javase/6/docs/api/java/net/ProxySelector.html
You can change the default proxy with setDefault() and handle problems
with the proxy using connectFailed().
Hope this helps,
Paolo