# Java 25 on ARM32 - bndtools Compatibility Issue with Security Manager Removal

**URL:** <https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537>\
**Category:** Software-Development\
**Created:** [October 5, 2025, 9:45pm UTC](https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537 "2025-10-05T21:45:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sn0w3y](https://community.openems.io/user_avatar/community.openems.io/sn0w3y/32/636_2.png) [@Sn0w3y](https://community.openems.io/u/Sn0w3y)\
**Post date:** [October 5, 2025, 9:45pm UTC](https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537/1 "2025-10-05T21:45:00Z")

</div>

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:

1. ✅ Updated all project configs to Java 25 (gradle.properties, .classpath, .bndrun files)
2. ❌ JVM flags like -Djava.security.manager=allow → Rejected by Java 25
3. ❌ --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](https://openjdk.org/jeps/486) .

Potential Solutions:

1. Wait for bnd 7.2.0+ - Newer versions should have a patched launcher compatible with Java 25
2. Stick with Java 21 LTS - Currently the safest option for production (officially supported until 2029)
3. 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:

> **[java25 – Google Drive](https://drive.google.com/drive/folders/1e5_Cmc4HDZOK6s8tUvgWkqAlBQNs7ER3?usp=sharing)**

Looking forward to your thoughts!

Best regards

---

<div class="post-metadata">

**Author:** ![stefan.feilmeier](https://community.openems.io/user_avatar/community.openems.io/stefan.feilmeier/32/2585_2.png) [@stefan.feilmeier](https://community.openems.io/u/stefan.feilmeier)\
**Post date:** [October 6, 2025, 8:42pm UTC](https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537/2 "2025-10-06T20:42:43Z")

</div>

Thanks @Sn0w3y for looking into this. I know that @da-Kai also tried it before without success. There is also discussion on Java 25 support in the bndtools Github. I’d say we wait for `7.2.0`.

> <https://github.com/bndtools/bnd/issues/6858>
>
> As an OSGi novice, I was very confused when my tests failed on JDK-25 and the Pa…x Exam team kindly helped me \[resolve\](https://github.com/ops4j/org.ops4j.pax.exam/issues/1131#issuecomment-3370313321) that setting the \`Require-Capability\` explicitly. Since this is just the Java version can that be added dynamically instead of \`osgi.ee;filter:="(osgi.ee=UNKNOWN)"\`? Then the bnd plugin is future compatible. While I release on JDK-11, the tests failed due to cross-building on the latest JDK.
> 
> \`\`\`ini
> \# Java 24
> Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=24))"
> 
> \# Java 25
> Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"
> \`\`\`
> 
> I manually forced the correct value using,
> \`\`\`kts
> // Workaround until the bnd plugin supports the latest JDK
> val javaVersion = java.toolchain.languageVersion.get()
> if (javaVersion.canCompileOrRun(25)) {
> bnd(mapOf("Require-Capability" to
> """osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${javaVersion}))""""))
> }
> \`\`\`

Regards,  
Stefan

---

<div class="post-metadata">

**Author:** ![stefan.feilmeier](https://community.openems.io/user_avatar/community.openems.io/stefan.feilmeier/32/2585_2.png) [@stefan.feilmeier](https://community.openems.io/u/stefan.feilmeier)\
**Post date:** [December 27, 2025, 11:51pm UTC](https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537/3 "2025-12-27T23:51:20Z")

</div>

Bnd 7.2.0 has been released today. PR for OpenEMS is ongoing:

> <https://github.com/OpenEMS/openems/pull/3494>
>
> References:
> \- https://github.com/bndtools/bnd/releases/tag/7.2.0
> \- https://git…hub.com/bndtools/bnd/wiki/Changes-in-7.2.0
> 
> Discussion:
> \- https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537/2

---

<div class="post-metadata">

**Author:** ![Sn0w3y](https://community.openems.io/user_avatar/community.openems.io/sn0w3y/32/636_2.png) [@Sn0w3y](https://community.openems.io/u/Sn0w3y)\
**Post date:** [December 28, 2025, 7:54pm UTC](https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537/4 "2025-12-28T19:54:59Z")

</div>

Ich schaue später mal, ob ich Java25 zum laufen bekomme 🎉

---

<div class="post-metadata">

**Author:** ![da-Kai](https://community.openems.io/user_avatar/community.openems.io/da-kai/32/1023_2.png) [@da-Kai](https://community.openems.io/u/da-Kai)\
**Post date:** [January 26, 2026, 8:20am UTC](https://community.openems.io/t/java-25-on-arm32-bndtools-compatibility-issue-with-security-manager-removal/10537/5 "2026-01-26T08:20:17Z")

</div>

I opend a PR to update to java 25:  
[Update to Java 25 🚀 by da-Kai · Pull Request #3544 · OpenEMS/openems · GitHub](https://github.com/OpenEMS/openems/pull/3544).

I cross-compiled a JDK 25 against glibc 2.17, which should make it compatible with debian jessie and newer.

[temurin-25-jdk-armhf\_25.0.3+8.deb](https://openems.io/download/temurin-25-jdk-armhf_25.0.3+8.deb)  
[temurin-25-jre-armhf\_25.0.3+8.deb](https://openems.io/download/temurin-25-jre-armhf_25.0.3+8.deb)

Feel free to test.
