Skip to content

Commit

Permalink
Merge pull request #60 from CSchank/master
Browse files Browse the repository at this point in the history
update container to handle 1.19
  • Loading branch information
nimmis authored Jun 10, 2022
2 parents c4db434 + 608c471 commit 0d0fb38
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions rootfs/usr/local/bin/set_java_ver
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
# (c) 2021 nimmis <[email protected]>
#
###########################################################
function set_java_18 () {
if ! [ -d /usr/lib/jvm/jdk-18* ]; then
echo "Downloading JDK 1.18"
curl -L https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz | tar xz -C /usr/lib/jvm
fi

echo "set java version to 18"
rm -f /usr/lib/jvm/default-jvm
ln -s /usr/lib/jvm/jdk-18* /usr/lib/jvm/default-jvm

}


function set_java_17 () {
if ! [ -d /usr/lib/jvm/jdk-17* ]; then
echo "Downloading JDK 1.17"
Expand Down
6 changes: 5 additions & 1 deletion rootfs/usr/local/bin/set_mc_ver
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ fi
function load_java() {

case "$1" in
latest | 1.18*)
latest | 1.19*)
/usr/local/bin/set_java_ver 18
;;

1.18*)
/usr/local/bin/set_java_ver 17
;;

Expand Down

0 comments on commit 0d0fb38

Please sign in to comment.