From: Vanessa Rene Valderrama Date: Wed, 20 Mar 2019 20:15:27 +0000 (-0500) Subject: Fix JAVA_HOME for CentOS7 X-Git-Tag: v0.34.0~1^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=6f13dbb27bb3c97dab91062f414cf2451205a959;p=releng%2Fglobal-jjb.git Fix JAVA_HOME for CentOS7 JAVA_HOME for JDK-11 on CentOS7 is set to /opt/jdk-11 but JDK-11 is installing in /usr/lib/jvm/java-11-openjdk/. This change is to modify JAVA_HOME to use the correct path and install JDK-11 properly. Change-Id: I598a063988a5afea5d6827d0940fdcbd2b83e99a Signed-off-by: Vanessa Rene Valderrama --- diff --git a/releasenotes/notes/fix_openjdk-11_centos7.yaml b/releasenotes/notes/fix_openjdk-11_centos7.yaml new file mode 100644 index 00000000..8e050145 --- /dev/null +++ b/releasenotes/notes/fix_openjdk-11_centos7.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix JAVA_HOME for openjdk11 on CentOS 7 to use the OpenJDK version installed + in /usr/lib/jvm/java-11-openjdk. diff --git a/shell/update-java-alternatives.sh b/shell/update-java-alternatives.sh index f85e2018..8484a711 100644 --- a/shell/update-java-alternatives.sh +++ b/shell/update-java-alternatives.sh @@ -16,9 +16,7 @@ JAVA_ENV_FILE="/tmp/java.env" update-java-redhat() { if [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "11" ]]; then - export JAVA_HOME="/opt/jdk-11" - elif [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "10" ]]; then - export JAVA_HOME="/opt/jdk-10.0.2" + export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" else export JAVA_HOME="/usr/lib/jvm/java-1.${SET_JDK_VERSION//[a-zA-Z:-]/}.0-openjdk" fi