diff --git a/resources/bin/bal b/resources/bin/bal index 1339146..d7e29cc 100755 --- a/resources/bin/bal +++ b/resources/bin/bal @@ -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 diff --git a/resources/bin/bal.bat b/resources/bin/bal.bat index 3882d2f..cd49d7a 100644 --- a/resources/bin/bal.bat +++ b/resources/bin/bal.bat @@ -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 ^\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 ^\INSTALL.txt to install and setup Ballerina. + exit /b + ) ) ) )