From 964473c31bfdfa0c9d436510f1608791b49d4c04 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 5 Apr 2019 16:05:07 +0200 Subject: [PATCH] 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 --- shell/update-java-alternatives.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.16.6