Java 27 flipped two defaults. Here's what they're actually worth.
Java 27 reached general availability on 15 September 2026 with nine JEPs, four of them previews and one an incubator. Two of those nine change a default on every machine you run. Neither one shipped with a benchmark attached to the headline.
That is the whole post, really. But the details are worth your time, because one of these defaults is exact and checkable, one is an estimate wearing a percentage sign, and the third thing everybody repeats is neither.
The one number you can verify
JEP 534 turns compact object headers on by default. On 64-bit architectures the object header drops from 96 bits to 64. Twelve bytes to eight, on every object you allocate.

Go and check it. Oracle states it plainly in the release announcement, it is a structural fact about the JVM, and nothing about your workload changes it. This is the rare release-note figure that needs no caveat.
What it saves on your heap is a different question.
Billy Korando's write-up on Inside Java, dated 12 September, says compact headers "should reduce overall heap size by about 20%." I want to be careful here, because I got this slightly wrong the first time I wrote about it. The 20% in that sentence names no workload and cites no benchmark. But one JEP back, in the version that made compact headers final in JDK 25, there is a measured figure: JEP 519 reports that "in one setting, the SPECjbb2015 benchmark uses 22% less heap space and 8% less CPU time." It also reports a 15% drop in garbage collections in another setting, and a "highly parallel JSON parser benchmark" running in 10% less time.
So the honest version is messier than either the hype or the cynicism. There is real measurement behind compact headers. It lives in JEP 519, it is hedged with "in one setting," and the round number that travels is not the one that was measured.
Here is the arithmetic nobody prints. Going from 96 bits to 64 is a 33% cut to the header. Whether that lands anywhere near 20% of your total heap depends entirely on your average object size, which nobody has published and which varies wildly between a Spring service holding big DTOs and a graph library allocating millions of tiny nodes. Small objects, big win. Big objects, rounding error.
Measure your own heap before you promise anyone a number.
The change that will actually bite someone
JEP 523 is the one I would test first, and it is getting a fraction of the attention.
G1 becomes the default garbage collector in all environments. Previously the JVM picked Serial in what JEP 523 calls "constrained environments with a single CPU and less than 1.8 GB of heap." That sounds like an edge case. It is not.

