Feature Summary: Java SE 11

FeatureDescriptionJSR/JEPReleased in
Java Platform Module SystemIntroduces a modular approach to Java applications, enhancing scalability, maintainability, and performance.JSR 376Java SE 9
Convenience Factory Methods for CollectionsIntroduces new static factory methods on the Collections, List, Set, and Map interfaces to simplify the creation of immutable instances of these collections.JEP 269Java SE 9
Milling Project CoinMakes small enhancements to the Java programming language which simplify day-to-day coding tasks. E.g. Private methods in interfaces, making “_” a reserved word, etc.JSR 334,
JEP 213
Java SE 9
jshellProvides an interactive tool for prototyping and exploring Java code, known as a read-evaluate-print loop (REPL).JEP 222Java SE 9
Compact StringsOptimizes the String class in the JDK to use less memory whenever possible, without altering the existing APIs.JEP 254Java SE 9
XML Catalog APIIntroduces a standard API for using XML Catalogs, which simplifies XML processing.JEP 268Java SE 9
jlinkAllows developers to create smaller custom runtimes with only the necessary parts of the JDK, reducing the application’s footprint.JEP 282Java SE 9
GraalVM’s Ahead-of-Time CompilationProvides a way to compile Java code ahead-of-time for faster startup time and less runtime overhead. ⚠ Note: Deprecated and removed in Java SE 17.JEP 295Java SE 9
Local-Variable Type InferenceEnhances Java with var, allowing developers to skip the type declaration when it can be easily inferred from the context.JEP 286Java SE 10
Garbage-Collector improvementsImproves G1 performance for better latency and throughput, and streamlines interface for developers.JEP 304, JEP 307Java SE 10
Application Class-Data SharingExtends class-data sharing to application classes to reduce startup time and memory footprint.JEP 310Java SE 10
Thread-Local HandshakesIntroduces a new way to perform callback on threads without performing a global VM safepoint, improving performance of stopping individual threads.JEP 312Java SE 10
Heap Allocation on Alternative Memory DevicesEnables the HotSpot VM to allocate the Java object heap on an alternative memory device, such as an NV-DIMM.JEP 316Java SE 10
Root CertificatesProvides a default set of root Certification Authority (CA) certificates in the JDK.JEP 319Java SE 10
Nest-Based Access ControlEnhances access control, eliminating the need for compilers to insert bridge methods.JEP 181Java SE 11
HTTP/2 Client Introduces a new API for HTTP/2 support as part of the standard Java APIs.JEP 110, JEP 321Java SE 9, Java SE 11
Local-Variable Syntax for Lambda ParametersAllows var to be used to declare the formal parameters of implicitly typed lambda expressions for consistency and clarity.JEP 323Java SE 11
Unicode 10Updates the Java platform to Unicode 10, allowing it to support new characters and scripts.JEP 327Java SE 11
Flight RecorderProvides a low-overhead data collection framework for troubleshooting Java applications and the HotSpot JVM.JEP 328Java SE 11
ChaCha20 and Poly1305 Cryptographic AlgorithmsImplements the ChaCha20 and ChaCha20-Poly1305 cipher suites for secure communication.JEP 329Java SE 11
Launch Single-File Source-Code ProgramsAllows Java to run a program supplied as a single file of Java source code, simplifying execution of small scripts.JEP 330Java SE 11
Oracle JDK Installer for WindowsUpdates the Oracle JDK installer for Windows to add executables (like javac) in a path that is reachable from any command prompt, enhancing user convenience. JDK 11.0.8 Release NotesJava SE 11

Tools

Java SE 11 introduced several tools and utilities aimed at enhancing developer productivity and simplifying the development process.

  • jshell: Provides an interactive tool for prototyping and exploring Java code, known as a read-evaluate-print loop (REPL) (JEP 222).
  • jlink: Allows developers to create smaller custom runtimes with only the necessary parts of the JDK, reducing the application’s footprint (JEP 282).
  • Launch Single-File Source-Code Programs: Allows Java to run a program supplied as a single file of Java source code, simplifying the execution of small scripts (JEP 330).
  • Oracle JDK Installer for Windows: Updates the Oracle JDK installer for Windows to add executables (like javac) in a path that is reachable from any command prompt, enhancing user convenience (JDK 11.0.8 Release Notes).
  • Flight Recorder: Provides a low-overhead data collection framework for troubleshooting Java applications and the HotSpot JVM (JEP 328).

Java Syntax

This category includes fundamental changes and updates to the Java programming language, enhancing readability and reducing boilerplate code.

  • Java Platform Module System: Introduces a modular approach to Java applications, enhancing scalability, maintainability, and performance (JSR 376).
  • Local-Variable Type Inference: Introduces var, allowing developers to skip the type declaration when it can be easily inferred from the context (JEP 286).
  • Milling Project Coin: Makes small enhancements to the Java programming language which simplify day-to-day coding tasks, such as private methods in interfaces and making _ a reserved word (JSR 334, JEP 213).
  • Local-Variable Syntax for Lambda Parameters: Allows var to be used to declare the formal parameters of implicitly typed lambda expressions for consistency and clarity (JEP 323).

Libraries

Enhancements and additions to the Java standard API, providing new capabilities and simplifying common tasks.

  • Convenience Factory Methods for Collections: Introduces new static factory methods on the Collections, List, Set, and Map interfaces to simplify the creation of immutable instances of these collections (JEP 269).
  • HTTP/2 Client: Introduces a new API for HTTP/2 support as part of the standard Java APIs (JEP 110, JEP 321).
  • Compact Strings: Optimizes the String class in the JDK to use less memory whenever possible, without altering the existing APIs (JEP 254).
  • XML Catalog API: Introduces a standard API for using XML Catalogs, which simplifies XML processing (JEP 268).
  • ChaCha20 and Poly1305 Cryptographic Algorithms: Implements the ChaCha20 and ChaCha20-Poly1305 cipher suites for secure communication (JEP 329).
  • Unicode 10: Updates the Java platform to Unicode 10, allowing it to support new characters and scripts (JEP 327).

Performance & Security

Updates and improvements to the JVM and garbage collection, focusing on performance, security, and robustness.

  • GraalVM’s Ahead-of-Time Compilation: Provides a way to compile Java code ahead-of-time for faster startup time and less runtime overhead. Note: Deprecated and removed in Java SE 17 (JEP 295).
  • Garbage-Collector Improvements: Improves G1 performance for better latency and throughput, and streamlines interface for developers (JEP 304, JEP 307).
  • Application Class-Data Sharing: Extends class-data sharing to application classes to reduce startup time and memory footprint (JEP 310).
  • Thread-Local Handshakes: Introduces a new way to perform callbacks on threads without performing a global VM safepoint, improving the performance of stopping individual threads (JEP 312).
  • Heap Allocation on Alternative Memory Devices: Enables the HotSpot VM to allocate the Java object heap on an alternative memory device, such as an NV-DIMM (JEP 316).
  • Root Certificates: Provides a default set of root Certification Authority (CA) certificates in the JDK (JEP 319).
  • Nest-Based Access Control: Enhances access control, eliminating the need for compilers to insert bridge methods (JEP 181).