Java 9 Modules: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
A package can only be accessed from one module. Hierarchical packages are treated as separate, so "java.util" and "java.util.logging" can exist in different modules. Only public fields and methods are accessible in the code of exported packages of other modules. | A package can only be accessed from one module. Hierarchical packages are treated as separate, so "java.util" and "java.util.logging" can exist in different modules. Only public fields and methods are accessible in the code of exported packages of other modules. | ||
==Classpath== | |||
All the code from classpath lives together in the "unnamed" module. | |||
=Organizatorium= | =Organizatorium= | ||
* Classpath and module path is mutually exclusive. | * Classpath and module path is mutually exclusive. |
Revision as of 20:56, 18 May 2021
Internal
TODO
Concepts
Module
A module is a JAR with a module descriptor, available to the JVM on the module path.
Module Path
Package Relationship to Modules
A package can only be accessed from one module. Hierarchical packages are treated as separate, so "java.util" and "java.util.logging" can exist in different modules. Only public fields and methods are accessible in the code of exported packages of other modules.
Classpath
All the code from classpath lives together in the "unnamed" module.
Organizatorium
- Classpath and module path is mutually exclusive.