Modularity is a very controversial feature that is going to be included in JDK 9 scheduled for release in September 2017. Modularity makes it possible to define interdependency among various packages and to control access to various modules. A module typically “exports” a certain API and some other module “requires” that API. Also, for services, modularity allows for loose coupling between service consumer modules and service provider modules. JDK 9 also provides a linker tool, jlink, which can be used to link a set of modules, along with their transitive dependencies, to create a custom modular run-time image.
Several big corporations, including IBM and other companies, had initially disagreed with the proposed module system for the JDK. However, they have later changed their minds and the module system will eventually be shipped with JDK 9.
JDK modules are based on Project Jigsaw. The primary goals of this Project are to:
https://blogs.oracle.com/java/module-system-in-jdk-9
http://openjdk.java.net/projects/jigsaw/
https://mreinhold.org/blog/jigsaw-module-system