Modify

Opened 5 months ago

Closed 5 months ago

Last modified 6 weeks ago

#24030 closed defect (fixed)

JOSM no longer working: Exception in thread "main" java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported

Reported by: Wulf4096 Owned by: team
Priority: major Milestone: 24.11
Component: Core Version:
Keywords: java24 Cc:

Description

$ josm
Using /usr/bin/java to execute josm.
2024-11-30 18:09:53.224 INFO: Log level is at INFO (INFO, 800)
Exception in thread "main" java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported

at java.base/java.security.Policy.setPolicy(Policy.java:114)
at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:790)
at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:280)
at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:766)

$ java -version
openjdk version "24-ea" 2025-03-18
OpenJDK Runtime Environment (build 24-ea+26-Debian-1)
OpenJDK 64-Bit Server VM (build 24-ea+26-Debian-1, mixed mode, sharing)

Tried with JOSM 19253 and "latest" (today is 2024-11-30).

I assume it's related to the new java version.

Attachments (0)

Change History (5)

comment:1 by taylor.smock, 5 months ago

Keywords: java24 added
Milestone: 24.11

Yes, this is likely related to the EA version of Java 24. If I had to guess, it is specifically related to the deprecation and removal of the SecurityManager. I'll have to install Java 24 EA to be certain, but that is my guess.

comment:2 by taylor.smock, 5 months ago

Resolution: fixed
Status: newclosed

In 19264/josm:

Fix #24030: JEP 486 (in Java 24) always throws an UnsupportedOperationException when attempting to set security policy

This merely fixes startup issues. There are a few other locations which may
cause issues, but did not during relatively minimal testing.

comment:3 by anonymous, 6 weeks ago

I have this issue after a recent update
===
% josm
2025-03-21 10:04:02.476 INFO: Log level is at INFO (INFO, 800)
Exception in thread "main" java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported

at java.base/java.security.Policy.setPolicy(Policy.java:114)
at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:790)
at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:280)
at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:766)

===

comment:4 by anonymous, 6 weeks ago

% pacman -Q josm
josm 19253-1
% java --version
openjdk 24.0.1 2025-03-18
OpenJDK Runtime Environment (build 24.0.1)
OpenJDK 64-Bit Server VM (build 24.0.1, mixed mode, sharing)

comment:5 by anonymous, 6 weeks ago

ah, 19253 doesn't have the fix yet =(

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.