Creating a module

Here are the steps to create a module in Java 9. Before you start with step 1, I should mention an obvious starting point--step 0: Know what the module's purpose is. Before you begin creating a module, you should have a clear idea of what the module is for. Remember the important tenet of modular development here! Rather than having one large code base for your application, you instead break the problem down into reusable subprojects. Think reusable libraries. The main difference is that rather than the libraries just being separate JARs that are nothing more than a collection of Java packages and types, we are leveraging the concept of Java modules to group those packages and types:

  1. Assign a module name: The first step ...

Get Modular Programming in Java 9 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.