I am with Ubuntu 24.04.3 LTS (noble).
Are there any experiences and recommendations regarding openHAB 5 and java 25 (Temurin)?
I am with Ubuntu 24.04.3 LTS (noble).
Are there any experiences and recommendations regarding openHAB 5 and java 25 (Temurin)?
Not that I’ve heard of any.
So please contribute yourself: deploy it on your system and let us know. Thanks.
You’re absolutely right, I can test that myself, but I thought there was already some information available that I hadn’t found in my research.
Here are my findings:
In a nutshell: openHAB 5.0.2 (release build) does not start with Java 25.
The details:
Here is the status after starting with
$ java --version
openjdk 25 2025-09-16 LTS
OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Temurin-25+36 (build 25+36-LTS, mixed mode, sharing)
$ sudo systemctl status openhab
● openhab.service - openHAB - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2025-10-23 06:26:56 CEST; 3s ago
Docs: Introduction | openHAB
https://community.openhab.org
Process: 590007 ExecStart=/usr/share/openhab/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=1/FAILURE)
Main PID: 590007 (code=exited, status=1/FAILURE)
CPU: 758ms
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Service will restart (restart setting)
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Changed running → failed-before-auto-restart
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Unit entered failed state.
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Consumed 758ms CPU time.
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Next restart interval calculated as: 5s
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Changed failed-before-auto-restart → auto-restart
Oct 23 06:26:56 ubuntu24-qnap systemd[1]: openhab.service: Control group is empty.
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Service restart interval 5s expired, scheduling restart.
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Trying to enqueue job openhab.service/start/restart-dependencies
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Installed new job openhab.service/start as 28854
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Enqueued job openhab.service/start as 28854
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Scheduled restart job, restart counter is at 39.
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Changed auto-restart → auto-restart-queued
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Will spawn child (service_enter_start): /usr/share/openhab/runtime/bin/karaf
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Passing 0 fds to service
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: About to execute: /usr/share/openhab/runtime/bin/karaf “${OPENHAB_STARTMODE}”
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Forked /usr/share/openhab/runtime/bin/karaf as 590118
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Changed auto-restart-queued → running
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Job 28854 openhab.service/start finished, result=done
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: Started openhab.service - openHAB - empowering the smart home.
Oct 23 06:27:01 ubuntu24-qnap (karaf)[590118]: Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: User lookup succeeded: uid=130 gid=137
Oct 23 06:27:01 ubuntu24-qnap (karaf)[590118]: Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Oct 23 06:27:01 ubuntu24-qnap systemd[1]: openhab.service: Child 590121 belongs to openhab.service.
I looked at /lib/systemd/system/openhab.service and started the service manually:
$ /usr/share/openhab/runtime/bin/karaf daemon
JVM must be version 21. JVM version 25 is unsupported (JAVA_HOME=/usr/lib/jvm/temurin-25-jdk-amd64)
I changed the check from 21 to 25 in /usr/share/openhab/runtime/bin/karaf :
# Determine the JVM version and check that it is version 21
checkJvmVersion
if [ “${VERSION}” -ne “21” ]; then
die “JVM must be version 21. JVM version ${VERSION} is unsupported (JAVA_HOME=$JAVA_HOME)”
fi
The status changed:
$ sudo systemctl status openhab
● openhab.service - openHAB - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-10-23 06:50:29 CEST; 18s ago
Docs: Introduction | openHAB
https://community.openhab.org
Main PID: 607862 (java)
Tasks: 19 (limit: 4605)
Memory: 149.1M (peak: 149.4M)
CPU: 16.073s
CGroup: /system.slice/openhab.service
└─607862 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab. userdata=/var/lib/openhab -Dopenhab.logdir=/var/log/openhab -Dfelix.cm.dir=/var/lib/op>
Oct 23 06:50:29 ubuntu24-qnap systemd[1]: openhab.service: Job 41453 openhab.service/start finished, result=done
Oct 23 06:50:29 ubuntu24-qnap systemd[1]: Started openhab.service - openHAB - empowering the smart home.
Oct 23 06:50:29 ubuntu24-qnap (karaf)[607862]: Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Oct 23 06:50:29 ubuntu24-qnap systemd[1]: openhab.service: User lookup succeeded: uid=130 gid=137
Oct 23 06:50:29 ubuntu24-qnap (karaf)[607862]: Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Oct 23 06:50:29 ubuntu24-qnap systemd[1]: openhab.service: Child 607865 belongs to openhab.service.
Oct 23 06:50:36 ubuntu24-qnap karaf[607862]: WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
Oct 23 06:50:36 ubuntu24-qnap karaf[607862]: WARNING: sun.misc.Unsafe::staticFieldOffset has been called by org.eclipse.osgi.internal.url.MultiplexingFactory (file:/usr/share/openhab/runtime/system/org/eclipse/platform/org.eclipse.osgi/3.18.0/org.eclipse.o>
Oct 23 06:50:36 ubuntu24-qnap karaf[607862]: WARNING: Please consider reporting this to the maintainers of class org.eclipse.osgi.internal.url.MultiplexingFactory
Oct 23 06:50:36 ubuntu24-qnap karaf[607862]: WARNING: sun.misc.Unsafe::staticFieldOffset will be removed in a future release
In /var/log/openhab/openhab.log , I actually only saw exceptions like the following:
2025-10-23 06:51:08.828 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=34, bundle=5/mvn:org.ops4j.pax.logging/pax-logging-log4j2/2.2.8]: Unexpected problem updating configuration org.ops4j.pax.logging
java.lang.UnsupportedOperationException: getSubject is not supported
at javax.security.auth.Subject.getSubject(Subject.java:277) ~[?:?]
at org.apache.felix.eventadmin.impl.handler.EventAdminImpl.prepareEvent(EventAdminImpl.java:146) ~[?:?]
at org.apache.felix.eventadmin.impl.handler.EventAdminImpl.postEvent(EventAdminImpl.java:180) ~[?:?]
at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.postEvent(EventAdminSecurityDecorator.java:79) ~[?:?]
at org.ops4j.pax.logging.spi.support.EventAdminConfigurationNotifier.configurationDone(EventAdminConfigurationNotifier.java:49) ~[bundleFile:?]
at org.ops4j.pax.logging.log4j2.internal. PaxLoggingServiceImpl.configureLog4J2(PaxLoggingServiceImpl.java:596) ~[bundleFile:?]
at org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:342) ~[bundleFile:?]
at org.ops4j.pax.logging.log4j2.internal.LoggingManagedService.updated(LoggingManagedService.java:37) ~[bundleFile:?]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) ~[bundleFile:?]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [bundleFile:?]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [bundleFile:?]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1131) [bundleFile:?]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1087) [bundleFile:?]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) [bundleFile:?]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) [bundleFile:?]
at java.lang.Thread.run(Thread.java:1474) [?:?]
It seems that the Apache components used are not prepared for Java 25.
I have stopped the experiment.
You can check progress here
Thank you! I had searched in vain for such a reference.