Advanced Modular Development

From Oracle Blogs | The Java Source
March 16, 2017 - 9:33am
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)  Summary (33:09)  Q&A (35:42)  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:  Gear up for Java 9  Introduction to Modular Development   Key links to bookmark JEP 220: Modular run-time images  JEP 282: The Java Linker (jlink)  JEP 260: Encapsulate Most Internal APIs   JDeps tool Java 9 early access JavaOne Sessions about JDK 9 this year OpenJDK project     


Continue reading this article »