Fix how Java 8 or 11 version is selected

Change-Id: I6bacdc5dec0c8dec3549fa221dae8ec09c52a2f7
diff --git a/jjb/onos/onos-release-build-verify.sh b/jjb/onos/onos-release-build-verify.sh
index 22898b2..4169af0 100644
--- a/jjb/onos/onos-release-build-verify.sh
+++ b/jjb/onos/onos-release-build-verify.sh
@@ -13,8 +13,7 @@
 if [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ]
 then
     echo Installing OPEN JDK 11
-    sudo update-alternatives --set java  /usr/lib/jvm/java-11-amazon-corretto/bin/java
-    sudo update-alternatives --set javac /usr/lib/jvm/java-11-amazon-corretto/bin/javac
+    sudo update-java-alternatives -s java-11-amazon-corretto
     java -version
 else
     echo Using default JDK