From the course: Nail Your Java Interview

Understand the impact of Jigsaw - Java Tutorial

From the course: Nail Your Java Interview

Start my 1-month free trial

Understand the impact of Jigsaw

- [Instructor] Before Java nine, a JAR could be considered a unit of modularity. It was a single piece that grouped functionality together and had an explicit interface between other JARs. However, it weakly encapsulated the elements within itself. To fix this, Java nine had an epic called project Jigsaw. This introduced modularization and the module system to Java. Project Jigsaw aimed at providing Java developers, with configuration and containment of the technologies built into Java, as well as their own programs. One component that was modularized was the JDK. Instead of using the entire JDK in your application, you can install and use specific components, or specific modules that your application needs. You can scale up or scale down to just the functionality you need from the JDK. This allows you to have a customized JDK for various platforms. From a small computing device, to a dense cloud environment. Furthermore, it enables improved application performance with a lighter artifact. Another important initiative of this umbrella project was encapsulating some of the internal APIs in the JDK. These non-standard APIs, were never meant to be public or maintained. The module system helps encapsulate some of this functionality, while providing reliable configuration through available modules. While this mainly affected internal Java workings, developers can also organize their code into modules as a top level construct. Using module definition files, developers can declare dependencies between modules and allow their JAR to be modularized as well. This makes it easier for developers to construct and maintain libraries as well as larger applications. Jigsaw affected how many of us think of Java artifacts, and how to group components in a Java application. Your interviewer may ask you about Jigsaw. So it's important to understand how it can help improve your applications performance, and scale down your application for smaller devices. If you're interested in learning more about project Jigsaw, and modularization and Java, I encourage you to check out first look Java nine and Java modularization courses, here on LinkedIn learning.

Contents