Skip to content

Java 25 Support #5023

@holgerfriedrich

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 with Java 25, generate (mostly) Java 25 bytecode

  • tools like maven-shade-plugin, ecj 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
  • 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 would work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions