Java 9 at 20,000 feet
You might be asking yourself--isn't Java 9 just a maintenance release with a set of features that did not make it into Java 8? There is plenty of new stuff in Java 9 that makes it a distinct version in its own right.
Inarguably, the modularization of the Java platform (developed as part of project Jigsaw) is the biggest piece of work that makes it successfully in Java 9. Initially planned for Java 8, but postponed, project Jigsaw is also one of the main reasons why the final release of Java 9 was further postponed. Jigsaw also introduces a few notable changes to the Java platform and is one of the reasons Java 9 is considered a major release. We will explore these features in detail in the subsequent chapters.
The JCP (Java Community Process) provides the mechanisms to turn a set of feature proposals (also known as Java Enhancement Proposals or JEPs) into formal specifications that provide the basis to extend the platform with new functionality. Java 9 is no different in that regard. Apart from the Jigsaw-related Java enhancement proposals, there is a long list of other enhancements that made it in Java 9. Throughout this book, we will discuss the various features in terms of logical groups based on the corresponding enhancement proposals, including the following:
- The Java Shell (also called JShell)--an interactive shell for the Java platform
- New APIs to work with operating system processes in a portable manner
- The Garbage-first (G1) garbage collector introduced in Java 7 is made the default garbage collector in Java 9
- Adding the Java Microbenchmark Harness (JMH) tool that can be used to run performance benchmarks against Java applications is included as part of the Java distribution
- Support for the HTTP 2.0 and WebSocket standards by means of a new client API
- Concurrency enhancements among which is the definition of the
Flow
class, which describes an interface for the reactive streams specification in the Java platform
Some of the initial proposals that were accepted for release 9 did not make it there and were postponed for a later release, along with other interesting things that developers may expect in the future.
You can download the JDK 9 distribution for your system from http://www.oracle.com/technetwork/java/javase/downloads/index.html, if you are eager to get your hands dirty before trying to move through the other chapters and experimenting with the newly introduced samples and concepts.