Hi @all,
I’ve successfully built Java 25 for ARM32 devices and tested it locally with OpenEMS. The build works great, but we’ve hit a compatibility roadblock with the current toolchain.
The Problem:
Starting with Java 21, the Security Manager was deprecated, and in Java 25 it has been completely removed. This breaks compatibility with bndtools 7.1.0 (our current version), which still relies on Policy.setPolicy() in the aQute launcher.
When attempting to run OpenEMS with Java 25, we get:
java.lang.UnsupportedOperationException: Setting a system-wide Policy object is not supported
at java.base/java.security.Policy.setPolicy(Policy.java:114)
at aQute.launcher.Launcher.activate(Launcher.java:493)
What I’ve Tried:
Updated all project configs to Java 25 (gradle.properties, .classpath, .bndrun files)
JVM flags like -Djava.security.manager=allow → Rejected by Java 25
--add-opens=java.base/java.security=ALL-UNNAMED → No effect, the API is gone
The Root Cause:
The aQute launcher in bnd 7.1.0 explicitly calls Policy.setPolicy() during initialization, which is no longer supported in Java 25. This API was removed as part of JEP 486: Permanently Disable the Security Manager .
Potential Solutions:
- Wait for bnd 7.2.0+ - Newer versions should have a patched launcher compatible with Java 25
- Stick with Java 21 LTS - Currently the safest option for production (officially supported until 2029)
- Patch the launcher ourselves - Requires modifying aQute.launcher to remove Security Manager calls
Question to the Community:
Has anyone else tested OpenEMS with Java 25? Are there any workarounds I’m missing? Should we consider contributing a patch to bndtools, or is waiting for the official 7.2.0 release the better approach?
My Java 25 ARM32 build is available here:
Looking forward to your thoughts!
Best regards