Java Platform Module System
Introduces a new kind of Java programing component, the module, which is a named, self-describing collection of code and data. This module system:
• Introduces a new optional phase, link time, which is in-between compile time and run time, during which a set of modules can be assembled and optimized into a custom runtime image; see the jlink tool in Java Platform, Standard Edition Tools Reference.
• Adds options to the tools javac, jlink, and java where you can specify module paths, which locate definitions of modules.
• Introduces the modular JAR file, which is a JAR file with a module-info.class file in its root directory.
• Introduces the JMOD format, which is a packaging format similar to JAR except it can include native code and configuration files; see the jmod tool.
The JDK itself has been divided into a set of modules. This change:
• Enables you to combine the JDK’s modules into a variety of configurations, including:
- Configurations corresponding to the JRE and the JDK.
- Configurations roughly equivalent in content to each of the Compact Profiles defined in Java SE 8.
- Custom configurations that contain only a specified set of modules and their required modules.
• Restructures the JDK and JRE runtime images to accommodate modules and improve performance, security, and maintainability.
• Defines a new URI scheme for naming modules, classes, and resources stored in a runtime image without revealing the internal structure or format of the image.
• Removes the endorsed-standards override mechanism and the extension mechanism.
• Removes rt.jar and tools.jar from the Java runtime image.
• Makes most of the JDK’s internal APIs inaccessible by default but leaves a few critical, widely used internal APIs accessible until supported replacements exist for all or most of their functionality.