Modify

Opened 7 years ago

Closed 7 years ago

#16272 closed task (fixed)

How enable automatic system proxy detection when using JOSM webstart?

Reported by: iman Owned by: iman
Priority: normal Milestone:
Component: Core Webstart Version: latest
Keywords: webstart proxy Cc:

Description

Hi,
Because of problems like 16162 that sometimes happen to me, I decided to use a proxy and fortunately it solves the problem.
Manually setting the proxy will work but I want to use the automatic system proxy detection if possible.

I'm using the Webstart version of JOSM.

According to the hint available on proxy settings tab of JOSM and the solution provided for my previous ticket 15894 I added the following parameter:

-J-Djava.net.useSystemProxies=true

So the target of JOSM shortcut is:

%ProgramFiles%\Java\jre1.8.0_161\bin\javaws.exe -J-Xmx1024M -J-Djava.net.useSystemProxies=true -localfile -J-Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp "%appdata%\..\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-265ee5fe"

But after restarting JOSM the system proxy option is still disabled and grayed out.
Is there any solution for this one?

Attachments (0)

Change History (8)

comment:1 by Don-vip, 7 years ago

Keywords: proxy added; useSystemProxies removed
Type: taskenhancement

comment:2 by Don-vip, 7 years ago

I believe WebStart handles proxies on its own and ignores the java.net.useSystemProxies property:

https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html

On recent Windows systems and on Gnome 2.x platforms it is possible to tell the default ProxySelector to use the system proxy settings (both recent versions of Windows and Gnome 2.x let you set proxies globally through their user interface). If the system property java.net.useSystemProxies is set to true (by default it is set to false for compatibility sake), then the default ProxySelector will try to use these settings. You can set that system property on the command line, or you can edit the JRE installation file lib/net.properties, that way you have to change it only once on a given system.

It should be noted that both Java Plugin and Java Webstart do replace the default ProxySelector with a custom one to integrate better with the underlying platform or container (like the web browser). So keep in mind, when dealing with ProxySelector, that the default one is typically specific to the underlying platform and to the JVM implementation.

comment:3 by Don-vip, 7 years ago

Owner: changed from team to iman
Status: newneedinfo
Type: enhancementtask

Have you tried to set the proxy through the Java Control Panel? I think this is the only way for WebStart.

in reply to:  3 ; comment:4 by iman, 7 years ago

Replying to Don-vip:

Have you tried to set the proxy through the Java Control Panel? I think this is the only way for WebStart.

Thanks.
For now without proxy I'm getting no error so I'm not sure if it helps.
But in case it work, at least it's a better way than manually setting proxy on JOSM itself, because when I was manually setting proxy on JOSM it was needed that I add some exceptions in Internet Explorer proxy settings to bypass local servers and every session I do it again. But in JAVA CP those exceptions remains permanently.

I will test it later again.

May you guide me how to detect whether current JOSM session is using a proxy or not. Is there any report/log on this?

in reply to:  4 comment:5 by Don-vip, 7 years ago

Replying to Iman <iriman@…>:

May you guide me how to detect whether current JOSM session is using a proxy or not. Is there any report/log on this?

If the proxy is needed and it works, then it is used :)
You can also launch JOSM with java -jar --trace. Maybe you will have the confirmation.

comment:6 by Don-vip, 7 years ago

Please close this ticket if you have confirmation :)

comment:7 by anonymous, 7 years ago

yet, I'm not sure what's happening with proxy configuration I did on Java CP.
It needs I look further.

comment:8 by Don-vip, 7 years ago

Resolution: fixed
Status: needinfoclosed

Please reopen if you need something from us.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain iman.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.