Skip to content

Set Java 17 as system-wide default version

Adam Cohen requested to merge set-java-17-as-system-wide-default-version into master

What does this MR do?

Java 17 was set as the default version in Remove JDK 8 support out of the box (!138 - merged) in this line, however, the system-wide default version of Java was still set at 11, because the .tool-versions file listed adoptopenjdk-11.0.14+101 as the first entry, thereby making it the default version.

This means that the Java version would only be set to 17 if the analyzer is used, whereas if you simply invoke java --version from the commandline and don't use the analyzer, then Java 11 will be used. This results in test failures like this one and possibly this one.

This MR moves adoptopenjdk-17.0.2+8 to the front of the list in the .tool-versions file so that it becomes the system-wide default Java version. This provides a sensible default, since it's confusing to have the Java version set to 17 when using the analyzer, but default to 11 if the analyzer is not used - it should be set to 17 in both cases.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Lucas Charles

Merge request reports