Skip to content

Commit 47d070a

Browse files
authored
Merge pull request #408 from jmtd/OPENJDK-2384-singleton-jdk-alternatives
Openjdk 2384 singleton jdk alternatives
2 parents 9b8a913 + 392e8e7 commit 47d070a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/singleton-jdk/configure.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ fi
1414
# Clean up any java-* packages that have been installed that do not match
1515
# our stated JAVA_VERSION-JAVA_VENDOR (e.g.: 11-openjdk; 1.8.0-openj9)
1616
rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}")
17+
18+
# workaround for <https://issues.redhat.com/browse/RHEL-3437>
19+
# The alternative link groups touched here need to match up with those set in
20+
# modules/jdk/*/configure.sh
21+
_arch="$(uname -i)"
22+
for alt in java javac java_sdk_openjdk jre_openjdk; do
23+
alternatives --set "$alt" "java-${JAVA_VERSION}-${JAVA_VENDOR}.${_arch}"
24+
done

0 commit comments

Comments
 (0)