This code is a method to set proxy:
private static void setProxy() {Properties systemSettings = System.getProperties();}
systemSettings.put("proxySet", "true");
systemSettings.put("http.proxyHost", "server_host");
systemSettings.put("http.proxyPort", "server_port");
And with the java command, you can use this to pass the proxy
$ java -DproxyHost="server_host" -DproxyPort="server_port" pkg.JavaClass
Have a fun
Hi,
ReplyDeleteWe have just added your latest post "Setting java proxy” to our Directory of Credit Cards. You can check the inclusion of the post here . We are delighted to invite you to submit all your future posts to the directory for getting a huge base of visitors to your website and gaining a valuable backlink to your site.
Warm Regards
Credit car-d Team
http://www.creditca-rd.info