...
There's no straightforward way to silence these warnings. The JVM command line parameter that controls it is --illegal-access=<policy>
(see https://docs.oracle.com/en/java/javase/11/tools/java.html), it is set to permit
by default — warning on first illegal access only per library and class — module (library JAR in our case) — and that is the most liberal option. We can use --add-opens
though. It can entirely open one module — export all its classes — to another. The illegal accesses here
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Applications running on JVM >= 9 run either on class path or module path. Running on class path is like running an application in any JVM < 9 — i.e. bunch of JARs on class path with main class in one (or more) of them — except additional access checks on library JARs that are also modules, which are just console warnings so far. Library JARs that aren't modules yet are turned unnamed modules which basically means that they can't be referenced individually in module linkage. When running on module path, library JARs that aren't modules are turned into automatic modules and it's possible to reference them individually, so you can for example open any module to a single automatic module. See links below for details.
RNode, and as of now probably 99% of all Java applications, runs on class path. Turning RNode into module would require effort I cannot estimate, but it certainly wouldn't bring any fruits at this moments. We can just silence warnings by opening required modules and packages. This effort is tracked in aforementioned ticket.
For details see
- https://en.wikipedia.org/wiki/Java_Platform_Module_System
- https://openjdk.java.net/projects/jigsaw/spec/sotms/
- https://openjdk.java.net/projects/jigsaw/
- https://mreinhold.org/blog/jigsaw-complete
Anchor | ||||
---|---|---|---|---|
|