Skip to content

Commit 4052e65

Browse files
authored
make java version configurable
1 parent 37386c7 commit 4052e65

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Java/before_install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ if tr_isSetAndNotFalse SKIP_BUILD; then
3434
fi
3535

3636
# JAVA Install workaround...
37-
echo Installing JAVA openJDK 18.0.2
37+
JDK_VERSION="18.0.2-open"
38+
if tr_isSet SDKMAN_JDK_VERSION; then
39+
JDK_VERSION="${SDKMAN_JDK_VERSION}"
40+
fi
41+
echo Installing JAVA openJDK ${JDK_VERSION}
3842
curl -s "https://get.sdkman.io" | bash
3943
source "$HOME/.sdkman/bin/sdkman-init.sh"
40-
sdk install java 18.0.2-open
41-
sdk use java 18.0.2-open
44+
sdk install java ${JDK_VERSION}
45+
sdk use java ${JDK_VERSION}
4246

4347
echo Trying to locate the Java JDK...
4448
which Java ||whereis java || echo "FATAL: Could not get java-path!"

0 commit comments

Comments
 (0)