From: Anil Belur Date: Wed, 10 Jul 2019 11:17:58 +0000 (+1000) Subject: Set $JAVA_HOME for openjdk12 on CentOS7 X-Git-Tag: v0.40.0~14^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=00ad9c7bd453cdaa3aa46c476af276a1f07a1da3;p=releng%2Fglobal-jjb.git Set $JAVA_HOME for openjdk12 on CentOS7 Issue: RELENG-2202 Change-Id: Ib2a53613bfb3b6f1ee388d2f621356b1cefb185e Signed-off-by: Anil Belur --- 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 index 00000000..8c2985fc --- /dev/null +++ b/releasenotes/notes/update-java-alternatives-for--openjdk12-60889e593b6b7d89.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Enable JAVA_HOME to point to openjdk12 install path for CentOS 7. diff --git a/shell/update-java-alternatives.sh b/shell/update-java-alternatives.sh index 063166de..536063b9 100644 --- a/shell/update-java-alternatives.sh +++ b/shell/update-java-alternatives.sh @@ -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