Reputation: 19
I'm writing a tool to check preconditions for an application. One prerequisite are specific JRE proxy settings. But I couldn't figure out, where JRE stores those informations on a windows machine (this should work on XP, Vista 32/64Bit and win7 32/64Bit) after setting them in the java control panel.
Any ideas?
Upvotes: 2
Views: 289
Reputation: 1392
Just print all the system properties once and see if they contain the ones you're looking for.
System.getProperties()
in Java
Upvotes: 0
Reputation: 2391
(User Application Data Folder)\Sun\Java\Deployment\deployment.properties
If any proxy settings are configured they can be found in this file. Sometimes a systemwide configuration exists then its found in c:\windows\sun...
http://download.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/properties.html
Upvotes: 2
Reputation: 2381
check if the system property
http.proxyHost
http.proxyPort
are set. There are some more properties like usernames and different ones for socks proxies but basically i would do it like this.
Description of some of the proxy properties http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
Upvotes: 0