-
Book Overview & Buying
-
Table Of Contents
Java 11 Cookbook - Second Edition
By :
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.
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: math.util and calculator. We will create modular JARs for both the modules.
mods: javac -d mods --module-source-path . $(find . -name *.java)math.util...
Change the font size
Change margin width
Change background colour