Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
serverSystem JIRA
serverId50130123-f232-3df4-bccb-c16e7d83cd3e
keyCORE-1438
are to internal JDK APIs . We could then so we can just open JDK to problematic modules. Most, if not all, of libraries we use don't support modularity and I'm not sure how the new JVM treats old world where there's just bunch of JARs on CLASSPATH. There was some proposal on Automatic Modules that would turn JARs into modules, but I'm not sure how the development has evolvedmodules.

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

Anchor
modulepath
modulepath
Information about transitioning from class path to module path: