From 8cbf2bea2228326391595c4ebc20d4a9e1a0dd19 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Thu, 20 Jan 2022 16:45:06 +1000 Subject: [PATCH] Feat: Add support for OpenJDK17 Change-Id: Ic6369e120cc256d081ebdd66c5d0d154c86fc73b Issue-ID: RELENG-4097 Signed-off-by: Anil Belur --- releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml | 8 ++++++++ shell/update-java-alternatives.sh | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml diff --git a/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml b/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml new file mode 100644 index 00000000..ce001792 --- /dev/null +++ b/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml @@ -0,0 +1,8 @@ +--- +prelude: > + Enable support for OpenJDK17. +features: + - | + Add support for the latest version of JDK17 to be used with + lf-update-java-alternatives. This allows job to switch between the + required version of JDK. diff --git a/shell/update-java-alternatives.sh b/shell/update-java-alternatives.sh index 536063b9..39f46991 100644 --- a/shell/update-java-alternatives.sh +++ b/shell/update-java-alternatives.sh @@ -19,6 +19,8 @@ update-java-redhat() { export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" elif [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "12" ]]; then export JAVA_HOME="/usr/lib/jvm/java-12-openjdk" + elif [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "17" ]]; then + export JAVA_HOME="/usr/lib/jvm/java-17-openjdk" else export JAVA_HOME="/usr/lib/jvm/java-1.${SET_JDK_VERSION//[a-zA-Z:-]/}.0-openjdk" fi -- 2.16.6