Skip to content

Access to compiler internal APIs will fail starting with JDK 16 #222

@eamonnmcmanus

Description

@eamonnmcmanus

JDK 16 will change the default for the --illegal-access flag from permit to deny. This means that, by default, compile-testing tests will fail with messages like this:

class com.google.testing.compile.Parser (in unnamed module @0x4114d843) cannot access class
com.sun.tools.javac.api.JavacTool (in module jdk.compiler) because module jdk.compiler does not export
com.sun.tools.javac.api to unnamed module @0x4114d843

That can be worked around either by explicitly specifying, on the command line of the JVM running the tests, either --illegal-access=permit or --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED. We should document that, and perhaps later find a way to make it unnecessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3type=defectBug, not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions