Skip to content

Java 25 Support #5023

Description

@holgerfriedrich

This issues is to summarise the current state of Java 25 support.
Java 25 is the next LTS release and is likely to be supported by OH in the future.

Java 25 brings a lot of improvements. I am curious especially about JEP 483: Ahead-of-Time Class Loading & Linking! How much faster will be the start on a RPi?

The migration will be done slowly. We will use Java 21 as the major and supported Java version.
In the background, we will work hard to remove blockers. I will add a Java 25 build to the CI, first only compiling with Java 25 compiler configured to generate Java 21 code. This will be extended over the next months once we are able to remove blockers.

Those are the steps to be taken:

Compile with Java 25, generate Java 21 bytecode

  • Compile
  • Unit-tests
  • iTests - work with bndtools 7.2.1 and junit downgraded below v13 (due to transitive dependency) in 7.2.0
  • Code Analysis
  • bndtools 7.1 -> 7.2.1 (done for core, prepared for add-ons)
  • Add JDK25 generating Java21 bytecode #5290
  • openhab/openhab-addons#...
  • upgrade from ecj 3.43 to 3.45, transition from Java 24 to Java 25 in ecj (currently core is on Java 24 due to issues in ecj 3.44)

Compile with Java 25, generate (mostly) Java 25 bytecode

  • tools like maven-shade-plugin, ecj 3.43 are not supporting Java 25 bytecode -> limit this bundles to Java 24
  • Code Analysis - tools to not yet support Java 25 bytecode -> do the necessary upgrades, release static-code-analysis
  • Blocker: Karaf 4.4.x does not support Java 25

Run openHAB installation in Java 25

  • Blocker: Karaf 4.4.x -> still relays on pax logging, calling an unsupported function due to removal of SecurityManager in JDK 25 -> wait for Karaf 4.5 targeted for YE 2025 2026
  • Blocker: Some deprecated methods in JAAS cause Exceptions in JDK25, and need to be replaced. The new API is available in Java 21 (maybe before), but Karaf 4.5 branch needs some more upgrades to work with Java 21
  • Distro has downgraded to bndtools 7.0 due to an issue with Eclipse -> check if 7.2.1 does work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions