Browse Source

Accept every Java 25 or later build in the Windows installer

pull/16341/head
Viacheslav Klimov 2 months ago
parent
commit
73c03fb362
Failed to extract signature
  1. 13
      packaging/java/scripts/windows/install.bat

13
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

Loading…
Cancel
Save