Auto module is a jar we put on the module path. There are many pre-existing libraries that can be used in our application, many of which are not yet modularized. To facilitate migration, we can add the jar file of any library to the module path of the application and then use the package from that jar file. It can become an automatic module implicitly and can be specified in the require directive of the module declaration. The filename of a jar becomes its module name, which must be a valid Java identifier that can be used in the "requires" directive.
AutomaticModules:
<strong>%JAVA_HOME%\java --module-path ./libs:./libs-legacy --module app/com.app.Main</strong>
The above is the detailed content of What are automatic modules in Java 9?. For more information, please follow other related articles on the PHP Chinese website!