Learn all the module system basics in this tutorial: how to declare modules with module-info.java, compile, package, and launch them and what role the module path and module graph play.
Java Module System
The Java Platform Module System (JPMS), developed under Project Jigsaw and first shipped with Java 9 brings modularity to the Java platform and ecosystem. With it come strong encapsulation, reliable configuration, improved security, and better performance. But it also brings migration challenges, which might break your code and your tools.
To get started try the hands-on guide and from there explore other articles tagged with JPMS. For a thorough introduction including advanced features and a migration guide, get my book The Java 9 Module System.
If your company is currently planing a migration, you can hire me for on-site training or to assist you in your efforts.
Get your code running on the Java 9 Module System with the command line options –add-exports, –add-opens, –add-modules, –add-reads, and –patch-module.
Migrating to Java 9 is no walk in the park, but it’s not intractable either. If you know how to fix these seven most common problems, you’ll be able to power through and make your project Java 9 compatible.
JDeps is a dependency analysis tool for Java bytecode, i.e. class files and JARs. This primer teaches you how to use filters, aggregate results, and create diagrams.
The module system allows optional dependencies with the ‘requires static’ clause. Module required this way are accessible at compile time but can be absent at run time.
In Java 9 a module must read another to be able to use its API. With implied readability a third module passes the dependency on, allowing the first to read the second without explicitly depending on it.