Bug 276939 - [Net] Set java.net.useSystemProxies property when the Network Connection is set to "System proxy configuration"
Summary: [Net] Set java.net.useSystemProxies property when the Network Connection is s...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Pawel Pogorzelski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 257443
Blocks:
  Show dependency tree
 
Reported: 2009-05-19 12:14 EDT by Tim Moore CLA
Modified: 2010-04-22 08:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Moore CLA 2009-05-19 12:14:08 EDT
Build ID: M20090211-1700

Selecting "System proxy configuration" in the Network Connections preferences page does not appear to set the 'java.net.useSystemProxies' property [1] to true. Therefore only Eclipse's own code benefits from the new setting. Is there any reason not to set the Java property at the same time? We've noticed that setting a Manual proxy configuration does set the equivalent Java system properties.

[1] http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html
Comment 1 Pawel Pogorzelski CLA 2009-05-20 08:38:45 EDT
IMO it would be better to detect if we're running Java 1.5 or later. If it is the case we could register a custom java.net.ProxySelector that would be backed by org.eclipse.core.internal.net.ProxyManager.

Tim, what do you think about it?
Comment 2 Tim Moore CLA 2009-05-20 09:00:04 EDT
I'd have thought that reading/setting the system property if possible (>=Java1.5) would be easier, but so long as it works (i.e. makes vanilla Java code use the system proxies) I don't have a strong opinion.
Comment 3 Pawel Pogorzelski CLA 2009-05-20 09:13:39 EDT
Sure, I'll handle it in 3.6 since it's to late in the current cycle.
Comment 4 Pawel Pogorzelski CLA 2010-04-22 08:33:23 EDT
(In reply to comment #0)
> We've noticed that setting a Manual proxy configuration does set the equivalent
> Java system properties.

Tim, we do set all the system properties (like http.nonProxyHosts) to values returned by active provider. In case native provider is set system properties correspond to proxy settings discovered in OS. Thanks to that IProxyService's clients use the same proxies as clients indirectly consuming system properties (via protocol handlers).

If we set "java.net.useSystemProxies" on a platform when core.net lacks native support we end up with IProxyService returning no proxies to its clients. At the same time other clients would use native settings. This would confuse users as network connections page would remain empty in such case.

The way to workaround it is setting up the property by hand. There is no other way as we can't sacrifice consistency of proxies usage.

If you run GNOME you can use following switch to enable native proxy support: eclipse -vmargs -Dorg.eclipse.core.net.enableGnome

This is a WONTFIX, please reopen if you don't agree.