Page 1 of 1

OxygenXML and JDL Security Manager

Posted: Sun Dec 01, 2024 3:55 pm
by kanonier
Hello,

beginning with JDK 17, Java SecurityManager is marked as deprecated (https://bugs.openjdk.org/browse/JDK-8264713).
This give the warning messages that were mentioned in other threads.

As of Java 18+, running SecurityManager related code is not longer working out of the box.
For OygenXML, the "independent distribution" (without bundled JRE) thus crashes on startup if used with these newer Java versions.
An exception of type UnsupportedOperationException is thrown.
As an workaround, the additional JVM parameter -Djava.security.manager=allow should be given.
It may be included in the start scripts (e.g oxygenDeveloper.sh)
Don't know whether it fixes the problem in the future, but for Oxygen 27 and OpenJDK 21 it still does.

Regards

Re: OxygenXML and JDL Security Manager

Posted: Mon Dec 02, 2024 11:57 am
by adrian
Hi,

For Oxygen XML Editor the oxygen.sh script already specifies -Djava.security.manager=allow so that works out-of-the-box. But the oxygenAuthor.sh and oxygenDeveloper.sh scripts (for Author and Developer) have not been updated.
If you need it, I advise inserting it before the OmitStackTraceInFastThrow argument:
e.g.

Code: Select all

set -- \
 -Djava.security.manager=allow\
 -XX:-OmitStackTraceInFastThrow\
Do note that Java/OpenJDK 21 is not officially supported in v27 just yet. For the time being we recommend a LTS distribution of Java/OpenJDK 17 rather than 21.

Regards,
Adrian