New Relic's 2024 telemetry put 37% of monitored applications on Serial and 43% on G1. The same report found 68% of applications running on one to four cores. Over a third of real production Java was sitting on the collector this JEP replaces.
Read JEP 523's own Motivation section and it is franker than the announcement. It concedes that "Serial had significant advantages in throughput and footprint in constrained environments," and that "G1's maximum throughput is close to that of Serial." Close to. The published assurance, in the Goals section, is that throughput, latency, memory footprint and startup time "should not degrade significantly."
That is the entire guarantee for a change affecting every 512 MB container in your fleet. It is probably fine. I would still rather find out on my staging cluster than on a Monday.
One caveat on that 37%: New Relic has not published a 2025 or 2026 edition, so the telemetry is about two and a half years old, and its population skews toward estates big enough to buy an APM product.
Two upgrade notes that didn't make any headline
Both of these are in the Oracle release notes and neither is in a JEP.
G1's MinHeapFreeRatio and MaxHeapFreeRatio defaults change from 40 and 70 to 0 and 100, which effectively disables G1 heap resizing from those settings. Set either explicitly and you get the old behaviour back. If you never touched them, your memory profile just changed quietly.
And the escape hatch has an expiry date. The release notes say -XX:-UseCompactObjectHeaders is "planned for deprecation and removal in a future release." Use it to buy time, not to make a decision.
The third default, and nobody will notice it
JEP 527 adds post-quantum hybrid key exchange to TLS 1.3, and the interesting part is the delivery. X25519MLKEM768 is placed first in a default list of eleven named groups, so a TLS 1.3 client prefers it automatically. The JEP's own phrasing: applications using javax.net.ssl "will benefit from these improved algorithms by default, without change to existing code."
Zero lines of code. It builds on the KEM API from Java 21 and ML-KEM from Java 24, and it is scoped tightly: TLS 1.3 only, javax.net.ssl only.
One thing to check before you assume you got it for free. If your code pins groups through jdk.tls.namedGroups or SSLParameters.setNamedGroups, your pinned list wins and you are still on classical key exchange. Somebody set that property in 2019 to work around a load balancer, and nobody has looked at it since. Go and look at it.
What Java actually looks like now
If your mental image of Java is public static void main(String[] args) and six lines of ceremony, it is roughly a decade out of date. This runs on Java 25 and later with java hello.java, no build tool, no class declaration:
import module java.base;
void main() {
var releases = Map.of(
"21", "LTS · Sep 2023",
"25", "LTS · Sep 2025",
"27", "feature release · Sep 2026"
);
releases.entrySet().stream()
.sorted(Map.Entry.comparingByKey())
.forEach(e -> IO.println(e.getKey() + " " + e.getValue()));
}
Three things are doing work there. import module java.base (JEP 511) pulls in every exported package of a module in one line. The bare void main() is an instance main method in an implicitly declared class (JEP 512). IO.println comes from java.lang.IO, auto-imported in compact source files. All three went final in Java 25, so they are available in an LTS right now.
Records, sealed types and pattern matching have been final since Java 21, and together they change what idiomatic Java looks like more than anything in 27 does:
sealed interface Deploy permits Rollout, Rollback, Hold {}
record Rollout(String version, int percent) implements Deploy {}
record Rollback(String toVersion, String reason) implements Deploy {}
record Hold(String reason) implements Deploy {}
static String describe(Deploy d) {
return switch (d) {
case Rollout(var v, int p) when p >= 100 -> "full rollout of " + v;
case Rollout(var v, int p) -> p + "% of traffic on " + v;
case Rollback(var v, var why) -> "rolling back to " + v + ": " + why;
case Hold(var why) -> "held: " + why;
};
}
No default branch, and that is deliberate. Because Deploy is sealed, the compiler knows the four cases are exhaustive. Add a fifth record to the hierarchy and this stops compiling, which is exactly when you want to hear about it. Record patterns (JEP 440) destructure in the case label itself, so there is no cast and no accessor call.
The more useful example is Scoped Values, which also went final in 25 and which almost nobody has adopted. If you run virtual threads, this matters more than it sounds.
import java.util.concurrent.Callable;
public final class CallerContext {
public record Caller(String tenantId, String traceId) {}
private static final ScopedValue<Caller> CALLER = ScopedValue.newInstance();
/** Reads the caller bound to the current scope. */
public static Caller current() {
return CALLER.orElseThrow(
() -> new IllegalStateException("no caller bound in this scope"));
}
/** Binds a caller for the duration of one unit of work, and no longer. */
public static <T> T withCaller(Caller caller, Callable<T> body) throws Exception {
return ScopedValue.where(CALLER, caller).call(body::call);
}
}
And at the call site:
try (var pool = Executors.newVirtualThreadPerTaskExecutor()) {
for (var req : incoming) {
pool.submit(() -> CallerContext.withCaller(
new Caller(req.tenant(), req.traceId()),
() -> handle(req)));
}
}
Why bother, when ThreadLocal has worked since Java 1.2? Because ThreadLocal was designed when you had a few hundred threads. With virtual threads you might have a million, each carrying its own mutable map that nothing is obliged to clean up. A scoped value is immutable, its lifetime is bounded by the call or run it wraps, and child threads inherit it without copying. The binding cannot leak past the block, which is the actual point.
The syntax, for reference: ScopedValue.newInstance() to declare, ScopedValue.where(KEY, value).run(...) for a void body, .call(...) when you need a return value, and you can chain .where(X, v).where(Y, w) for multiple bindings.
A warning on its sibling. Structured concurrency is still a preview in Java 27, and it is on its seventh preview round (JEP 533). It has never been final. Its API changed again this release: joiners now throw ExecutionException instead of the preview-only FailedException, awaitAll() was removed, and Joiner.onTimeout() was renamed to timeout(). Do not build on it yet. I have seen two teams treat structured concurrency as shipped because it was announced in the same breath as virtual threads, and both had to rewrite when the API moved.
Same caution, different flavour, for Lazy Constants (JEP 531, third preview). You may know it as Stable Values. You may know it by its earlier name, Computed Constants. It has been renamed twice in three releases, which tells you something about how settled it is.
Why this release, and why Java at all

JetBrains' State of Java 2025, drawn from more than five thousand Java developers inside a survey of 24,534, shows something more interesting than the usual "adoption is up" line.
Java 21 went from 28% to 40% of respondents in a single year, climbing faster than Java 17 ever managed. Good news for the release train. Now look at the other line. Java 8 took six years to fall from 83% to 31%, and in 2025 it was still the third most-used version, seven years after Java 11 shipped.
Both facts are true and they point in opposite directions. Teams adopt new Java faster than they used to. They also abandon old Java at roughly the speed of continental drift. If you are planning a migration, plan against the second number.
Which brings me to the thing most coverage gets wrong about Java 27.

