Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
jdk28-preview
Companion module for the ankurm.com post What's Coming in JDK 28: Value Classes Preview and Strict Field Initialization.
Runs small programs on an early-access OpenJDK 28 build (28-ea+17, downloaded from jdk.java.net/28) and on JDK 25.0.4.1 for comparison. Early-access builds change weekly, and JEP status changes with them, so treat every transcript as a snapshot and rerun scripts/run-all.sh against a newer build.
export JDK28=/path/to/jdk-28-ea JDK25=/path/to/jdk-25
./scripts/run-all.sh
| Output | Shows |
|---|---|
00-environment.txt |
The exact builds used |
01-value-classes.txt |
JEP 401: == on value records, Integer identity, synchronizing on a value object |
02-forgot-the-preview-flag.txt |
The two errors you get without --enable-preview |
03-strict-init-flags.txt |
JEP 539: the ACC_STRICT_INIT field flag, value class vs identity class |
04-pem-encodings.txt |
JEP 542: PEMEncoder/PEMDecoder on 28 (no flag) and 25 (preview) |
05-json-incubator.txt |
JEP 540: jdk.incubator.json |
06-shenandoah.txt |
JEP 535 could not be tested on this build (see file) |
07-jep-status.txt |
Published JEP status, quoted (not run) |