JDK-6298563 : proxy configuration should be taken from the operating system
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2005-07-19
  • Updated: 2010-05-11
  • Resolved: 2005-07-19
Related Reports
Duplicate :  
Description
Today, when a network connection to a remote machine (typically HTTP) is made through java.net.URL, the only way to configure the use of proxy is to use system properties.

Java needs to do better than this, because today:

- every application programmer needs to worry about proxy support.
- the user needs to configure Java programs individually to get a proxy support.

Here are some examples of the sorry state of the proxy support today:

- JDK's own javadoc program doesn't officially support proxy. You have to use
  -J-Djava.net.httpProxyHost=... -J-Djava.net.httpProxyPort=8080

- To run Ant with proxy enabled, you have to do:
  $ export ANT_OPTS="-Djava.net.proxyHost=... "
  $ ant

- To run Maven with proxy support, you edit ./build.properties and add
  maven.proxy.host=...
  maven.proxy.port=...

- TO run XJC, a part of Mustang, with a proxy, you do:
  xjc -proxy webproxy.sfbay:8080

As you see, every program creatively invents their own ways of setting a proxy, and as a result, the users and the developers suffer.

In contrast, if you look at .NET, there's a system wide (or perhaps user-wide --- I'm not sure) proxy setting on Windows, and .NET Framework always consults this setting. The net result is that a .NET programmer doesn't need to worry anything about the proxy, and yet their programs will automatically use this proxy setting.

I think Java should do the same. JDK should support an automatic proxy configuration from a platform-specific setting.
###@###.### 2005-07-19 04:55:16 GMT

Comments
EVALUATION Already fixed. See 4923714. There is now a setting in jre/lib/net.properties for that. ###@###.### 2005-07-19 16:30:00 GMT
19-07-2005