O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

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

Top-down migration

The other technique for migration is the top-down migration. In this approach, we start with the root JAR in the dependency graph of the JARs.

JARs indicate a code base. We have assumed that the code base is available in the form of JARs and hence the dependency graph which we get has nodes which are JARs. 

Modularizing the root of the dependency graph would mean that all other JARs on which this root depends have to be modular. Otherwise, this modular root cannot declare a dependency on unnamed modules. Let's consider the example non-modular application we introduced in our previous recipe. The dependency graph looks something like:

We extensively make use of automatic modules in top-down migration. Automatic modules ...

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