Hi Chris, You may also want to take a look at the plugin.jar that ships with the JRE. You'll find some good stuff in sun.plugin.net.proxy.WIExplorerProxyConfig. Here are the registry entries that Sun looks for in that class.
private static final String REGSTR_PATH_INTERNET_SETTINGS = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"; private static final String REGSTR_VAL_PROXYENABLE = "ProxyEnable"; private static final String REGSTR_VAL_PROXYSERVER = "ProxyServer"; private static final String REGSTR_VAL_PROXYOVERRIDE = "ProxyOverride"; private static final String REGSTR_VAL_AUTOCONFIGURL = "AutoConfigURL"; There are also proxy detection classes for other browsers in the same package. Bruce. -----Original Message----- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: October 22, 2004 7:16 AM To: Commons HttpClient Project Subject: Re: Auto-detecting proxy settings in a standalone Java app Hello Chris, setting a fantasy proxy server in IE and searching for it in the registry yields: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings -> ProxyServer -> ProxyEnable a quick search on Google for "Java Windows Registry" yields: http://www.trustice.com/java/jnireg/ A public domain solution to access the Windows registry. http://sourceforge.net/projects/jregistrykey/ An LGPL-licensed solution to access the Windows registry. hope that helps, Roland "Chris Brown" <[EMAIL PROTECTED]> 22.10.2004 12:45 Please respond to "Commons HttpClient Project" To [EMAIL PROTECTED] cc Subject Re: Auto-detecting proxy settings in a standalone Java app Hi, Thanks for all the rapid feedback so far. I don't have VB or the VB runtime, although perhaps I could use the JNIWrapper software to access this information (if I knew where it was...!). Pity the Webstart proxy detection stuff isn't available for all to see, as it returns (I think) appropriate params, whether you use IE or Mozilla or whatever. On the other hand, given that JNIWrapper is commercial software, perhaps someone would know how to write a simple C program with "mingw" or whatever (easy to compile). It could detect params and return them on STDOUT, to be picked up either by a startup.bat or even through Runtime.exec() (solving the "restart the JVM" problem discussed earlier in this thread). First thing's first though... does anyone know where this information is stored in Windows ? IE and Mozilla/Firefox seem good targets for starters. Hey, why not even a little optional subproject for HTTPClient (requiring JNI and a compiler, preferably not *requiring* the MS tool chain), with a simple ProxyDetector interface, and a series of platform-specific implementations (to go further than my current Windows-only need) ? Any thoughts on these big ideas, or at least as far as solving the immediate problem (where are these settings stored and how can I get at them?) Thanks to all, Chris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]