- Java 9:Building Robust Modular Applications
- Dr. Edward Lavieri Peter Verhas Jason Lee
- 127字
- 2025-04-04 17:08:34
JDK source code reorganized
In a previous section, you learned that the pre-Java 9 source code organization schema was as follows:
source code / [shared, OS-specific] / [classes / native] / Java API
package name / [.file extension]
In Java 9, we have a new modular schema. That schema follows:
source code / module / [shared, OS-specific] / [classes / native /
configuration] / [ package / include / library ] /
[.file extension]
There are a few differences in the new schema, most notably the module name. After the shared or OS-specific directory, there is either the classes directory, the native directory for C or C++ source files, or a configuration directory. This seemingly rudimentary organization schema changes results in a much more maintainable code base.