Feat: Add support for OpenJDK17 44/69544/1 v0.73.0
authorAnil Belur <abelur@linuxfoundation.org>
Thu, 20 Jan 2022 06:45:06 +0000 (16:45 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 20 Jan 2022 06:45:06 +0000 (16:45 +1000)
Change-Id: Ic6369e120cc256d081ebdd66c5d0d154c86fc73b
Issue-ID: RELENG-4097
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml [new file with mode: 0644]
shell/update-java-alternatives.sh

diff --git a/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml b/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml
new file mode 100644 (file)
index 0000000..ce00179
--- /dev/null
@@ -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.
index 536063b..39f4699 100644 (file)
@@ -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