Home >Java >javaTutorial >What is the importance of module descriptors in modules in Java 9?
A module is organized in the form of package and static resources (such as property files or others) A collection of classes. It provides the external environment with all the information needed to use the module. The module descriptor is the key source of the module system, it is the compiled version of the module declaration, located in the root directory of the module directory hierarchy named "module-info.java" in the file.
A module describes itself through the following module declaration
<strong>module com.myproject.module1 { requires com.myproject.module2; exports com.myproject.project1; exports com.myproject.project2; }</strong>
The following are descriptions of some module descriptors:
The above is the detailed content of What is the importance of module descriptors in modules in Java 9?. For more information, please follow other related articles on the PHP Chinese website!