How many unnamed modules are created in Java 9?

Viewed 3706

I am trying to understand how JPMS works.

From here

The classpath is not completely gone yet. All JARs (modular or not) and classes on the classpath will be contained in the Unnamed Module. Similar to automatic modules, it exports all packages and reads all other modules. But it does not have a name, obviously. For that reason, it cannot be required and read by named application modules. The unnamed module in turn can access all other modules.

Please, note ...on the classpath will be contained in the Unnamed Module. Module is singular.

From here

For compatibility, all code on the classpath is packaged up as a special unnamed module, with no hidden packages and full access to the whole JDK.

Again unnamed module. Module is singular.

Do I understand right that there is always only one unnamed module in JPMS? Does it mean that applications that were developed before Java9 and not updated for Java9 will be loaded as one unnamed module?

2 Answers
Related