Here is a link that might help:
http://java.sun.com/j2se/1
Specifically the java.net.ProxySelector code can allow you to create some code to determine the given proxy configuration for the host.
Main Topics
Browse All TopicsHi all,
I'm using the Jakarta Commons HttpClient java library to do http calls from a java application.
Unfortunately, not always people have the proxy settings (including url, user/pass, exclusions, etc.), but instead they are using "Automatically Detect Proxy Settings" or "Automatic Configuration Script" in their browsers.
I'm looking to find out if there is any open source java library or some way to develop this on my own so that my java application will be able to be configured in any of these two options as well. (In a perfect world, I'm looking for this solution to work for both Windows and Linux based platforms.)
Thanks,
Guy.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here is a link that might help:
http://java.sun.com/j2se/1
Specifically the java.net.ProxySelector code can allow you to create some code to determine the given proxy configuration for the host.
Thanks ebertk, that was promising, unfortunately, the ProxySelector could not identify my proxy when I gave it a URI with http://www.google.com as an example.
You are kind of in a pickle. I don't have any sample code, but you might have to take a two step approach to this:
1. use the ProxySelector above, and the have your program test to see if it worked. I would assume that you could get this work most of the time, but failures would probably occur.
2. If a failure happens, then prompt the user to enter their proxy info manually.
Good luck - this is a tricky one!
Business Accounts
Answer for Membership
by: optimalPosted on 2008-02-28 at 06:30:39ID: 21004021
Doing some more research, I guess I'm looking for a "Web Proxy Autodiscovery Protocol (WPAD)" implementation in java.