Due to the new module system, Java 9 does not allow an application by default to see all classes from the JDK, unlike all previous versions of Java. If we try to access some reserved module, we obtain an error like this:module <module-name> does not "opens <package-name>" to unnamed module
.
Everyone knows that we can solve this exception by using the JVM parameters --add-exports
or add-opens
, but what if we have more environments, and we don't want to have to change JVM arguments across these environments?