Java 27 introduces a mix of production-ready improvements and preview features aimed at memory efficiency, security, concurrency, diagnostics, and pattern matching. The release includes nine major JDK Enhancement Proposals, including a new default garbage collector, compact object headers, post-quantum TLS support, and several evolving language APIs.openjdk
G1 becomes the default everywhere
One of the main changes in JDK 27 is the broader use of the Garbage-First (G1) garbage collector.
G1 was already commonly selected for server-class JVMs. With JDK 27, HotSpot uses G1 by default in all environments when developers do not explicitly choose another collector. This includes configurations where earlier Java versions might have selected the Serial collector.openjdk
The aim is to provide more predictable behavior across different machines and deployment environments. The OpenJDK project specifically targets stable throughput, latency, memory usage, and startup time after the change.
Applications can still select another collector manually through JVM command-line options when their workloads require different characteristics.
Post-quantum TLS 1.3
JDK 27 adds support for hybrid key exchange in TLS 1.3.
Hybrid cryptography combines a conventional key-exchange algorithm with a post-quantum algorithm. The traditional component preserves compatibility with existing systems, while the second component is designed to provide protection against attacks enabled by future quantum computers.
This is particularly relevant to organizations that need to protect long-lived sensitive data. Attackers could potentially collect encrypted traffic today and attempt to decrypt it later when quantum computing becomes more capable.
Lazy constants
The Lazy Constants API receives its third preview in JDK 27.
The feature is designed for values that should behave as immutable constants after initialization but do not need to be created during class initialization. This allows applications to delay expensive or conditional initialization while still giving the JVM information about the value’s constant-like behavior.
Compared with a conventional final field, a lazy constant provides more flexibility over when initialization occurs. Because the API remains a preview feature, developers must enable preview functionality to test it, and its design may change in a future release.
Primitive types in pattern matching
JDK 27 also advances the proposal for using primitive types in patterns, instanceof, and switch to a fifth preview.
The goal is to make pattern matching work consistently with primitive values instead of limiting many pattern contexts to reference types. The proposal also extends instanceof and switch so they can handle all primitive types more naturally.
For developers, this could eventually reduce unnecessary conversions and make conditional logic more uniform:
javaswitch (value) {
case int number -> System.out.println(number);
default -> System.out.println("Other value");
}
The exact syntax and semantics remain subject to change while the feature is still in preview.
Structured concurrency
Structured Concurrency reaches its seventh preview in JDK 27.
The API treats related tasks running in different threads as one logical unit. Instead of managing each task independently, an application can create a structured group whose tasks share a defined lifetime and error-handling policy.
This approach is intended to make concurrent code easier to understand and maintain. It can also simplify cancellation, improve failure handling, and make the behavior of concurrent operations easier to observe.
Structured concurrency is especially relevant to services that need to perform several operations in parallel and combine their results before returning a response.
Compact object headers
JDK 27 makes compact object headers the default layout in the HotSpot JVM.
On 64-bit systems, object headers can be reduced from 96 bits to 64 bits. Since every Java object carries a header, even a small reduction can have a noticeable effect in applications that create large numbers of objects.
Potential benefits include:
lower heap consumption;
higher application density on the same machine;
improved data locality;
reduced memory pressure in object-heavy workloads.
The impact will vary depending on the application’s object count, heap size, and workload characteristics. Developers should still benchmark their applications rather than assume a fixed performance improvement.
Safer JFR recordings
JDK Flight Recorder receives a new in-process data-redaction capability.
Java Flight Recorder files may contain sensitive information captured from command-line arguments, environment variables, and system properties. That information can include access tokens, passwords, connection strings, or other secrets.
JDK 27 allows selected data to be redacted before the recording leaves the Java process. This helps teams continue using JFR for performance diagnostics while reducing the risk of accidentally sharing confidential data in recordings.
The feature is optional, so organizations should review their JFR configuration and decide which categories of information require redaction.
Additional platform improvements
The remaining JDK 27 proposals include further work in cryptography and low-level performance:
The Vector API continues to evolve as an incubating API for expressing hardware-accelerated vector operations.
PEM encoding support simplifies the representation and exchange of cryptographic objects using Privacy-Enhanced Mail formats.
These additions are mostly relevant to developers working on security infrastructure, high-performance computing, libraries, and framework internals.
What the release means for developers
JDK 27 combines several changes that work immediately after upgrading with APIs that are still experimental.
Before adopting it broadly, teams should:
benchmark memory use after enabling compact object headers;
review garbage-collector behavior in production-like environments;
test TLS interoperability with existing servers and clients;
treat preview and incubator APIs as unstable;
review JFR configurations for possible secret leakage;
verify build and deployment pipelines against the new runtime.
JDK 27 is not an LTS release, so many production teams may wait for a long-term-support version before making it their standard runtime. For developers who want to evaluate upcoming Java capabilities, however, the release provides an early look at the platform’s direction in memory management, secure communications, structured concurrency, and modern pattern matching.
JDK 27: The new features of Java 27
Java 27 introduces a mix of production-ready improvements and preview features aimed at memory efficiency, security, concurrency, diagnostics, and pattern matching. The release includes nine major JDK Enhancement Proposals, including a new default garbage collector, compact object headers, post-quantum TLS support, and several evolving language APIs.openjdk
G1 becomes the default everywhere
One of the main changes in JDK 27 is the broader use of the Garbage-First (G1) garbage collector.
G1 was already commonly selected for server-class JVMs. With JDK 27, HotSpot uses G1 by default in all environments when developers do not explicitly choose another collector. This includes configurations where earlier Java versions might have selected the Serial collector.openjdk
The aim is to provide more predictable behavior across different machines and deployment environments. The OpenJDK project specifically targets stable throughput, latency, memory usage, and startup time after the change.
Applications can still select another collector manually through JVM command-line options when their workloads require different characteristics.
Post-quantum TLS 1.3
JDK 27 adds support for hybrid key exchange in TLS 1.3.
Hybrid cryptography combines a conventional key-exchange algorithm with a post-quantum algorithm. The traditional component preserves compatibility with existing systems, while the second component is designed to provide protection against attacks enabled by future quantum computers.
This is particularly relevant to organizations that need to protect long-lived sensitive data. Attackers could potentially collect encrypted traffic today and attempt to decrypt it later when quantum computing becomes more capable.
Lazy constants
The Lazy Constants API receives its third preview in JDK 27.
The feature is designed for values that should behave as immutable constants after initialization but do not need to be created during class initialization. This allows applications to delay expensive or conditional initialization while still giving the JVM information about the value’s constant-like behavior.
Compared with a conventional
finalfield, a lazy constant provides more flexibility over when initialization occurs. Because the API remains a preview feature, developers must enable preview functionality to test it, and its design may change in a future release.Primitive types in pattern matching
JDK 27 also advances the proposal for using primitive types in patterns,
instanceof, andswitchto a fifth preview.The goal is to make pattern matching work consistently with primitive values instead of limiting many pattern contexts to reference types. The proposal also extends
instanceofandswitchso they can handle all primitive types more naturally.For developers, this could eventually reduce unnecessary conversions and make conditional logic more uniform:
The exact syntax and semantics remain subject to change while the feature is still in preview.
Structured concurrency
Structured Concurrency reaches its seventh preview in JDK 27.
The API treats related tasks running in different threads as one logical unit. Instead of managing each task independently, an application can create a structured group whose tasks share a defined lifetime and error-handling policy.
This approach is intended to make concurrent code easier to understand and maintain. It can also simplify cancellation, improve failure handling, and make the behavior of concurrent operations easier to observe.
Structured concurrency is especially relevant to services that need to perform several operations in parallel and combine their results before returning a response.
Compact object headers
JDK 27 makes compact object headers the default layout in the HotSpot JVM.
On 64-bit systems, object headers can be reduced from 96 bits to 64 bits. Since every Java object carries a header, even a small reduction can have a noticeable effect in applications that create large numbers of objects.
Potential benefits include:
The impact will vary depending on the application’s object count, heap size, and workload characteristics. Developers should still benchmark their applications rather than assume a fixed performance improvement.
Safer JFR recordings
JDK Flight Recorder receives a new in-process data-redaction capability.
Java Flight Recorder files may contain sensitive information captured from command-line arguments, environment variables, and system properties. That information can include access tokens, passwords, connection strings, or other secrets.
JDK 27 allows selected data to be redacted before the recording leaves the Java process. This helps teams continue using JFR for performance diagnostics while reducing the risk of accidentally sharing confidential data in recordings.
The feature is optional, so organizations should review their JFR configuration and decide which categories of information require redaction.
Additional platform improvements
The remaining JDK 27 proposals include further work in cryptography and low-level performance:
These additions are mostly relevant to developers working on security infrastructure, high-performance computing, libraries, and framework internals.
What the release means for developers
JDK 27 combines several changes that work immediately after upgrading with APIs that are still experimental.
Before adopting it broadly, teams should:
JDK 27 is not an LTS release, so many production teams may wait for a long-term-support version before making it their standard runtime. For developers who want to evaluate upcoming Java capabilities, however, the release provides an early look at the platform’s direction in memory management, secure communications, structured concurrency, and modern pattern matching.
Recent Posts
Recent Comments
Search
About Us
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour.
Categories
Recent Post
JDK 27: The new features of Java 27
September 21, 2026Tech Giants Back 800V DC Power for Next-Generation AI Data
August 31, 2026Samsung outlines its AI‑era memory roadmap
August 17, 2026