What system modules are on the way to the module by default?

When I run the application through java -cp(without --add-modulesor --limit-modules), some Java system modules are observed, while others are not.

For example, all modules java.secan be observed. All modules are java.se.eenot observed. I know that modules are javafx.*observable. jdk.unsupportedand are jdk.shellalso observed.

So, is my assumption correct: if no tags are specified --add-modulesand --limit-modules, does the set of monitored system modules consist of all system modules except java.se.ee?

Is there a reliable way to find out the exact list of system modules that can be observed by default? I know that there is an option --list-modules, but it lists all the modules, including java.se.ee.

+6
source share
1 answer

So, is my assumption correct: if the -add-modules and -limit-modules modules are not specified, the set of monitored system modules consists of all system modules except java.se.ee?

In short, yes, that's right.

The default set of modules included with Java 9 is known as root modules . Per JEP 261 , the default set of root modules is defined as:

  • The java.se module is the root if it exists. If it does not exist, then every java. * The module on the path of the update module or among system modules that exports at least one package without qualification is the root.

  • -java. * , , .

, java.se: enter image description here (: Java 9 javadoc)

java.se, java.se.ee , , :

java.se
java.activation
java.annotations.common
java.corba
java.transaction
java.xml.bind
java.xml.ws

, ? , -list-modules, , java.se.ee.

. Java 9 , :

  • (.. JDK)
  • --limit-modules

, java.se.ee .

, , ? . .

+7

Source: https://habr.com/ru/post/1017352/