Exploring what modular Java is
Up to this point, we saw code in classes that consists of class fields and methods. Then, we grouped these classes into packages and, finally, as a JAR or WAR file. Modular Java introduces a new grouping called modules. A module is a JAR file but with a module descriptor. There is also an automatic module that has a module name in its manifest file. This feature of Java is called the Java Platform Module System (JPMS).
Up until now, we used Maven to build our applications. Maven is a build tool that downloads any libraries we need and ensures that our code will compile successfully. What it does not do is determine whether all the required external libraries, such as Java itself, are present. Its primary job ends when the code successfully compiles. The JPMS, on the other hand, focuses on the libraries required to successfully run a program. Unlike Maven, JPMS checks that libraries coded as modules are present or will be present when the code runs...