4 Building modules from source to JAR
This chapter covers
- Project directory structures
- Compiling sources from a single module to class files
- Compiling multiple modules at the same time
- Packaging class files into a modular JAR
Being able to define modules as described in chapter 3 is a good skill to have, but what is it good for without knowing how to turn those source files into modular artifacts (JARs) that can be shipped and executed? This chapter looks into building modules, all the way from organizing sources, to compiling them to class files, and eventually packaging those into modular JARs that can be distributed and executed. Chapter 5 focuses on running and debugging modular applications.
At times we’ll look at the javac
and jar
commands ...
Get The Java Module System now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.