Set $JAVA_HOME for openjdk12 on CentOS7 46/16146/1
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 10 Jul 2019 11:17:58 +0000 (21:17 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 10 Jul 2019 11:17:58 +0000 (21:17 +1000)
Issue: RELENG-2202
Change-Id: Ib2a53613bfb3b6f1ee388d2f621356b1cefb185e
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/update-java-alternatives-for--openjdk12-60889e593b6b7d89.yaml [new file with mode: 0644]
shell/update-java-alternatives.sh

diff --git a/releasenotes/notes/update-java-alternatives-for--openjdk12-60889e593b6b7d89.yaml b/releasenotes/notes/update-java-alternatives-for--openjdk12-60889e593b6b7d89.yaml
new file mode 100644 (file)
index 0000000..8c2985f
--- /dev/null
@@ -0,0 +1,4 @@
+---
+features:
+  - |
+    Enable JAVA_HOME to point to openjdk12 install path for CentOS 7.
index 063166d..536063b 100644 (file)
@@ -17,6 +17,8 @@ JAVA_ENV_FILE="/tmp/java.env"
 update-java-redhat() {
     if [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "11" ]]; then
         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"
     else
         export JAVA_HOME="/usr/lib/jvm/java-1.${SET_JDK_VERSION//[a-zA-Z:-]/}.0-openjdk"
     fi