From 00ad9c7bd453cdaa3aa46c476af276a1f07a1da3 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 10 Jul 2019 21:17:58 +1000 Subject: [PATCH] Set $JAVA_HOME for openjdk12 on CentOS7 Issue: RELENG-2202 Change-Id: Ib2a53613bfb3b6f1ee388d2f621356b1cefb185e Signed-off-by: Anil Belur --- .../update-java-alternatives-for--openjdk12-60889e593b6b7d89.yaml | 4 ++++ shell/update-java-alternatives.sh | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 releasenotes/notes/update-java-alternatives-for--openjdk12-60889e593b6b7d89.yaml 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 -- 2.16.6