diff --git a/distributions/openhab/src/main/resources/bin/karaf b/distributions/openhab/src/main/resources/bin/karaf
index 34c4f2f552..bc3a799280 100755
--- a/distributions/openhab/src/main/resources/bin/karaf
+++ b/distributions/openhab/src/main/resources/bin/karaf
@@ -160,7 +160,9 @@ init() {
# Determine the JVM version and check that it is version 17
checkJvmVersion
if [ "${VERSION}" -ne "17" ]; then
- die "JVM must be version 17. JVM version ${VERSION} is unsupported (JAVA_HOME=$JAVA_HOME)"
+ if [ "${VERSION}" -ne "21" ]; then
+ die "JVM must be version 17 or 21. JVM version ${VERSION} is unsupported (JAVA_HOME=$JAVA_HOME)"
+ fi
fi
# Check if a root instance is already running
diff --git a/distributions/openhab/src/main/resources/bin/karaf.bat b/distributions/openhab/src/main/resources/bin/karaf.bat
index ae536d4d74..f9ccdc6f28 100644
--- a/distributions/openhab/src/main/resources/bin/karaf.bat
+++ b/distributions/openhab/src/main/resources/bin/karaf.bat
@@ -215,8 +215,10 @@ for /f tokens^=2-5^ delims^=.-_+^" %%j in ('"%JAVA%" -fullversion 2^>^&1') do (
)
if %JAVA_VERSION% NEQ 17 (
- call :warn "JVM must be version 17. JVM version %JAVA_VERSION% is unsupported (JAVA_HOME=%JAVA_HOME%)"
- goto END
+ if %JAVA_VERSION% NEQ 21 (
+ call :warn "JVM must be version 17 or 21. JVM version %JAVA_VERSION% is unsupported (JAVA_HOME=%JAVA_HOME%)"
+ goto END
+ )
)
if %JAVA_VERSION% GTR 8 (
diff --git a/launch/app/pom.xml b/launch/app/pom.xml
index bd7b1a16cf..61dbbc0897 100644
--- a/launch/app/pom.xml
+++ b/launch/app/pom.xml
@@ -14,9 +14,6 @@
UTF-8
UTF-8
- 17
- ${oh.java.version}
- ${oh.java.version}
7.0.0
@@ -383,6 +380,23 @@
+
+ j17
+
+ [17.0,18.0);[21.0,22.0)
+
+
+ 17
+ ${oh.java.version}
+
+
+
+ j21
+
+ 21
+ ${oh.java.version}
+
+
diff --git a/pom.xml b/pom.xml
index 4bddab49ef..c1296060bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,11 +63,7 @@
4.4.5
- 17
- ${oh.java.version}
- ${oh.java.version}
-
- 0.15.0
+ 0.16.0
2.38.0
4.25
@@ -249,7 +245,7 @@
- [17.0,18.0)
+ [17.0,18.0),[21.0,22.0)
@@ -319,6 +315,23 @@
+
+ j17
+
+ [17.0,18.0);[21.0,22.0)
+
+
+ 17
+ ${oh.java.version}
+
+
+
+ j21
+
+ 21
+ ${oh.java.version}
+
+