View Issue Details

IDProjectCategoryView StatusLast Update
0017323CentOS-8javapublic2020-05-04 16:56
Reporterpapa-netcentrix 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version8.1.1911 
Target VersionFixed in Version 
Summary0017323: Java 11 has unfortunately low priority in alternatives database
DescriptionWhen Java 1.8 and Java 11 are both installed on a system, the "alternatives" system always sets Java 1.8 as the default Java to use, even though Java 11 is more current.

I find this to be surprising behavior. It is also unfortunate behavior as Java 1.8 has a TLS handshake negotiation bug that causes it to fail TLS handshakes as a client when negotiating a connection with another CentOS 8 system that uses the OpenSSL library (which is what brought this problem to my attention initially.)
Steps To ReproduceInstall java-11-openjdk-headless.x86_64 (1:11.0.7.10-1.el8_1). If necessary, install java-1.8.0-openjdk-headless.x86_64 (1:1.8.0.252.b09-2.el8_1). Run "alternatives --list" and see that the system has chosen Java 1.8. For good measure, run "alternatives --auto" and see that it still prefers Java 1.8.

Go to /var/lib/alternatives and examine the files there. You will see that Java 1.8 has a priority of 1800252 and that Java 11 has a priority of 1. Alternatives always chooses the package with the highest priority.
Additional InformationWorkarounds include:

- use the alternatives command to manually set Java 11 as the default. This is difficult to automate in a maintainable way.
- stomp on the version number of the Java 11 entries in /var/lib/alternatives with an arbitrarily large priority. More heavy handed, but seems to be easier to automate in a generalized way.

Both of these methods are likely to produce undesirable behavior as newer Java major releases become available.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-05-04 16:56 papa-netcentrix New Issue