Configure HTTP/HTTPS Proxy Settings Java

You may also like...

Leave a Reply

3 Comments on "Configure HTTP/HTTPS Proxy Settings Java"

avatar
  Subscribe  
newest oldest
Notify of
Archimedes Trajano
Guest
Archimedes Trajano

The problem with this approach is it is not thread safe as you’re changing system properties.

Marc
Guest
Marc

System.setProperty(“java.net.useSystemProxies”, “true”); just doesn’t work as I would expect. It does not use the windows system proxy (from internet settings).
It must be said that we use a .pac and not a manually set proxy.
Guess Java just can’t.

Greg Bowering
Guest
Greg Bowering

I think the property values for http[s].proxyHost are incorrect, you should not include the scheme prefix, e.g.:
-Dhttp.proxyHost=proxy.memorynotfound.com
-Dhttps.proxyHost=proxy.memorynotfound.com