Skip to content

Building a Java 8 toolchain project fails using JDK 9+ as JAVA_HOME #3244

@MNeuling

Description

@MNeuling

Affected version

3.5.4

Bug description

Surefire adds the --add-opens option, which is not supported by Java 8, to the Java command when Java 9 or later is used as the JAVA_HOME directory.
Command was cmd.exe /X /C ""C:\Program Files\Java\openjdk\j9\jdk8u472-b08\bin\java.exe" --add-opens java.base/java.lang=ALL-UNNAMED --enable-native-access=ALL-UNNAMED ....
When using JDK 8 as the JAVA_HOME directory, everything works fine because the --add-opens option is not used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions