This chapter covers:
- launching a modular application by specifying an initial module
- loading resources from modules
- validating modules, sets of modules, and module graphs
- reducing and listing the universe of observable modules
- debugging a modular application with logging
Navigation
With modules defined, compiled, and packaged into modular JARs as explained in chapters 3 and 4, it is finally time to power up the JVM and run applications with the java
command (5.1). This gives us the opportunity to discuss a run-time related concept, namely how to load resources from modules (5.2). Sooner or later things will go wrong, though, so we also look into debugging a module configuration with a variety of command line options (5.3).
By the end of the chapter you will be able to launch an application made up of modules. Beyond that you will have a firm understanding of how the module system processes a given configuration and how that can be observed through logging and other diagnostic tools.
This also finishes part one of the book, which teaches everything you need to know to write, compile, and run simple modular applications. It lays the groundwork for the more advanced features that parts 2 and 3 are going to look into, chief among them those that support a gradual migration to the module system.