Configure HTTP/HTTPS Proxy Settings Java

You may also like...

Subscribe
Notify of
guest
3 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Archimedes Trajano
Archimedes Trajano
April 15, 2017 20:21

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

Marc
Marc
September 15, 2017 09:41

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
Greg Bowering
November 16, 2017 00:00

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

3
0
Would love your thoughts, please comment.x
()
x