diff --git a/modules/singleton-jdk/configure.sh b/modules/singleton-jdk/configure.sh index 0ad9ce4d..07b0eceb 100755 --- a/modules/singleton-jdk/configure.sh +++ b/modules/singleton-jdk/configure.sh @@ -14,3 +14,11 @@ fi # Clean up any java-* packages that have been installed that do not match # our stated JAVA_VERSION-JAVA_VENDOR (e.g.: 11-openjdk; 1.8.0-openj9) rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}") + +# workaround for +# The alternative link groups touched here need to match up with those set in +# modules/jdk/*/configure.sh +_arch="$(uname -i)" +for alt in java javac java_sdk_openjdk jre_openjdk; do + alternatives --set "$alt" "java-${JAVA_VERSION}-${JAVA_VENDOR}.${_arch}" +done