Skip to content

Commit

Permalink
Merge pull request #373 from keizer619/master
Browse files Browse the repository at this point in the history
Include JRE 21 support
  • Loading branch information
keizer619 authored Nov 21, 2024
2 parents 329f86e + d0f7879 commit de02308
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
2 changes: 2 additions & 0 deletions resources/bin/bal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
fi

JAVA_COMMAND=java
if test -d "$CURRENT_PATH/../dependencies/jdk-21.0.5+11-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-21.0.5+11-jre/bin/java"
if test -d "$CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre/bin/java"
elif test -d "$CURRENT_PATH/../dependencies/jdk-11.0.18+10-jre"; then
Expand Down
38 changes: 21 additions & 17 deletions resources/bin/bal.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,34 @@ if "%1" == "update" set update=true
if "%1" == "build" set build=true
SetLocal EnableDelayedExpansion

if exist %CURRENT_PATH%..\dependencies\jdk-17.0.7+7-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-17.0.7+7-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk-21.0.5+11-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-21.0.5+11-jre\bin\java
) else (
if exist %CURRENT_PATH%..\dependencies\jdk-11.0.18+10-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-11.0.18+10-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk-17.0.7+7-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-17.0.7+7-jre\bin\java
) else (
if exist %CURRENT_PATH%..\dependencies\jdk-11.0.15+10-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-11.0.15+10-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk-11.0.18+10-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-11.0.18+10-jre\bin\java
) else (
if exist %CURRENT_PATH%..\dependencies\jdk-11.0.8+10-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-11.0.8+10-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk-11.0.15+10-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-11.0.15+10-jre\bin\java
) else (
if exist %CURRENT_PATH%..\dependencies\jdk8u332-b09-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk8u332-b09-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk-11.0.8+10-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk-11.0.8+10-jre\bin\java
) else (
if exist %CURRENT_PATH%..\dependencies\jdk8u265-b01-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk8u265-b01-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk8u332-b09-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk8u332-b09-jre\bin\java
) else (
if exist %CURRENT_PATH%..\dependencies\jdk8u202-b08-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk8u202-b08-jre\bin\java
if exist %CURRENT_PATH%..\dependencies\jdk8u265-b01-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk8u265-b01-jre\bin\java
) else (
if not exist "%JAVA_HOME%" (
echo Compatible JRE not found. Please follow the instructions in ^<BALLERINA_HOME^>\INSTALL.txt to install and setup Ballerina.
exit /b
if exist %CURRENT_PATH%..\dependencies\jdk8u202-b08-jre (
set JAVA_CMD=%CURRENT_PATH%..\dependencies\jdk8u202-b08-jre\bin\java
) else (
if not exist "%JAVA_HOME%" (
echo Compatible JRE not found. Please follow the instructions in ^<BALLERINA_HOME^>\INSTALL.txt to install and setup Ballerina.
exit /b
)
)
)
)
Expand Down

0 comments on commit de02308

Please sign in to comment.