28 August 2024

I found myself asking myself the question, "What's every new feature Java has introduced since the last time I really cared about new Java language features?", and didn't find an easy answer via Google. So, I decided to create that list.

Note that most JDK releases are a combination of new language features, new library features (and by libraries I mean the modules that ship with the JDK), and sometimes new virtual machine features to support either of those two. In the list below, I do my best to categorize which features apply where. I'm also going to elide out anything that seems relatively trivial or is a Preview feature in the release.


The full list, as given by the OpenJDK pages, are below.

The LTS-marked releases are the Oracle Long-Term Support releases.

JDK 9

JDK 10

JDK 11 LTS

JDK 12

JDK 13

JDK 14

JDK 15

JDK 16

JDK 17 LTS

JDK 18

JDK 19

JDK 20

JDK 21

JDK 22


These are the "diffs" list given by the OpenJDK pages on each of the LTS release pages. In essence, these are rollups from one LTS release to the next.

JDK 11 -> 17

Additions

403: Strongly Encapsulate JDK Internals (17)
390: Warnings for Value-Based Classes (16)

HotSpot JVM

386: Alpine Linux Port (16)
391: macOS/AArch64 Port (17)
340: One AArch64 Port, Not Two (12)
388: Windows/AArch64 Port (16)

Flight Recorder

349: JFR Event Streaming (14)

Garbage Collectors

344: Abortable Mixed Collections for G1 (12)
345: NUMA-Aware Memory Allocation for G1 (14)
346: Promptly Return Unused Committed Memory from G1 (12)
379: Shenandoah: A Low-Pause-Time Garbage Collector (15)
377: ZGC: A Scalable Low-Latency Garbage Collector (15)
376: ZGC: Concurrent Thread-Stack Processing (16)

Run-Time System

341: Default CDS Archives (12)
350: Dynamic CDS Archives (13)
387: Elastic Metaspace (16)
358: Helpful NullPointerExceptions (14)

Language

394: Pattern Matching for instanceof (16)
395: Records (16)
306: Restore Always-Strict Floating-Point Semantics (17)
409: Sealed Classes (17)
361: Switch Expressions (14)
378: Text Blocks (15)

Libraries

2D Graphics

382: New macOS Rendering Pipeline (17)

Cryptography

339: Edwards-Curve Digital Signature Algorithm (EdDSA) (15)

I/O

352: Non-Volatile Mapped Byte Buffers (14)
380: Unix-Domain Socket Channels (16)

Networking

373: Reimplement the Legacy DatagramSocket API (15)
353: Reimplement the Legacy Socket API (13)

Reflection & Method Handles

371: Hidden Classes (15)
334: JVM Constants API (12)

Serialization

415: Context-Specific Deserialization Filters (17)

Utilities

356: Enhanced Pseudo-Random Number Generators (17)

Tools

392: Packaging Tool (16)

Preview & incubating

Language

406: Pattern Matching for switch (Preview) (17)

Libraries

412: Foreign Function & Memory API (Incubator) (17)
414: Vector API (Second Incubator) (17)

Deprecations

HotSpot JVM

374: Deprecate and Disable Biased Locking (15)
366: Deprecate the ParallelScavenge + SerialOld GC Combination (14)

Libraries

398: Deprecate the Applet API for Removal (17)
411: Deprecate the Security Manager for Removal (17)

Removals

HotSpot JVM

363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector (14)
410: Remove the Experimental AOT and JIT Compiler (17)
381: Remove the Solaris and SPARC Ports (15)

Libraries

407: Remove RMI Activation (17)
372: Remove the Nashorn JavaScript Engine (15)

Tools

367: Remove the Pack200 Tools and API (14)

JDK 17 -> 21

Additions

HotSpot JVM

422: Linux/RISC-V Port (19)

Garbage Collectors

439: Generational ZGC (21)

Serviceability

451: Prepare to Disallow the Dynamic Loading of Agents (21)

Language

441: Pattern Matching for switch (21)
440: Record Patterns (21)

Libraries

444: Virtual Threads (21)

Collections

431: Sequenced Collections (21)

Cryptography

452: Key Encapsulation Mechanism API (21)

I/O

400: UTF-8 by Default (18)

Networking

418: Internet-Address Resolution SPI (18)
408: Simple Web Server (18)

Reflection & Method Handles

416: Reimplement Core Reflection with Method Handles (18)

Tools

JavaDoc

413: Code Snippets in Java API Documentation (18)

Preview & Incubating

Language

430: String Templates (Preview) (21)
445: Unnamed Classes and Instance Main Methods (Preview) (21)
443: Unnamed Patterns and Variables (Preview) (21)

Libraries

442: Foreign Function & Memory API (Third Preview) (21)
446: Scoped Values (Preview) (21)
453: Structured Concurrency (Preview) (21)
448: Vector API (Sixth Incubator) (21)

Deprecations

HotSpot JVM

449: Deprecate the Windows 32-bit x86 Port for Removal (21)

Libraries

421: Deprecate Finalization for Removal (18)


Tags: java   jvm   language  

Last modified 28 August 2024