Are you writing programs that need to reach out to the Web? Indeed, you’ll be … these programs when run behind a proxy will fail to run. One will use the Java VM arguments or modify the code to ensure proper working with web proxies.
The same thing can be easily done when you want to host your code in web containers like Apache Tomcat … for instance adding your proxy parameters to $CATALINA_HOME/conf/catalina.properties will resolve issue accessing the web behind a proxy.
http.proxyHost=yourProxyURL http.proxyPort=yourProxyPort http.proxyUser=yourUserName http.proxyPassword=yourPassword
Add the similar entries if you need to access secure http.
https.proxyHost=yourProxyURL https.proxyPort=yourProxyPort https.proxyUser=yourUserName https.proxyPassword=yourPassword
NOTE: proxyUser and proxyPassword are not required in the properties file if proxy is unauthenticated.