From c67d8af69b869bab1ccc7013a8bccec2b2410518 Mon Sep 17 00:00:00 2001 From: Wechar Yu Date: Tue, 16 Jan 2024 17:30:10 +0800 Subject: [PATCH] Add jdk17 (#15) --- bin/sw | 4 ++-- tools/install_java_zulu | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/sw b/bin/sw index 02f3497..6f5dc5f 100755 --- a/bin/sw +++ b/bin/sw @@ -47,8 +47,8 @@ for component in "${components[@]}";do cd $SW_DIR case "$component" in java) - sudo update-java-alternatives --set zulu-$1-amd64 - echo "export JAVA_HOME=/usr/lib/jvm/zulu-$1-amd64/" | sudo tee /etc/profile.d/java.sh + sudo update-java-alternatives --set zulu$1-ca-amd64 + echo "export JAVA_HOME=/usr/lib/jvm/zulu$1-ca-amd64/" | sudo tee /etc/profile.d/java.sh echo "open a new shell or run: . /etc/profile.d/java.sh" ;; hive-dev) diff --git a/tools/install_java_zulu b/tools/install_java_zulu index d147de6..b3c65e4 100755 --- a/tools/install_java_zulu +++ b/tools/install_java_zulu @@ -1,10 +1,12 @@ #!/bin/bash -e -apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 -apt-add-repository 'deb http://repos.azulsystems.com/debian stable main' +apt-get install gnupg ca-certificates curl +curl -s https://repos.azul.com/azul-repo.key | sudo gpg --dearmor -o /usr/share/keyrings/azul.gpg +echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | sudo tee /etc/apt/sources.list.d/zulu.list + apt-get update -apt-get install -y zulu-8 zulu-11 +apt-get install -y zulu8-jdk zulu11-jdk zulu17-jdk -update-java-alternatives --set zulu-8-amd64 +update-java-alternatives --set zulu8-ca-amd64 /tools/build_cleanup