JDK 16 - What's new features in Java 16
Some of the upcoming feature highlights of JDK 16 includes concurrent thread-stack processing for garbage collection, support for C++ 14 language features, and an "elastic metaspace" capability to more quickly return unused class metadata memory to the OS.Download : JDK 16 Early-Access Builds
JDK 16 has begun to take shape, below are proposed features coming out as part of the jdk 16.
- JEP 338: Vector API (Incubator)
- JEP 347: Enable C++14 Language Features
- JEP 357: Migrate from Mercurial to Git
- JEP 369: Migrate to GitHub
- JEP 376: ZGC: Concurrent Thread-Stack Processing
- 386: Alpine Linux Port
- JEP 387: Elastic Metaspace
- JEP 388: Windows/AArch64 Port
- JEP 338: Vector API (Incubator):
Vector API is designed to write complex vector algorithms for Java, with pre-existing vectorizing support in the Hot Spot VM and a more predictable and stable user model.
Providing the first incubator module, jdk.incubator.vector, to express vector computations which compile reliably on supported CPU architectures to maximize the use of the vector hardware instruction and thus achieve superior performance than scalar computations equivalent.
- Clear and concise API
- Platform agnostic
- Reliable runtime compilation and performance on x64 and AArch64 architectures
- Graceful degradation
- JEP 347: Enable C++14 Language Features:
Enable the use of C++14 language features in the JDK C++ source code and provide clear instructions on which features in the HotSpot code can be used.
- JEP 357: Migrate from Mercurial to Git:
Migrate Mercurial (hg) to Git from the OpenJDK Project source code repository. The benefits in the size and available resources and hosting of version control system.
- JEP 369: Migrate to GitHub:
Host Git repository for OpenJDK Community on GitHub. This will move all single source OpenJDK Projects to GitHub along with JEP 357 (Migrate from Mercurial to Git), and will include all versions 11 and later JDK and JDK upgrade updates.
- JEP 376: ZGC: Concurrent Thread-Stack Processing:
Shift ZGC thread-stack from safepoints to a concurrent phase.
Z Garbage Collector (ZGC) is designed to make GC pauses and scalability issues in HotSpot a thing of the past. To date, GC operations that scale the size of the heap and the size of the metaspace have been transferred out of safepoint operations and into concurrent phases.
This included marking, relocation, reference processing, unloading class and most root processing. The only operations still carried out in GC safepoints are a root processing subset and a time-bound termination marking operation.
- Drop the thread-stack processing from the ZGC safepoint.
- Make stack processing lazy, cooperative, concurrent, and incremental
- Remove all other root processing per thread from the ZGC safepoints.
- Graceful degradation
- 386: Alpine Linux Port:
Port of JDK to the x64 and AArch64 architectures on Alpine Linux and other Linux distributions that make use of the musl library.
Musl is an implementation, for Linux-based systems, of the standard library functionality described in the ISO C and POSIX standards. Several Linux distributions including Alpine Linux and OpenWrt are based on musl
Because of its small image size, Alpine Linux is widely adopted in cloud deployments, microservices, and container environments. A Docker picture is smaller than 6 MB for Linux. In such environments, letting Java run out-of-the-box will allow Tomcat, Jetty, Spring, and other common frameworks to operate natively in these environments. A user can build an even smaller image optimized for running a particular application by using jlink to minimize the size of the Java runtime.
- JEP 387: Elastic Metaspace:
Return unused hotspot memory to the operating system more efficiently, lower the footprint metaspace and simplify the metaspace code to reduce maintenance costs.
There have been problems with high off-heap memory use in Metaspace. The proposal includes a Buddy-based allocation scheme to replace the current memory allocator and include an algorithm to divide the memory to partitions to meet memory requests.
In order to completely leverage the elasticity provided by the Buddy Allocation, the metaspace memory will be arranged into uniformly sized granules that can be committed and uncommitted independently of each other.
- JEP 388: Windows/AArch64 Port:
Port the JDK to the Windows / AArch64 platform.
Windows / AArch64 has become a significant demand-based platform with the introduction of a new server-class and consumer AArch64 (ARM64) hardware. The main aim of this proposal is to incorporate the port into the main JDK repository, although the porting itself remaining mostly complete.
Take a look at our suggested post on Java :
Quick glance on earlier Java Versions Features :
Java 14 Features - JDK 14
JDK Enhancement Proposals (JEP) has targeted JDK 14 release for 17 March 2020 for below features :
- Pattern Matching for instanceof
- Non-Volatile Mapped Byte Buffers
- Helpful NullPointerExceptions
- Switch Expressions (Standard)
- Packaging Tool (Incubator)
- NUMA-Aware Memory Allocation for G1
- JFR Event Streaming
- Records (Preview)
- Deprecate the Solaris and SPARC Ports
- Remove the Concurrent Mark Sweep (CMS) Garbage Collector
- ZGC on macOS
- ZGC on Windows
- Deprecate the ParallelScavenge + SerialOld GC Combination
- Remove the Pack200 Tools and API
- Text Blocks (Second Preview)
- Foreign-Memory Access API
Java 13 Features - JDK 13
- Dynamic CDS Archives
- ZGC: Uncommit Unused Memory
- Reimplement the Legacy Socket API
- Switch Expressions (Preview)
- Text Blocks (Preview)
Java 12 Features
- Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
- Microbenchmark Suite
- Switch Expressions (Preview)
- JVM Constants API
- One AArch64 Port, Not Two
- Default CDS Archives
- Abortable Mixed Collections
- Promptly Return Unused Committed Memory from G1
Java 11 Features
- 181: Nest-Based Access Control
- 309: Dynamic Class-File Constants
- 315: Improve Aarch64 Intrinsics
- 318: Epsilon: A No-Op Garbage Collector
- 320: Remove the Java EE and CORBA Modules
- 321: HTTP Client (Standard)
- 323: Local-Variable Syntax for Lambda Parameters
- 324: Key Agreement with Curve25519 and Curve448
- 327: Unicode 10
- 328: Flight Recorder
- 329: ChaCha20 and Poly1305 Cryptographic Algorithms
- 330: Launch Single-File Source-Code Programs
- 331: Low-Overhead Heap Profiling
- 332: Transport Layer Security (TLS) 1.3
- 333: ZGC: A Scalable Low-Latency Garbage Collector(Experimental)
- 336: Deprecate the Pack200 Tools and API
Java 10 Features
- Local-variable type inference
- Experimental Java-based JIT compiler.This is the integration of the Graal dynamic compiler for the Linux x64 platform
- Application class-data sharing. This allows application classes to be placed in the shared archive to reduce startup and footprint for Java applications
- Time-based release versioning
- Parallel full GC
- Garbage-collector interface
- Additional Unicode language-tag extensions
- Root certificates
- Thread-local handshakes
- Heap allocation on alternative memory devices
- Remove the native-header generation tool - javah
- Consolidate the JDK forest into a single repository
Java 9 Features
- Modularization of the JDK under Project Jigsaw (Java Platform Module System)
- jshell: The Java Shell (a Java REPL)
- Ahead-of-time compilation
- XML catalogs
- More concurrency updates. It includes a Java implementation of Reactive Streams, including a new Flow class that included the interfaces previously provided by Reactive Streams
- Variable handles: define a standard means to invoke the equivalents of various java.util.concurrent.atomic and sun.misc.Unsafe operations
- jlink: The Java Linker: create a tool that can assemble and optimize a set of modules and their dependencies into a custom run-time image. It effectively allows to produce a fully usable executable including the JVM to run it
- JavaDB was removed from JDK
- HiDPI graphics: automatic scaling and sizing
Java 8 Features
- Language-level support for lambda expressions and default methods (virtual extension methods) which allow the addition of methods to interfaces without breaking existing implementations.
- Annotation on Java types
- Unsigned integer arithmetic
- Repeating annotations
- Date and time API
- Statically-linked JNI libraries
- Launch JavaFX applications (direct launching of JavaFX application JARs)
- Remove the permanent generation
Java 7 Features
- JVM support for dynamic languages
- Compressed 64-bit pointers
- Strings in switch
- Automatic resource management in try-statement
- Improved type inference for generic instance creation, aka the diamond operator <>
- Simplified varargs method declaration
- Binary integer literals
- Allowing underscores in numeric literals
- Catching multiple exception types and rethrowing exceptions with improved type checking
- Concurrency utilities
- New file I/O library adding support for multiple file systems
- Timsort is used to sort collections and arrays of objects instead of merge sort
- Library-level support for elliptic curve cryptography algorithms
- An XRender pipeline for Java 2D, which improves handling of features specific to modern GPUs
- New platform APIs for the graphics features
- Enhanced library-level support for new network protocols, including SCTP and Sockets Direct Protocol
- Upstream updates to XML and Unicode
- Java deployment rule sets
Java 6 Features
- Support for older Win9x versions dropped
- Scripting Language Support
- Dramatic performance improvements for the core platform, and Swing.
- Improved Web Service support through JAX-WS.
- JDBC 4.0 support.
- Java Compiler API
- Upgrade of JAXB to version 2.0
- Support for pluggable annotations
- Many GUI improvements, such as integration of SwingWorker in the API, table sorting and filtering, and true Swing double-buffering (eliminating the gray-area effect).
- JVM improvements include: synchronization and compiler performance optimizations, new algorithms and upgrades to existing garbage collection algorithms, and application start-up performance.
- Java 6 can be installed to Mac OS X 10.5 (Leopard) running on 64-bit (Core 2 Duo and higher) processor machines. Java 6 is also supported by both 32-bit and 64-bit machines running Mac OS X 10.6
Java 5 Features
- Enhanced for each loop
- Static imports
- Improvements - Semantics of execution for multi-threaded Java programs
- Improvements - Automatic stub generation for RMI objects
- Improvements - Swing: New skinnable look and feel, called synth
- Improvements - The concurrency utilities in package java.util.concurrent
- Improvements - Scanner class for parsing data from various input streams and buffers