Skip to main content

Java 9: Evolution or Revolution?

Posted on Oct 25, 2017

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.

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.

1. Module System

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.

2. Updated API

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.

3. Reactive Programming

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.

4. HTTP/2 Client

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.

5. Creation of Multi-release Versions

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.

6. Universal API for Images

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.

7. Readability of Exception Processing Construction

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.

8. Testing in the Development Process

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.

9. API for Process Management

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.

10. Security

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.

Conclusion: Should you migrate to Java 9?

YES:

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.

NO:

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.

Are you planning to migrate to Java 9? Do you know how to choose the right Java stack? Need a team of experienced developers to build your solution? Our team would be glad to share expertise and provide services for your business success. Just write to sales@artezio.com and we'll get right back to you!