Java SE 11 (18.9) ( JSR 384)
Final Release Specification
Iris Clark & Brian Goetz
2018/8/30 13:30 -0700 [095efbf6e90f]

This Specification defines version 11 of the Java Platform, Standard Edition.

Contents
1Summary
2Structure
3Definitions
4Component JSR Specifications
5Feature summary
6Feature details
7Modules
8APIs removed
9APIs proposed for removal
10Non-API features removed
Annexes
A1Complete API Specification
A2API Specification differences
A3Java Language & Virtual Machine Specifications
1
Summary  

This release continues the evolution of the Platform to ensure the broadest possible success of the core Java technology. It substantially streamlines the footprint of the Platform by removing enterprise APIs, and improves the expressiveness of Java class files.

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 11 API Specification and Annex 2 is an annotated API specification showing the exact differences relative to Java SE 10. 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 11 Editions of The Java Language Specification and The Java Virtual Machine Specification in Annex 3. The Java SE 11 Editions contain all corrections and clarifications made since the Java SE 10 Editions, as well as additions for new features.

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 5]

The javax.transaction.xa package of the following existing component JSR is subsumed by this Specification:

JSR 907: Java Transaction API (JTA)  [MR 6]

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

5
Feature summary  
SecurityChaCha20 and Poly1305 Cryptographic Algorithms
Key Agreement with Curve25519 and Curve448
Transport Layer Security (TLS) 1.3
LibrariesDeprecate the Pack200 API
HTTP Client (Standard)
Remove the Java EE and CORBA Modules
Unicode 10
Virtual MachineDynamic Class-File Constants
Nest-Based Access Control
LanguageLocal-Variable Syntax for Lambda Parameters
6
Feature details  

Work on features in the Java SE 11 Reference Implementation, which is the Java Development Kit, version 11 (JDK 11), is organized in terms of JDK Enhancement Proposals (JEPs). Each feature description includes a link to the corresponding JEP document as a convenience, but that document is not a normative part of this Specification.

Security
ChaCha20 and Poly1305 Cryptographic Algorithms

Implement the ChaCha20 and ChaCha20-Poly1305 ciphers as specified in RFC 7539. ChaCha20 is a relatively new stream cipher that can replace the older, insecure RC4 stream cipher.

Key Agreement with Curve25519 and Curve448

Implement key agreement using Curve25519 and Curve448 as described in RFC 7748.

Transport Layer Security (TLS) 1.3

Implement version 1.3 of the Transport Layer Security (TLS) Protocol RFC 8446.

Libraries
Deprecate the Pack200 API

Deprecate the Pack200 API in java.util.jar.

HTTP Client (Standard)

Define an HTTP Client API that supports HTTP/2 and WebSocket.

Remove the Java EE and CORBA Modules

Remove the Java EE and CORBA modules from the Java SE Platform and the JDK. These modules were deprecated in Java SE 9 with the declared intent to remove them in a future release.

Unicode 10

Upgrade existing platform APIs to support version 10.0 of the Unicode Standard.

Virtual Machine
Dynamic Class-File Constants

Extend the Java class-file format to support a new constant-pool form, CONSTANT_Dynamic. Loading a CONSTANT_Dynamic will delegate creation to a bootstrap method, just as linking an invokedynamic call site delegates linkage to a bootstrap method.

Nest-Based Access Control

Introduce nests, an access-control context that aligns with the existing notion of nested types in the Java programming language. Nests allow classes that are logically part of the same code entity, but which are compiled to distinct class files, to access each other's private members without the need for compilers to insert accessibility-broadening bridge methods.

Language
Local-Variable Syntax for Lambda Parameters

Allow var to be used when declaring the formal parameters of implicitly typed lambda expressions.

7
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 10, this Specification adds two modules and removes seven modules. The first new module, java.transaction.xa, contains the javax.transaction.xa package which was subsumed by this Specification as described in the “Component JSR Specifications” section. The second new module, java.net.http, contains the HTTP Client API which was incubated in JDK 9 and 10, then completed in JDK 11 by JEP 321. The seven removed modules are listed in the “APIs removed” section.

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. The seven modules removed from this Specification are not Java SE modules in the Java SE 11 Platform.

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

8
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 Java SE 9 Platform Specification and the Java SE 10 Platform Specification.

Seven modules that were proposed for removal by the Java SE 9 and 10 Platform Specifications are removed from this Specification. More information about these modules and their APIs is available in JEP 320. Standalone versions of the APIs and their implementations are readily available.

The following individual APIs are removed from this Specification. Many have been deprecated since at least Java SE 1.4 and have been superseded by newer APIs. The number in parentheses indicates the Java SE Platform Specification which first proposed their removal.

Classes

Methods

9
APIs proposed for removal  

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

Packages 

Interfaces 

Classes 

Exceptions 

Fields 

Methods 

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.

Interfaces  

Classes  

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.

10
Non-API features removed  

The following non-API feature was removed.

SNMP Support Monitoring and management of the Java Virtual Machine is supported primarily by JMX, but also, since Java SE 5.0, by SNMP. However, developer interest in SNMP has been low, and no longer justifies SNMP support in the Java SE Platform. Consequently, this Specification removes the SNMP Management Information Base (MIB) defined for the JVM by JSR 174. (JDK 5.0 implemented an SNMP agent to publish the MIB. The SNMP agent was included in the JDK until its removal in JDK 11.)