From: Martin Klozik Date: Fri, 5 Apr 2019 14:05:07 +0000 (+0200) Subject: ARM64 support for update-java-alternatives X-Git-Tag: v0.36.0~8 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F15211%2F1;p=releng%2Fglobal-jjb.git ARM64 support for update-java-alternatives Java paths at Ubuntu contain host CPU architecture signature. Script was updated to correctly detect architecture by dpdk. Change-Id: I77c4aba1d600373edff283b6b85837fccda3af34 Signed-off-by: Martin Klozik --- diff --git a/shell/update-java-alternatives.sh b/shell/update-java-alternatives.sh index 8484a711..69bf0195 100644 --- a/shell/update-java-alternatives.sh +++ b/shell/update-java-alternatives.sh @@ -30,7 +30,8 @@ update-java-redhat() { } update-java-ubuntu() { - export JAVA_HOME="/usr/lib/jvm/java-${SET_JDK_VERSION//[a-zA-Z:-]/}-openjdk-amd64" + HOST_ARCH=$(dpkg --print-architecture) + export JAVA_HOME="/usr/lib/jvm/java-${SET_JDK_VERSION//[a-zA-Z:-]/}-openjdk-${HOST_ARCH}" sudo /usr/bin/update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 1 sudo /usr/bin/update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 1 sudo /usr/bin/update-alternatives --install /usr/lib/jvm/java-openjdk java_sdk_openjdk "${JAVA_HOME}" 1