Java SE 15 ( JSR 390)
Final Release Specification
Iris Clark & Brian Goetz
2020/9/2 11:35 -0700 [b240d3059216]

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

Contents
1Summary
2Structure
3Definitions
4Component JSR Specifications
5Features
6Modules
7APIs removed
8APIs proposed for removal
Annexes
A1Complete API Specification
A2API Specification differences
A3Java Language & Virtual Machine Specifications
A4JAR File Specification
A5Java AWT Native Interface (JAWT) Specification & Guide
A6Java Debug Wire Protocol (JDWP)
A7Java Native Interface (JNI) Specification
A8Java Object Serialization Specification
A9Java Remote Method Invocation (RMI) Specification
A10Java Security Standard Algorithm Names
A11JVM Tool Interface (JVM TI)
1
Summary  

This release continues the evolution of the Platform to ensure the broadest possible success of the core Java technology. It standardizes text blocks, previews several other language features, introduces hidden classes, adds support for the Edwards-Curve Digital Signature Algorithm, and deprecates the RMI Activation mechanism.

2
Structure  

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 15 API Specification and Annex 2 is an annotated API specification showing the exact differences relative to Java SE 14. Informative background for these changes may be found in the list of approved Compatibility & Specification Review (CSR) requests for this release.

This Specification includes the Java SE 15 Editions of The Java Language Specification and The Java Virtual Machine Specification in Annex 3. The Java SE 15 Editions contain all corrections and clarifications made since the Java SE 14 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 15.

This Specification includes the Java SE 15 versions of additional narrative specifications in Annexes 4 — 11. The Java SE 15 versions contain all corrections and clarifications made since the Java SE 14 versions, as well as additions for new features. The Java Object Serialization Specification in Annex 8 contains the most significant changes which were made in connection with preview features in Java SE 15.

3
Definitions  

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.

4
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 are incorporated here by reference:

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

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

5
Features  

Work on features in the Java SE 15 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 15 Reference Implementation on a preview basis, to gain exposure before achieving permanent status in a later release of the Java SE Platform.

Libraries
Deprecate RMI Activation for Removal

Deprecate the RMI Activation mechanism for future removal. RMI Activation is an obsolete part of RMI that has been optional since Java 8. No other part of RMI will be deprecated.

Hidden Classes

Introduce hidden classes, which are classes that cannot be used directly by the bytecode of other classes. Hidden classes are intended for use by frameworks that generate classes at run time and use them indirectly, via reflection. A hidden class may be defined as a member of an access control nest, and may be unloaded independently of other classes.

Security
Edwards-Curve Digital Signature Algorithm (EdDSA)

Implement cryptographic signatures using the Edwards-Curve Digital Signature Algorithm (EdDSA) as described by RFC 8032.

Language
Pattern Matching for instanceof (Second 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. This is a preview language feature in JDK 15.

Records (Second Preview)

Enhance the Java programming language with records, which are classes that act as transparent carriers for immutable data. Records can be thought of as nominal tuples.

Sealed Classes (Preview)

Enhance the Java programming language with sealed classes and interfaces. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.

Text Blocks

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.

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.

6
Modules  

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.base
java.compiler
java.datatransfer
java.desktop
java.instrument
java.logging
java.management
java.management.rmi
java.naming
java.net.http
java.prefs
java.rmi
java.scripting
java.se (aggregator)
java.security.jgss
java.security.sasl
java.sql
java.sql.rowset
java.transaction.xa
java.xml
java.xml.crypto

Compared to Java SE 14, 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):

java.se 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 java.se module.

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

7
APIs removed  

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

Fields

Constructors

8
APIs proposed for removal  

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

Classes 

Exceptions  

Methods 

Constructors 

The following APIs are proposed for removal from the Java SE Platform by this Platform Specification. They are annotated as @Deprecated with forRemoval=true, following the convention established by Enhanced Deprecation. This makes them eligible for removal in a future release.

Packages   

Classes   

Exceptions   

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.