3 ms·
Lots of noise here about what it actually consists of. This blog post is a good overview[1] > Creating a module is relatively simple however. A module is typic
by le-mark 9y ago
Lots of noise here about what it actually consists of. This blog post is a good overview[1]
> Creating a module is relatively simple however. A module is typically just a jar file that has a module-info.class file at the root - known as a modular jar file. And that file is created from a module-info.java file in your sourcebase (see below for more details).
> Using a modular jar file involves adding the jar file to the modulepath instead of the classpath. If a modular jar file is on the classpath, it will not act as a module at all, and the module-info.class will be ignored. As such, while a modular jar file on the modulepath will have hidden packages enforced by the JVM, a modular jar file on the classpath will not have hidden packages at all.
[1] http://blog.joda.org/2017/04/java-9-modules-jpms-basics.html http://blog.joda.org/2017/04/java-9-modules-jpms-basics.html