How do you create modules with JDK 9? This talk focuses on the migration of applications and existing code. Alex Buckley presents the first part, describing a top-down migration of your application and Alan Bateman explains a bottom-up migration starting with libraries closest to the JVM.
Alex Buckley demonstrates the migration of a typical application with 3 components: your application Jar file, third party Jar files and the JDK. In Java 9, the JDK will be structured in modules. The benefits are strong encapsulation, restricting the access to modify the module and reliable configuration, allowing modules to be self-contained without the need for a class path. Alex shows the migration of a simple JSON application. He explains in great detail how to define module requirements using Jdep, how to automatic create modules and export them and much more.
Taking the same example of a simple JSON application, Alan Bateman shows how to migrate an application starting with libraries. He follows a similar process of looking into module requirements and exports.
Chapters to help you navigate the video content:
Application migration - top down (1:01)
Running your module application - javac (15:06)
Library migration - bottom up migration (18:09)
Creating runtime images with Jlink (30:20)
You will still be able to use the classpath with Java 9. How the module system and the class path work together was explained in the Introduction to Modular Development blog.
The JDK 9 release is proposed for July 2017. This blog ramps up your knowledge of Java 9, the module system and migration options. This blog is the third in the series, make sure to check the first two:
Key links to bookmark