Should I update Java 8 to Java 9 in 2018
Many long waited features were planned for Java 9 in 2016 - better support for huge heaps, G1 - a different default garbage collector, better native code integration and a self-tuning JVM. Release of Java 9 was rescheduled several times and changed finally to be available on September 21, 2017.
In this post:
- Migration plan for Java 9
- What's new in Java 9
- Conclusion
Update May 2018 - Java 10 was released in March 2018 with several interesting features like - local variable type inference. You can read more here:
Java 10 what's new and install it on Ubuntu
If you want to play with jshell - the interactive java console - you can check here:
If you are in the java ecosystem then you are asking yourself should I upgrade to Java 9 since the official support for non commercial users should end soon. This means that you and your users will not receive important and security updates once the official support for Java 8 is finished. For the commercial users the support for java 8 is planned up to 2025.
You can check this information on this page:
Oracle Lifetime Support Policy on page 13 :
The information on the image is for oracle customers. For non oracle customers situation is described here:
End of Public Updates for Oracle JDK 8
Migration plan for Java 9
From all the above you can consider moving to Java 9 or at least to start preparation. If Java 9 is released as per schedule on 2018 September then you have roughly 7 months to prepare your transition.
You can be sure that the official support for Java 8 will not be stopped before the Java 9 is released. If you are maintaining applications then ensure compatibility with Java 9. Another option is to ask your customers to subscribe for commercial license if they don't want to switch to Java 9 when Java 8 reaches end-of-life.
A change in the schedule for Java 9 release will cause an extension of Java 8's support, for sure. If you have an incompatibility or other issues with upgrade, then your customers need to update the application before switching.
What's new in Java 9
Many changes are planned for Java for this year. One of this changes is time-based release. Oracle decided to switch to a Long Term Support (LTS) model. Some JDK versions will be considered as LTS releases, which means that they will be supported for three years. About the rest releases (intermediate) will be named as feature releases and it'll be supported only for six months. The start of the process starts with JDK 8 which is classified as LTS release (next LTS is JDK 11, planned for 2018). This means that an overlap for updates between releases could not happened anymore.
Java is known with three core features: Security, Stability and 0 cost. Now the picture could be change, or at least the way you should deal with migrations between the new release. The change is that now that these 3 java properties could end with java 8 the way we know them. If you need to have stability and security, it could cost you money. If you want security and zero cost with next java version you may not have access to all security updates. The same apply for the last couple stability and 0 cost since you will need to go for new versions earlier.
Conclusion
Of course the things can be change in next several months so it's better to be informed and ready when the time for new version of Java come. Have in mind that Java 9 comes with new features that could be very important for your applications:
- jshell - Shell, a read-eval-print loop (REPL) , executing code could be a lot easier in java 9
- Modularity - new module system called Java Platform Module System (JPMS)
- HTTP 2.0 Client Full Support
- new default garbage collector - G1
- Microbenchmarks - new ways for performance tuning.