ARM64 support for update-java-alternatives 11/15211/1
authorMartin Klozik <martin.klozik@tieto.com>
Fri, 5 Apr 2019 14:05:07 +0000 (16:05 +0200)
committerMartin Klozik <martin.klozik@tieto.com>
Fri, 5 Apr 2019 14:05:07 +0000 (16:05 +0200)
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 <martin.klozik@tieto.com>
shell/update-java-alternatives.sh

index 8484a71..69bf019 100644 (file)
@@ -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