You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/libexec/java_home is always called with 1.<version>+ but that is wrong.
With Java 8 and Java 11 installed.
If you call /usr/libexec/java_home -v 1.11 it tells you "Unable to find any JVMs matching version 1.11", but nevertheless returns the latest installed version 11.
If you call /usr/libexec/java_home -v 11 it properly returns the latest installed version 11.
There is no too big problem, as with 1.12+ it considers 11 newer than 1.12 and returns it, with 12+ it complains that no JVM is found and returns the latest installed version 11 which is then ruled out by the manual major version comparison. It might just be cleaner to call the tool properly.
The text was updated successfully, but these errors were encountered:
/usr/libexec/java_home
is always called with1.<version>+
but that is wrong.With Java 8 and Java 11 installed.
If you call
/usr/libexec/java_home -v 1.11
it tells you "Unable to find any JVMs matching version 1.11", but nevertheless returns the latest installed version 11.If you call
/usr/libexec/java_home -v 11
it properly returns the latest installed version 11.There is no too big problem, as with
1.12+
it considers11
newer than1.12
and returns it, with12+
it complains that no JVM is found and returns the latest installed version 11 which is then ruled out by the manual major version comparison. It might just be cleaner to call the tool properly.The text was updated successfully, but these errors were encountered: