Compiling modules into a class is good, but it is not suitable for sharing binaries and deployment. JARs are better formats for sharing and deployment. We can package the compiled module into JARs, and the JARs that contain module-info.class at its top level are called modular JARs. In this recipe, we will look at how to create modular JARs, and we'll also look at how to execute the application, which is composed of multiple modular JARs.
Creating a modular JAR
Getting ready
We have seen and created a simple modular application in the Creating a simpler modular application recipe. In order to build a modular JAR, we will make use of the sample code available at Chapter03/3_modular_jar. This sample code contains two modules...