From 73c03fb362b64b687221d3fa170aad730808d3a1 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Fri, 16 Oct 2026 12:28:47 +0300 Subject: [PATCH] Accept every Java 25 or later build in the Windows installer --- packaging/java/scripts/windows/install.bat | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packaging/java/scripts/windows/install.bat b/packaging/java/scripts/windows/install.bat index 59a3fa15cd..ac12380354 100644 --- a/packaging/java/scripts/windows/install.bat +++ b/packaging/java/scripts/windows/install.bat @@ -10,14 +10,17 @@ setlocal ENABLEEXTENSIONS @ECHO Detecting Java version installed. :CHECK_JAVA -for /f tokens^=2-5^ delims^=.-_^" %%j in ('java -fullversion 2^>^&1') do set "jver=%%j%%k" +set "jver=" +set "jmajor=0" +for /f tokens^=2^ delims^=.+-_^" %%j in ('java -fullversion 2^>^&1 ^| findstr /c:"full version"') do set "jver=%%j" @ECHO CurrentVersion %jver% -if %jver% NEQ 250 GOTO JAVA_NOT_INSTALLED +set /a jmajor=jver 2>nul +if %jmajor% LSS 25 GOTO JAVA_NOT_INSTALLED :JAVA_INSTALLED -@ECHO Java 25 found! +@ECHO Java %jmajor% found! @ECHO Installing thingsboard ... SET BASE=%~dp0 @@ -49,8 +52,8 @@ POPD GOTO END :JAVA_NOT_INSTALLED -@ECHO Java 25 is not installed. Only Java 25 is supported -@ECHO Please go to https://adoptopenjdk.net/index.html and install Java 25. Then retry installation. +@ECHO Java 25 or later is not installed. ThingsBoard requires Java 25 or later. +@ECHO Please go to https://adoptium.net/ and install Java 25. Then retry installation. PAUSE GOTO END