Module System
A module names the packages it exports and the modules it requires. The platform itself is modular.
OpenJDK JEP 261 (leaves JavaMastery)
Related reading: Modules and SPI
JDK 9 · JSR 379
JDK 9 is the reference implementation of Java SE 9, JSR 379. General availability was 21 September 2017. The module system is the large change. jshell, collection factories, and process-API updates are the everyday ones. The HTTP client in this release is an incubator API, not the standard client.
A module names the packages it exports and the modules it requires. The platform itself is modular.
OpenJDK JEP 261 (leaves JavaMastery)
Related reading: Modules and SPI
Small language follow-ups, including private interface methods, the diamond on anonymous classes, and try-with-resources on effectively final variables.
List.of, Set.of, and Map.of build immutable collections and reject null elements.
OpenJDK JEP 269 (leaves JavaMastery)
Related reading: Collections
Curriculum file: versions4Java9To11Features.java
takeWhile, dropWhile, and a new iterate overload arrive on Stream. The shared example collects with Collectors.toList(), which already existed in Java 8. The whole file still requires Java 11.
Related reading: Streams and Optional
Curriculum file: versions4Java9To11Features.java
ProcessHandle can identify and inspect native processes, including the current one.
An incubator HTTP client ships in jdk.incubator.httpclient. It is not a supported standard API in Java 9.
Standardized in Java 11 by JEP 321 as java.net.http.HttpClient.
OpenJDK JEP 110 (leaves JavaMastery)
Related reading: Networking and HTTP
java.util.concurrent.Flow publishes the reactive-streams interfaces. CompletableFuture also gains more composition methods.
OpenJDK JEP 266 (leaves JavaMastery)
Related reading: Concurrency
G1 becomes the default collector. Collectors that were already deprecated are not the story of this release.
OpenJDK JEP 248 (leaves JavaMastery)
Related reading: JVM and memory
jshell is a read-eval-print loop for Java statements and expressions. It is a tool, not a library you import.
jlink builds a custom runtime image with the modules an application needs. It is part of the module tooling, not a language feature.
OpenJDK JEP 282 (leaves JavaMastery)
Related reading: Modules and SPI
One JAR can contain class files for more than one Java release, so a library can use newer APIs where they exist.
The OpenJDK JDK 9 page lists many more JEPs, including the modular JDK image (JEP 220), compact strings (JEP 254), and the stack-walking API (JEP 259). Those are not separate lessons here.
The module chapter teaches how modules work. This page only records that they became part of the platform in Java 9.
Sources. General availability and the JEP list: OpenJDK JDK 9. JSR 379: Oracle Java SE specifications. OpenJDK JDK 9 (leaves JavaMastery)