deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

JDK 28 finalizes structured concurrency and extends AOT cache to compiled code

JDK 28, due in March 2027, finalizes structured concurrency after seven previews and extends Project Leyden's AOT cache to compiled code, alongside adaptive ZGC heap sizing and an incubating JSON API.

JDK 28 finalizes structured concurrency and extends AOT cache to compiled code

Structured concurrency is final in JDK 28

A dev.to digest covering Java and Kotlin news from 5 to 19 October 2026 reports that JEP 543 promotes structured concurrency to a final feature in JDK 28, ending seven rounds of preview. The API groups related subtasks under a single StructuredTaskScope: when one subtask fails, its siblings are cancelled, and the parent cannot finish while any child is still running.

Migration effort depends on the starting point. Code written against the JDK 27 preview only needs the preview flag removed. JDK 26 code has more to change: join() now signals failure with ExecutionException instead of FailedException, TimeoutException has been dropped, and custom joiners take a third type parameter describing the exception join() can throw. JDK 28 is scheduled for March 2027, and early access build 20 is already available for testing.

Project Leyden's AOT cache stores machine code

JEP 544 extends the ahead-of-time cache that Project Leyden has layered into recent releases. Because the JIT only optimizes heavily used methods after a warm-up period, the cache was introduced to pre-load that work: loaded classes arrived in JDK 24 and method profiles in JDK 25. The new JEP adds the compiled native code itself, so a production process begins execution with optimized code already in place. The workflow is unchanged: a training run records the cache, and the production run starts from it.

According to the JEP's own measurements, five framework benchmarks started 65 to 80 percent faster with the compiled code included, compared with 50 to 70 percent for the earlier cache. One constraint applies: the cached code loads only when the production machine's CPU features and garbage collector match those of the training run. The digest notes that serverless workloads and frequently scaling services stand to gain the most.

ZGC gets an adaptive heap

Two ZGC changes are targeted at JDK 28. JEP 546 adds an opt-in mode, switched on with a new adaptive heap sizing flag, in which the collector grows and shrinks the heap with load and hands memory back to other processes; the default ceiling rises to nearly all of system RAM. The JEP argues that configuring a maximum heap size is no longer needed. JEP 545, meanwhile, shortens ZGC's startup and warm-up. Containerized services are called out as the main beneficiaries.

An incubating JSON API, and lazy constants once more

JEP 540 brings a JSON API into the JDK as an incubator module, presented at Devoxx Belgium by Alan Bateman and Viktor Klang. A single Json.parse call returns a tree of JsonValue types; there is no data binding and no streaming, which positions it for tools and small services reading configuration rather than for application frameworks. It runs behind an incubator module flag and the API is expected to change.

JEP 547 proposes a fourth, unchanged preview of lazy constants, which compute their value once on first access across threads and let the JVM treat the result like a final field and fold it into reading code. The digest advises keeping them out of production code until the feature is final.

Kotlin and ecosystem notes

The Kotlin compiler is raising its floor. Version 2.5.0 will fail on a JDK older than 17 unless you opt out, and 2.5.20-Beta1 removes the opt-out entirely. This concerns the JDK that runs the compiler, not the bytecode target, so CI images and builds pinned to older JDKs will break after the upgrade. The latest stable release remains 2.4.21.

In tooling, the IntelliJ-run Java and Kotlin extension for VS Code and Cursor reached 1.0, bringing IntelliJ's completion, navigation, refactorings and debugger to those editors, though it now requires an IntelliJ IDEA Ultimate subscription after a 30-day trial. John O'Reilly ported his PeopleInSpace app from the SKIE plugin to Kotlin's alpha Swift export on a 2.5.0-Beta2 development build; trimming what the app exports cut the generated Swift from roughly 18,000 to 2,600 lines, although a function returning a type from a hidden dependency became a fatalError() stub with no build warning. Google's agent framework ADK also shipped version 1.4.0 of its Kotlin edition, adding a DSL for workflow graphs and a backend for OpenAI Chat Completions and compatible APIs.

Elsewhere, Helidon 27 opened Oracle's two-line release model, where the tip line tracks the newest JDK and the tail line stays on an older one with fixes.

Why it matters

JDK 28 shapes up as a milestone rather than an incremental drop. Final structured concurrency gives the virtual-thread model from Project Loom a stable coordination primitive, so services that fan out concurrent calls get failure handling and cancellation from the API instead of hand-written code. The compiled-code AOT cache attacks the JVM's long-standing warm-up penalty exactly where it hurts most, in serverless and elastic deployments, with measured startup cuts of up to 80 percent, while keeping the JIT for long-running processes. Adaptive ZGC sizing removes one more piece of container tuning. For Kotlin teams, the JDK 17 compiler floor is the operational item to check before the next upgrade.

  • #java
  • #jdk-28
  • #structured-concurrency
  • #jvm
  • #kotlin