In this article, we review the top 10 new functions of Java 9, their advantages and disadvantages, and discuss whether Java 9 should be considered “revolutionary,” as they say in Oracle.
Almost 9 years after the start of the development of the modular variant of the programming language, Oracle is getting ready to release Java 9. Developing Java 9 was a massive undertaking and will have a significant impact on the industry. Why? Because this “modular” version makes fundamental changes in the way Java has worked since version 1.0.
Advantages: The main change in Java 9 is that it is now a module system with a modular JDK, modular source code, and modular run-time images. Internal APIs are also hidden. The module system creates more opportunities for the development of projects that deal with distributed data processing. For example, the new Java 9 can be applied for building IoT solutions and platforms where it is necessary to process various data concurrently. Java modules now also make methods public inside a module (for developers) and restrict access for common users.
Disadvantages: After the Java 9 release, previous versions of Java will no longer be supported, and clients will have to spend time and resources on migration. If a project is still in its development phase, it won’t be too difficult, but migration could be a serious problem for other solutions. The problem of interdependency of program products and libraries has not been solved yet, making installing new products and uninstalling old ones difficult.
Advantages: An updated API will be introduced in Java 9 that will contain several new classes and methods for conveniently controlling system processes. New interfaces will also be added to the Process API: java.lang.ProcessHandle and java.lang.ProcessHandle.Info.
Disadvantages: The updated API is a simple enhancement that can be called evolutionary. In the previous versions, these interfaces were easily substituted by others. Now it has become more convenient, but not to such an extent that it can be considered an important update.
Advantages: The Java SE 9 Reactive Streams API will allow implementing asynchronous, scalable, and parallel apps with Java. The following APIs will be introduced:
java.util.concurrent.Flow;
java.util.concurrent.Flow.Publisher;
java.util.concurrent.Flow.Subscriber; and
java.util.concurrent.Flow.Processor.
Disadvantages: None.
Advantages: Full-fledged support of the HTTP/2 and WebSocket protocols will be introduced in Java 9. For this purpose, a special API has been developed (available in the java.net.http package) that supports both synchronous and asynchronous modes.
Disadvantages: Currently, the use of HTTP/2 presents some challenges; even very popular services have been incorrectly supported.
Advantages: The new Java 9 allows creating multi-release files in which it is possible to use the code from the previous Java versions. This can be a useful solution for projects that are difficult to migrate to a modular platform.
Disadvantages: Introduction of a tool for building multi-release files points to a problem with backward compatibility. This is Oracle’s attempt to justify the fact that Java 9 doesn’t support Java 8 and Java 7.
Advantages: The interface MultiResolutionImage, which is available in the packet java.awt.image, will enable processing images with different resolution.
Disadvantages: Java has always had an API for images. This is an evolutionary improvement that takes into account screens with different resolution.
Advantages: Java 9 contains language enhancements that help increase code readability. It greatly facilitates developer collaboration and helps make testing of program solutions simple and understandable.
Disadvantages: We could find no innovations in this improvement. Everyone expects new technological opportunities from Java 9, not possibilities to optimize a program code visually.
Advantages: Compared to previous versions, Java SE 9 provides better opportunities for bug fixing during development. It definitely reduces testing time and helps improve development quality.
Disadvantages: None.
Advantages:Previous versions of Java had some restrictions on operation system management. For instance, it was necessary either to get access to the native code or use a workaround. Moreover, different program platforms required different solutions. With the release of Java 9, process management will become easy and universal.
Disadvantages: Java 9 will have challenges with reverse compatibility.
Advantages: In Java 9, all updates will be clearly classified and split. For example, security updates will occur separately from other large or secondary updates.
Disadvantages: This improvement doesn’t refer to project security on Java 9, but to a split mechanism of the software tool update.
If you have a product in a rework or development phase, then migration to Java is the right investment. By the time your product is released, it will operate on the supported Java version. Keep in mind, however, that it will become increasingly difficult to find software engineers who will develop on previous versions of Java.
We believe Java 9 has insufficient innovations to justify a full-fledged numbered version (new release 9.0) and is more “evolutionary” than “revolutionary.” Unfortunately, Java 9 is not backwards compatible, and previous versions will no longer be supported. Consequently, clients will have to spend time and resources on migration. All features and enhancements could more easily have been introduced in a simple supplement to Java 8.