Skip to content

Commit

Permalink
Merge pull request #407 from jmtd/OPENJDK-2372-singleton-jdk-alternat…
Browse files Browse the repository at this point in the history
…ives

[OPENJDK-2372] singleton-jdk: force-set more java alternatives
  • Loading branch information
jmtd authored Nov 13, 2023
2 parents 8df034d + 0bd481a commit f96732b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/singleton-jdk/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ fi
# 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 https://bugzilla.redhat.com/show_bug.cgi?id=2089626
alternatives --set java "java-${JAVA_VERSION}-${JAVA_VENDOR}.$(uname -m)"
# workaround for <https://issues.redhat.com/browse/RHEL-3437>
# 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

0 comments on commit f96732b

Please sign in to comment.