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 <vvalderrama@linuxfoundation.org>
--- /dev/null
+---
+fixes:
+ - |
+ Fix JAVA_HOME for openjdk11 on CentOS 7 to use the OpenJDK version installed
+ in /usr/lib/jvm/java-11-openjdk.
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