Oracle updates Java 27 until March 2027, at which point JDK 28 supersedes it. The next LTS is Java 29, due September 2027. Java 27 is a six-month waypoint between two long-term releases, and almost nobody should be running it in production.
That is not a criticism of the release. It is what a feature release is for. The right move is to run 27 in CI and on a staging environment specifically to find out how compact headers and G1 behave on your workload, so that when Java 29 lands with both defaults already on, you have an answer instead of an incident.
Against Go, C#, and Rust: the honest answer
I went looking for a credible, neutral, reproducible 2025 or 2026 benchmark comparing Java to Go, C# or Rust on a server workload.
There isn't one.
The TechEmpower Framework Benchmarks, which were the closest thing the industry had to a shared referee, were sunset and the repository archived in March 2026. The announcement gives no reason. Two successor projects exist and neither is close to the coverage TechEmpower had. The space that leaves is being filled with content-farm articles carrying invented precision, and I would not cite any of them.
The famous academic ranking, Pereira et al. on energy efficiency, is from 2021 and has since been taken apart in peer review. The rebuttal found the original data contained "multiple negative energy readings," which as it drily notes, "is not physically possible." Its actual conclusion is useful though: language implementation "has no significant impact on energy consumption beyond execution time." Java's apparent penalty in the original was largely JIT warmup. Average over ten runs instead of one and it mostly evaporates.
So here is the one number I found that is methodologically honest and makes Java look bad.

