java 8 → 27
every release, what it shipped, and the six-month train.
- chapter
- chapter 08.01
- reading time
- 6 min read
java ships a new release every six months, in march and september, whether a given feature is ready or not. every two years one of them is LTS (long-term support): 17, 21, 25, and next, 29.
the latest release is java 27 (september 15, 2026). the latest LTS is java 25 (september 16, 2025). big features don't appear out of nowhere: they arrive as previews or incubators first and go final a few releases later.
the picture
you know how "java 8" sounds ancient and "java 27" sounds like a typo? they're both real. java 8 came out in 2014, then java 9 took three and a half years, and that delay is why everything changed: since java 10 (march 2018) there's a release every six months, like a train that leaves on schedule. a feature that's ready gets on. a feature that isn't waits for the next train.
- ✓compact source files and instance main methodslanguage · JEP 512
- ✓module import declarationslanguage · JEP 511
- ✓flexible constructor bodieslanguage · JEP 513
- ✓scoped valuesapi · JEP 506
- ✓compact object headersjvm · JEP 519
- ✓key derivation function APIapi · JEP 510
- ✓AOT method profiling, AOT command-line ergonomicsjvm · JEP 515
- ✓generational Shenandoahjvm · JEP 521
- − 32-bit x86 port removed (JEP 503)
how to read a track
look at pattern matching. it isn't one feature, it's four tracks that land one after another: instanceof patterns (previewed in 14 and 15, final in 16), sealed classes (final in 17), patterns in switch (four previews, 17 to 20), and record patterns (19 and 20). everything clicked together in java 21, and that's when "data-oriented programming" became a thing you could actually do in java (more on that).
the stages, in order:
- incubator
- an API in a
jdk.incubator.*module that you add with--add-modules. early, and allowed to change completely. (the vector API has been incubating since 16.) - experimental
- a JVM feature behind
-XX:+UnlockExperimentalVMOptions. how runtime features like new GC modes start out. - preview
- a language feature or API that's fully specified and implemented, but not permanent. you need
--enable-preview. it can change, and it can be withdrawn. - final
- permanent. part of java SE from then on, no flags.
the whole process, flags and class file versions included, is in preview and incubator features. the short version: string templates are the proof that preview means preview. they were previewed in 21 and 22, then withdrawn in 2024 (JEP 465) to rethink the design, and java 23 shipped without them.
LTS, and why companies care
a regular release gets security updates for six months, until the next one ships. an LTS release gets them for years, from many vendors. so most companies run an LTS, and jump from one to the next.
| LTS | released | what made it the one people moved to |
|---|---|---|
| 8 | march 2014 | lambdas and streams. the release a lot of the world stayed on for a decade |
| 11 | september 2018 | first LTS of the new cadence. HttpClient, java Main.java |
| 17 | september 2021 | records, sealed classes, text blocks, switch expressions: modern java, all final |
| 21 | september 2023 | virtual threads, pattern matching for switch, record patterns |
| 25 | september 2025 | compact source files, flexible constructors, scoped values, compact object headers |
the gap used to be three years (11 → 17). in 2021 it was shortened to two, which is why 21 came right after 17, then 25, and next is 29, planned for september 2027.
- 21pattern matching for switch
- 21record patterns
- 22unnamed variables and patterns (_)
- 25compact source files and instance main methods
- 25module import declarations
- 25flexible constructor bodies
- 18UTF-8 by default
- 21sequenced collections
- 21key encapsulation mechanism API
- 22foreign function and memory API
- 24stream gatherers
- 24class-file API
- 24quantum-resistant ML-KEM and ML-DSA
- 25scoped values
- 25key derivation function API
- 18core reflection reimplemented with method handles
- 19linux on RISC-V
- 21virtual threads
- 21generational ZGC
- 22region pinning for G1
- 23generational mode is ZGC's default
- 24virtual threads stop pinning on synchronized
- 24ahead-of-time class loading and linking
- 25compact object headers
- 25AOT method profiling, AOT command-line ergonomics
- 25generational Shenandoah
- 18jwebserver, a simple web server
- 18code snippets in javadoc
- 22multi-file java Main.java
- 23markdown documentation comments
which java am I on?
the version string changed with the cadence. java 8 still calls itself 1.8.0_..., everything from 9 on is just the number.
void main() {
IO.println(Runtime.version().feature());
}25
Runtime.version() gives you the full thing (on the JDK this site was checked with: 25.0.4.1+1-LTS). feature() is the number people mean when they say "java 25". and the class files you compile record it too: javac 25 writes class file version 69 by default, and an older JVM refuses to load it. see compile and run.
- a release every six months, march and september. 27 is the latest (sep 15, 2026).
- an LTS every two years: 17, 21, 25, next 29. most production code runs an LTS.
- big features arrive as incubator, experimental or preview first, then go final.
- previews can change or be withdrawn. string templates were.
- compile for an older runtime with
--release N, not-source/-target.