Java SE 14 ( JSR 389)
Final Release Specification
Iris Clark & Brian Goetz
2020/3/4 22:06 -0800 [e3cfac179cd6]

This Specification defines version 14 of the Java Platform, Standard Edition (“Java SE 14”). The Reference Implementation of this Specification is the Java Development Kit, version 14 (“JDK 14”).

4Component JSR Specifications
7APIs removed
8APIs proposed for removal
A1Complete API Specification
A2API Specification differences
A3Java Language & Virtual Machine Specifications
A4Java Object Serialization Specification

This release continues the evolution of the Platform to ensure the broadest possible success of the core Java technology. It standardizes switch expressions, previews several other language features, and removes the Pack200 API.


This document directly specifies API features, enhancements, clarifications, and bug fixes. It also specifies features by reference to other Specifications which are revised in Maintenance Releases of existing JSRs. The specifications of these changes are contained in two accompanying documents: Annex 1 is the complete Java SE 14 API Specification and Annex 2 is an annotated API specification showing the exact differences relative to Java SE 13. Informative background for these changes may be found in the list of approved Change Specification Requests for this release.

This Specification includes the Java SE 14 Editions of The Java Language Specification and The Java Virtual Machine Specification in Annex 3. The Java SE 14 Editions contain all corrections and clarifications made since the Java SE 13 Editions, as well as additions for new features. Annex 3 also presents changes to The Java Language Specification and The Java Virtual Machine Specification in connection with preview features in Java SE 14.

This Specification includes the Java SE 14 Edition of the Java Object Serialization Specification in Annex 4. Annex 4 also presents changes to the Java Object Serialization Specification in connection with preview features in Java SE 14.

This Specification removes the Pack200 Specification that was defined by JSR 200 and incorporated into the Platform by JSR 176 (Java SE 5.0).


Changes to the Java SE Platform Specification are categorized as either features or enhancements. A feature is, roughly speaking, a change of which at least one of the following statements is true:

Any addition that is not a feature is considered an enhancement.

There is, obviously, room for judgment when interpreting this definition. In order to maximize the visibility of Platform revisions we generally tend to consider borderline items to be features rather than enhancements.

Component JSR Specifications  

Some Component JSR Specifications previously incorporated into the Platform are still available separately or have significant Specifications themselves. Changes to their Specifications are therefore made in separate Maintenance Releases, which is incorporated here by reference:

JSR 269: Pluggable Annotation-Processing API [MR 8]

Each Component JSR Specification, or revision thereto, may be related to one or more features in the detailed list below.


Work on features in the Java SE 14 Reference Implementation is organized in terms of JDK Enhancement Proposals (JEPs). Each feature description gives a link to the corresponding JEP document as a convenience, but that document is not a normative part of this Specification. Some features are included in the Java SE 14 Reference Implementation on a preview basis, to gain exposure before achieving permanent status in a later release of the Java SE Platform.

Pattern Matching for instanceof (Preview)

Enhance the Java programming language with pattern matching for the instanceof operator. Pattern matching allows common logic in a program, namely the conditional extraction of components from objects, to be expressed more concisely and safely.

Records (Preview)

Enhance the Java programming language with records. Records provide a compact syntax for declaring classes which are transparent holders for shallowly immutable data.

Switch Expressions (Standard)

Extend switch so it can be used as either a statement or an expression, and so that both forms can use either traditional case ... : labels (with fall through) or new case ... -> labels (with no fall through), with a further new statement for yielding a value from a switch expression. These changes will simplify everyday coding, and prepare the way for the use of pattern matching in switch. This was a preview language feature in JDK 12 and JDK 13.

Text Blocks (Second Preview)

Add text blocks to the Java language. A text block is a 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 the format when desired.

Remove the Pack200 Tools and API

Remove the Pack200 API in java.util.jar package. This API was deprecated for removal in Java SE 11 with the express intent to remove it in a future release.

Preview features A preview language or VM feature is a new feature of the Java SE Platform that is fully specified, fully implemented, and yet impermanent. This Specification incorporates the Java SE 12 Platform Specification (JSR 386), subsection Preview features by reference.


A module is a named set of packages designed for reuse. A specification governed by the JCP defines standard packages, and may group them into one or more standard modules.

This Specification groups the standard packages of the Java SE Platform into 21 standard modules, which we refer to as the Java SE modules. The name of a Java SE module always starts with the string "java.". The complete list of such modules is:

java.scripting (aggregator)

Compared to Java SE 13, this Specification does not add or remove any modules.

The module graph The Java SE modules depend upon each other as stated in their specifications, which are part of the overall API Specification. The corresponding complete Java SE module graph has too many edges to be displayed easily in visual form; here is the transitive reduction of the directed acyclic graph, in which redundant edges are omitted (click to enlarge): Spec Module Graph

Here is how to read this visualization of the module graph:

A module is a Java SE module — that is, considered part of the Java SE Platform Specification — if and only if it is a standard module reachable from the module.

This Specification incorporates the following subsections by reference from Java SE 9 Platform Specification (JSR 379), “Modules”:

APIs removed  

Following the conventions established by the Enhanced Deprecation feature, various modules and APIs were annotated with forRemoval=true in the “APIs Proposed for Removal” section of the Platform Specifications for Java SE 10 or Java SE 11 and continued to be deprecated for removal in all subsequent releases.

The following individual APIs are removed from this Specification. The number in parentheses indicates the Java SE Platform Specification which first proposed their removal.





APIs proposed for removal  

The following APIs were proposed for removal by the Platform Specifications for Java SE 9, Java SE 10, and Java SE 13, and continue to be eligible for removal in a future release. They are not removed from this Specification.





Finally, the following APIs are annotated as @Deprecated with forRemoval=true in this Specification. This makes them eligible for removal in a future release of the Platform.



Additional details about deprecations, including potential alternatives, may be found in the Deprecated API list of the API Specification. Migration away from deprecated APIs is strongly encouraged.

Compared to Java SE 13, this Specification does not remove any further APIs.