On AWS Lambda at 512 MB, a Quarkus application on the JVM cold-starts at 5,778 ms p50. Node.js 24 does the same workload in 541 ms. That is better than ten to one against Java, and the AOT work shipping in recent releases does not help inside Lambda. Only a GraalVM native image closes the gap, at 437 ms.
Three caveats, because the writer of that benchmark deserves them. The sample is fifty cold invocations per configuration, which is small. It is one author, one region, one workload, and he sells AWS serverless consulting, so a dramatic JVM number is commercially convenient. And his SnapStart row reports SnapStart roughly doubling cold start, which is almost certainly a misconfiguration and should lower your confidence in the whole table.
What I take from it: if your workload is bursty, short-lived and scale-to-zero, the JVM is the wrong default and has been for years. For a long-running service that warms up once and then handles traffic for weeks, the cold-start number is irrelevant and the JIT's steady-state performance is the reason Java is still here.
Pick the tool for the shape of the workload, not the shape of the Twitter argument.
Twenty-five years, and counting
Java turned thirty last year. The reasons it is still in the building are unglamorous and mostly have nothing to do with the language.
Backward compatibility, first and above everything. Code compiled against Java 5 generally still runs. That sounds boring until you have costed a Python 2 to 3 migration or watched a Scala major version split a codebase in half. Compatibility is the feature enterprises actually buy.
Then the runtime. Two production-grade generational collectors, a JIT that has had thirty years of tuning poured into it, and JFR, which gives you always-on production profiling at single-digit overhead with nothing to install. Most languages do not have one of those. Java has all three.
And the hiring argument, which people are oddly shy about. There is a deep pool of engineers who have shipped Java in anger, and a deeper pool of libraries that have been load-bearing in banks for fifteen years. Boring is a procurement advantage.
Azul's 2026 survey reports 62% of organisations now using Java for AI functionality, up from 50% a year earlier, from 2,039 qualified respondents. Treat that one with care: Azul sells a JDK, the survey was commissioned by Azul, and the findings land conveniently close to Azul's sales pitch. Its more interesting figure is that 92% of respondents are concerned about Oracle's Java pricing. Make of that what you will.
Here is the honest counterweight, from the same JetBrains data. Java's share for microservices fell from 51% in 2024 to 46% in 2025, while Python rose to 26% and Go to 19%. Java is not winning everywhere. It is winning where the application lives for a decade.
What would genuinely change the picture
Not Java 27. Java 28, maybe, and the thing to watch is Valhalla.
JEP 401 brings value objects: class instances with only final fields and no object identity, which lets the JVM "store domain values in ways that improve memory footprint, locality, and garbage collection efficiency." That is the end of the pointer-chasing penalty for small immutable types. It is the difference between an array of a million Point objects being a million heap allocations and being a flat block of memory.
Watch the slippage, though. In March 2026 JEP 401 was targeted at JDK 27. By August it was targeted at JDK 28. Valhalla has been in development since 2014.
And it has a hostage. The Vector API is in its twelfth incubator round in Java 27, with no substantial implementation changes since JDK 25, because it cannot be promoted to preview until Valhalla's features are available. Twelve rounds is not drift, it is a dependency.
Leyden, by contrast, is the project that quietly delivered. Ahead-of-time class loading landed in JDK 24, command-line ergonomics and method profiling in 25, object caching with any GC in 26. JEP 483 reports Spring PetClinic starting in 2.604 s against 4.486 s, a 42% improvement, though read that as an illustration rather than a benchmark: it is a single run with no variance published, and the JEP says the matching 42% on its other example is "by coincidence."
Babylon, the code-reflection project that would open Java to GPUs and SQL, has shipped nothing and its project page has not been meaningfully updated since June 2024.
Three things already in your JDK that you probably don't use
The Class-File API (JEP 484, final in JDK 24). A supported standard API in java.lang.classfile for parsing and generating bytecode. For twenty years that meant ASM, and ASM works fine until a new JDK changes the class-file format and everything downstream breaks until ASM catches up. The built-in API ships with the JDK that defines the format. If you maintain anything that touches bytecode, this removes a recurring upgrade blocker.
Markdown documentation comments (JEP 467, final in JDK 23). Write Javadoc in Markdown using /// instead of wrestling HTML inside /** */. It went straight to final with no preview round, got almost no marketing, and shipped in a non-LTS release, which is a reliable recipe for a feature nobody notices. It is in Java 25 LTS now.
/// Resolves a tenant from the request, or throws.
///
/// - never returns `null`
/// - see [CallerContext#current()]
Tenant resolve(Request request) { ... }
Scoped Values (JEP 506, final in JDK 25), covered above. Four preview rounds before it landed, and it finalised in the same announcement cycle as structured concurrency, which is why half the industry has it filed under "still preview."
If you're learning Java in 2026
Learn Java 21 or 25, not Java 8. Most tutorials you will find are written against a version that predates records, sealed types, pattern matching in switch, text blocks and virtual threads. The language you learn from a 2016 tutorial is not the language anyone is writing now.
The pairing I would actually recommend, for someone aiming at employability rather than purity:
Java 25 LTS, Spring Boot, PostgreSQL, Docker, and one cloud provider you know properly. That stack is unfashionable and it is what an enormous number of paying jobs look like. Add Kotlin if you drift toward Android or want a more concise syntax on the same JVM. Add GraalVM native image only when you hit a cold-start problem, because it costs you reflection, dynamic class loading and some debugging comfort.
What I would skip at the start: the Vector API, structured concurrency, and anything still carrying a preview label. Learning a preview API teaches you syntax that will change.
One more thing, and it is the most useful habit on this list. Learn to read a JEP. They are short, they are written by the people who built the thing, and the Motivation and Risks sections routinely contain admissions that never reach any article about the release. JEP 523 telling you Serial was better in constrained environments is a good example. I would not have known that from the announcement.
The bit I can't resolve
I do not know why compact object headers are described as roughly a 20% heap saving in the JDK 27 material when the measured figure one release earlier was 22% on one benchmark in one configuration. Maybe somebody rounded and generalised. Maybe there is newer internal data. The gap between a measurement and a round number has a way of being where the interesting part lives, and in this case I could not close it.
If you run the comparison on a real heap, with -XX:+UseCompactObjectHeaders against -XX:-UseCompactObjectHeaders on the same workload, I would genuinely like to see the numbers. That is the figure none of us have.
Sources
- Oracle, The Arrival of Java 27, 15 September 2026 — header sizes, JEP list, support window, 16% of fixes from independent developers
- Billy Korando, JDK 27 Runtime Updates, Inside Java, 12 September 2026 — the "should reduce overall heap size by about 20%" line, the
-XX:-UseCompactObjectHeadersflag, G1 heap-resizing change - JEP 519, Compact Object Headers (JDK 25) — "in one setting, the SPECjbb2015 benchmark uses 22% less heap space and 8% less CPU time"
- JEP 523, Make G1 the Default Garbage Collector in All Environments — the 1.8 GB / single-CPU threshold, Serial's admitted advantages, the "should not degrade significantly" assurance
- JEP 506, Scoped Values (JDK 25) — API shape and final status
- JEP 483, Ahead-of-Time Class Loading & Linking (JDK 24) — the PetClinic 4.486 s → 2.604 s illustration
- JEP 401, Value Objects — targeted at JDK 28, previously JDK 27
- Oracle JDK 27 release notes —
MinHeapFreeRatio/MaxHeapFreeRatiodefault change, planned removal of the compact-headers flag - New Relic, 2024 State of the Java Ecosystem — G1 43%, Serial 37%, 68% of applications on 1–4 cores. No 2025 or 2026 edition exists
- JetBrains, The State of Java 2025 — version adoption series, 5,000+ Java developers within 24,534 cleaned responses, fielded April–June 2025
- Azul, 2026 State of Java Survey & Report — 2,039 respondents, vendor-commissioned, conflict noted inline
- K-I-Soft, Lambda cold start, measured, 30 April 2026 — cold-start figures, caveats noted inline
- It's Not Easy Being Green: On the Energy Efficiency of Programming Languages (arXiv 2410.05460) — the rebuttal to Pereira et al.
- TechEmpower/FrameworkBenchmarks issue #10932 — Sunsetting the TechEmpower Framework Benchmarks
