Migrating Applications to Java 9

In the previous chapter, we took a close look at the structure of Java modules as specified by Project Jigsaw and examined how Project Jigsaw was implemented to improve the Java platform. We also reviewed key internal changes to the Java platform with specific focus on the new modular system. We started with a modular primer where we learned about Java 9's modular system in terms of benefits and requirements. Next, we explored how Java 9 introduced modularity to the JDK. This included a look at how the source code was reorganized for Java 9. We also explored the JDK's seven primary tool categories and learned that Java 9 modularity extends to runtime images resulting in more maintainability, better performance, and increased security. The concept of link time was introduced as an optional phase between compile-time and runtime. We concluded the chapter with a look at the Java linker and how Java 9 encapsulates internal APIs.

In this chapter, we will explore how to migrate our existing applications to the Java 9 platform. We will look at both manual and semi-automated migration processes. Java 9 is a major release with numerous changes to the JDK so developers should not be surprised if their Java 8 code no longer works with Java 9. This chapter aims to provide you with insights and processes to get your Java 8 code working with Java 9.

The topics we will cover in this chapter are:

  • Quick review of Project Jigsaw
  • How modules fit into the Java landscape
  • Migration planning
  • Advice from Oracle
  • Useful tools