Chapter 12. Java Platform Modules
In this chapter, we will provide a basic introduction to the Java Platform Modules System (JPMS). However, this is a large, complex subject—interested readers may well require a more in-depth reference, such as Java 9 Modularity by Sander Mak and Paul Bakker (O’Reilly).
Modules, a relatively advanced feature, are primarily about packaging and deploying entire applications and their dependencies. They were added to the platform roughly 20 years after the first version of Java and so can be seen as orthogonal to the rest of the language syntax.
Java’s strong promotion of backwards compatibility also plays a role here, as non-modular applications must continue to run. This has led the architects and stewards of the Java platform to adopt a pragmatic view of the necessity of teams to adopt modules.
There is no need to switch to modules.
There has never been a need to switch to modules.
Java 9 and later releases support traditional JAR files on the traditional classpath, via the concept of the unnamed module, and will likely do so until the heat death of the universe.
Whether to start using modules is entirely up to you.
Mark Reinhold https://oreil.ly/4RjDH
Due to the advanced nature of modules, this chapter assumes you are familiar with a modern Java build tool, such as Gradle or Maven.
If you are new to Java, you can safely ignore references to those tools and just read the chapter to get a first, high-level overview of JPMS. It is not necessary ...
Get Java in a Nutshell, 8th Edition 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.