Repository navigation
What's New
Portable snapshots
Snapshots now carry richer JVM metadata and can optionally bundle the user's class file bytes for fully self-contained restore.
SnapshotEnvironmentgains six new fields populated from system properties at freeze time:javaRuntimeVersion(e.g.21.0.2+13-LTS),javaVendor(Temurin / Oracle / Corretto / GraalVM),javaVmName(HotSpot / OpenJ9 / GraalVM),javaSpecificationVersion,osArch, andarchDataModel. A restore-side tool can tell an operator exactly which JDK to provision instead of just "Java 21".- New opt-in
Durable.setEmbedClassBytecodes(boolean)toggle. When enabled, every user class reachable from the snapshot is bundled insideSnapshotEnvironment.ClassEntry.bytecode. On restore,EmbeddedClassInstallerwrites a temp jar and callsInstrumentation.appendToSystemClassLoaderSearchso missing classes become loadable. Default is off (smaller snapshots for the common same-classpath case); turn on for portable checkpoints.
Backwards compatible: older snapshots deserialize with the new fields null via Java's standard missing-field handling (SUID unchanged).
Internal refactors (no behavior change)
JdiHelpersplit into three focused files:PortEnumerator(per-OS listening-port enumeration),PortProber(parallel JDI probes + nonce verification with hard per-probe timeouts),SelfConnection(singleton self-attach lifecycle). Makes the self-attach subsystem easier to navigate and independently extractable.- New
internal/handlers/package: every JDK-type quirk (collections,StringBuilder, boxed primitives,BigDecimal/UUID/java.time.*, enums,java.lang.Objectsentinel, opaque fail-fast, regular-object Objenesis path) now lives in a singleTypeHandlerfile that pairs capture and restore.JdiHeapWalkerdropped from ~1240 lines to ~160;HeapRestorerfrom ~450 to ~210. Ordering-sensitive dispatch documented inTypeHandlerRegistry.
API additions
Durable.setEmbedClassBytecodes(boolean)/Durable.isEmbedClassBytecodes()SnapshotEnvironment.javaRuntimeVersion(),javaVendor(),javaVmName(),javaSpecificationVersion(),osArch(),archDataModel()SnapshotEnvironment.ClassEntry.bytecode()
Tests
232 unit tests (+13), 46 E2E tests (+1). Every JDK-type handler retains its prior correctness; new tests cover flag toggling, snapshot round-trip with embedded bytes, and environment field round-trip.