Dec 08

Set the following system properties

  • http.proxyHost
  • http.proxyPort

java -Dhttp.proxyHost=proxy.objects.com.au -Dhttp.proxyPort=8080 au.com.objects.MyApplication

To do the same programatically use the System classess setProperty() method

   System.setProperty("http.proxyHost", proxyHostname);
   System.setProperty("http.proxyPort", proxyPort);

written by objects \\ tags: , ,

One Ping to “How to tell a Java application to use a proxy server?”

  1. How to get HttpClient to use a proxy server? | web development helpdesk Says:

    […] does not use the standard Java system properties for specifying proxy […]


Leave a Reply

You must be logged in to post a comment.