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

Module resolution process

Before we get into the details of the linking process and what it can do for us, let's understand an important step that happens every time you compile and execute a modular Java application. This is a step called module resolution.

Traditionally (pre-Java 9), the Java compiler and Java runtime would to look at a set of folders and JAR files that form the classpath. The classpath is a configurable option that you pass to the compiler during compilation and to the runtimes during execution. In order to have any class file be under the purview of the compiler or runtime, you'd need to first place it in the classpath. Once it's there, every Java type is available for the compiler or the runtime.

Things are different ...

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