posted 19 years ago
If you are going thru a SOCKS proxy then you can use the following code:
Properties props = System.getProperties();
props.put("socksProxyHost", proxyHostname);
props.put("socksProxyPort", Integer.toString(proxyPort));
System.setProperties(props);
where proxyHostname is your proxy ip address or hostname and proxyPort is your SOCKS proxyPort (default is typically 1080)