O'Reilly logo

Modular Programming in Java 9 by Koushik Kothagal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required