How to force any Java program to use HTTP proxy

How to force any Java program to use HTTP proxy

Note: This article will be emailed to your friend.

You can either specify it on command line or within program code by setting three system properties as below:

proxyHost=proxy_host_name
proxyPort=proxy_port
proxySet=true

For example if a proxy is running on localhost at port 8080 then we can use:
java -DproxyHost=localhost -DproxyPort=8080 -DproxySet=true YourProgram
The same properties can be set within your Java program by System.getProperties().put(key, value);
That’s it folks!

Read the rest of this article (69 words)

Please fill in the following fields

* - Required

Your Name: *

Your E-Mail: *

Your Remarks:

Friend's Name: *

Friend's E-Mail: *

Protected by Comment Guard Pro