Oracle has announced the general availability of Java 27, the latest feature release of the Java platform, arriving six months after Java 26 as part of the project’s regular release cycle.
The release includes nine JDK Enhancement Proposals, covering changes to the JVM, language features, cryptography, libraries, and development tooling. Four of them are preview features, while the Vector API remains an incubator feature.
One notable change in Java 27 is that G1 is now the default garbage collector across all environments. Previously, the HotSpot JVM could choose the Serial garbage collector in some configurations. With JDK 27, G1 is always selected when users do not specify a garbage collector.
Compact Object Headers are now enabled by default. On 64-bit architectures, the feature reduces object headers from 96 bits to 64 bits. According to Oracle, this reduces heap usage, improves data locality, and allows more objects to fit into the same memory.
Moreover, Java 27 introduces hybrid post-quantum key exchange for TLS 1.3. The implementation combines conventional cryptographic algorithms with quantum-resistant ones and is available automatically to applications using Java’s javax.net.ssl APIs without code changes.
On the language side, primitive types in patterns, instanceof, and switch enter their fifth preview. The work continues to allow primitive values to participate more consistently in Java’s pattern-matching features while tightening compiler checks around switch expressions.
Structured Concurrency returns for a seventh preview. The API makes groups of related concurrent tasks easier to manage as a single unit, especially when handling cancellation, failures, and task completion.
Lazy Constants return for a third preview. They provide an API for values initialized only when first needed and remain immutable afterward.
Meanwhile, the Vector API enters its 12th incubator iteration. It allows developers to express vector computations that the JVM can compile into vector CPU instructions on supported hardware, primarily targeting workloads where SIMD-style processing can provide significant performance gains.
Another addition is JFR In-Process Data Redaction. Java Flight Recorder can now redact command-line arguments, environment variable values, and system property values before diagnostic data leaves the running Java process. This helps prevent potentially sensitive runtime information from appearing in recordings.
Apart from the nine JEPs, JDK 27 includes many smaller runtime and tooling improvements. These include G1 heap-sizing changes, compiler optimizations, faster file and native I/O operations, Vector API optimizations, and performance improvements for several cryptographic algorithms.
Java’s diagnostic tools have also received some attention. JSON thread dumps now represent selected identifiers and counts as JSON numbers, while VM diagnostics can report the number of currently open file descriptors. Bash autocompletion support has also been added for the jcmd utility.
For more details, refer to the official announcement. Oracle plans to provide updates for JDK 27 until March 2027, when Java 28 is expected to replace it as the next feature release.
