How Java is Evolving with Simon Ritter - JDK 9 to 13
Tags: java, jdk
Published: 2019-08-15 16:04:14

---
title: How Java is Evolving with Simon Ritter - JDK 9 to 13
published: true
description: In this post I will share my notes on a great talk given by Simon Ritter titled “JDK from 9 to 13 How Java is Evolving with Simon Ritter”.
tags: Java, JDK
cover_image: https://thepracticaldev.s3.amazonaws.com/i/chcaax7pnarzxytazsmw.jpg
---

In this post I will share my notes on a great talk given by Simon Ritter titled “JDK from 9 to 13 How Java is Evolving with Simon Ritter”. Simon Ritter is Deputy CTO of Azul Systems and has been in the field for a long time. The talk was organized by the [Java User Group Campinas](https://twitter.com/soujavaCampinas) and sponsored by [Movile ](https://movile.com/)and [Wavy ](https://wavy.global/)company in Campinas city state of São Paulo, Brazil. The notes below summarize my understanding on the subject talked during the lecture, so let me know whether I made any misunderstanding.

Simon presented an overview of how java is evolving and the main changes since JDK 9 up to know. Java had been changing a lot its binary and the delivery strategy. The JDK 9 from 2 years ago was the last major release with the introduction of about 90 new features, JDK 9 and 10 were intermediate versions where Oracle started to clean upand remove deprecated features. Some of features included on JDK 9 are:

- [Java Platform Module System (JPMS)](https://openjdk.java.net/projects/jigsaw/spec/): Allowed the grouping of packages from the previous version and ended up with 26 main modules for creation of run time specific for you application.
- [JEP 260: Encapsulate Most Internal APIs](https://openjdk.java.net/jeps/260): Encapsulate most of the JDK’s internal APIs by default so that they are inaccessible at compile time, and prepare for a future release in which they will be inaccessible at run time.
- [JEP 282: jlink: The Java Linker](https://openjdk.java.net/jeps/282): Tool that can assemble and optimize a set of modules and their dependencies into a custom run-time image.

The new release model for delivery new versions on every 6 months brings more agility to the development and allow the adoption of new features fast. I will be very happy when cloud providers start to deliver new JDK versions as fast as JDK is released. The Long Term Support (LTS) for the JDK is now eligible every 3 years and the current LTS version is JDK 11, this means that Oracle will delivery fixes to JDK 11 until the [next LTS](https://www.oracle.com/technetwork/java/java-se-support-roadmap.html) release be launched.

The OpenJDK also had evolved to be align with JDK releases, so the OpenJDK 11 and JDK 11 now has the same features and the goals is that boths evolve together. One of the main differences between OpenJDK and JDK is regarding the license model, while JDK 11 and beyond is free only for development and testing environment and you have to pay a Oracle Java SE subscription to use it on production the OpenJDK uses a GPLv2 license with no restriction of use. The JDK 8 remain indefinitely free however without official updates like security patches and bug fixes.

The JDK 10 came with the introduction of cool new features like these one:

- [JEP 286: Local-Variable Type Inference](https://openjdk.java.net/jeps/286): Enhance the Java Language to extend type inference to declarations of local variables with initializers.
- [JEP 307: Parallel Full GC for G1](https://openjdk.java.net/jeps/307): Improve G1 worst-case latencies by making the full GC parallel.
- J[EP 310: Application Class-Data Sharing](https://openjdk.java.net/jeps/310): Improve startup and footprint.
- [JEP 317: Experimental Java-Based JIT Compiler:](https://openjdk.java.net/jeps/317) Enable the Java-based JIT compiler, Graal, to be used as an experimental JIT compiler on the Linux/x64 platform.
- New APIs for Collections, Strings and much more.

The JDK 11 is consider the start point for the new direction that Oracle gave to Java, some of the new features are:

- [JEP 323: Local-Variable Syntax for Lambda Parameters](https://openjdk.java.net/jeps/323): Allow var to be used when declaring the formal parameters of implicitly typed lambda expressions.
- [JEP 330: Launch Single-File Source-Code Programs](https://openjdk.java.net/jeps/330): Enhance the java launcher to run a program supplied as a single file of Java source code.
- [JEP 181: Nest-Based Access Control:](https://openjdk.java.net/jeps/181) Introduce nests, an access-control context that aligns with the existing notion of nested types.
- [JEP 309: Dynamic Class-File Constants: ](https://openjdk.java.net/jeps/309)Extend the Java class-file format to support a new constant-pool form.
- [JEP 318: Epsilon: A No-Op Garbage Collector: ](https://openjdk.java.net/jeps/318)Develop a GC that handles memory allocation but does not implement any actual memory reclamation mechanism.
- [JEP 321: HTTP Client (Standard): ](https://openjdk.java.net/jeps/321)Standardize the incubated HTTP Client API introduced in JDK 9, via JEP 110, and updated in JDK 10.
- [JEP 333: ZGC: A Scalable Low-Latency Garbage Collector: ](https://openjdk.java.net/jeps/333)The Z Garbage Collector, also known as ZGC, is a scalable low-latency garbage collector.
- Inclusion of the a new Predicate, not(Predicate) to allow cool thinks like list.stream().filter(not(String::isEmpty)
- [Removal of APIs](https://dzone.com/articles/apis-to-be-removed-from-java-11) including the ones related with Java EE like java.xml and java.xm.ws.
- And much more…

The JDK 12 started as the first in the new model of deliver every 6 month and it came with nice features as well, a highlight to JEP 346 bellow:

- [JEP 346: Promptly Return Unused Committed Memory from G1](https://openjdk.java.net/jeps/346): Enhance the G1 garbage collector to automatically return Java heap memory to the operating system when idle.
- [JEP 325: Switch Expressions:](https://openjdk.java.net/jeps/325) Extend the switch statement so that it can be used as either a statement or an expression.
- [JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector](https://openjdk.java.net/jeps/189): Add a new garbage collection (GC) algorithm named Shenandoah which reduces GC pause times by doing evacuation work concurrently with the running Java threads.
- [JEP 344: Abortable Mixed Collections for G1](https://openjdk.java.net/jeps/344): Make G1 mixed collections abortable if they might exceed the pause target.
- And much more…

The JDK 13 is coming and here are some features that are planned and cool projects already started:

- [JEP 355: Text Blocks (Preview)](https://openjdk.java.net/jeps/355): Included multi-line string literal that avoids the need for most escape sequences, automatically formats the string in a predictable way, and gives the developer control over format when desired.
- [JEP 354: Switch Expressions (Preview)](https://openjdk.java.net/jeps/354): Extend switch with the inclusion of the yield keyword.
- [Project Valhalla](https://openjdk.java.net/projects/valhalla/): Provide a venue to explore and incubate advanced Java VM and Language feature candidates.
- [Project Loom](https://openjdk.java.net/projects/loom/): Explore and incubate Java VM features and APIs built on top of them for the implementation of lightweight user-mode threads

At the end Simon present the [Zulu JDK](https://www.azul.com/products/zulu-enterprise/), a JDK made for his company as a solution for companies that want keep using JDK 8 and receive secure updates even after the Oracle stops do that.

### Conclusion

It was a great talk, Simon mastered the subject and expose in a object way the main features introduced and how agility the evolving of Java will be in the next years. The model of delivery fast excited me because nice features can be introduced in JDK every 6 months while language become more fun to write and JVM more robust. I wish cloud providers can make this versions available as fast as oracle has released it. Other thing that make me happy was the ability of java to automatically return Java heap memory to the operating system when idle, this is an amazing feature. See my other post here [Automatic Vertical Scaling of the Java Heap.](https://educosta.dev/blog/automatic-vertical-scaling-of-the-java-heap/)

This post was originally released on my [Blog](https://educosta.dev/blog/how-java-is-evolving-with-simon-ritter/). If you have any doubts or questions feel free to drop a comment here or reach me out on Twitter [@educostadev](http://twitter.com/educostadev).