Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java 17 support #307

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group=org.ballerinalang
version=1.3.16-SNAPSHOT
ballerinaJreVersion=1.1.0
jreVersion=11.0.18+10
jreVersion=17.0.7+7

# For test purpose
swan-lake-version=2201.2.0
Expand Down
8 changes: 5 additions & 3 deletions resources/bin/bal
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
fi

JAVA_COMMAND=java
if test -d "$CURRENT_PATH/../dependencies/jdk-11.0.18+10-jre";then
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
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-11.0.18+10-jre/bin/java"
elif test -d "$CURRENT_PATH/../dependencies/jdk-11.0.15+10-jre";then
elif test -d "$CURRENT_PATH/../dependencies/jdk-11.0.15+10-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-11.0.15+10-jre/bin/java"
elif test -d "$CURRENT_PATH/../dependencies/jdk-11.0.8+10-jre";then
elif test -d "$CURRENT_PATH/../dependencies/jdk-11.0.8+10-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-11.0.8+10-jre/bin/java"
elif test -d "$CURRENT_PATH/../dependencies/jdk8u265-b01-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk8u265-b01-jre/bin/java"
Expand Down
34 changes: 19 additions & 15 deletions resources/bin/bal.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,31 @@ if "%1" == "update" set update=true
if "%1" == "build" set build=true
SetLocal EnableDelayedExpansion

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
Loading