Skip to content

jvm

25 Posts

Class Loading, Linking and Initialization in the JVM

Class loading, linking and initialization in the JVM, step by step: when static blocks run, why constants skip init, and what Could not initialize class means.

Java Heap Size in Containers: -Xmx vs MaxRAMPercentage

Java heap size in a container isn't what -Xmx says. How the JVM derives it from the cgroup limit, why 75% heaps still get OOMKilled, and how to budget the rest.

ThreadLocal Goes Missing Inside StructuredTaskScope

A ThreadLocal that worked fine in a thread pool returns null the moment a virtual thread forks a subtask. Here's the mechanism, and what actually fixes it.

Java InvalidClassException: local class incompatible

InvalidClassException: local class incompatible means the stream's serialVersionUID no longer matches your class. Here is why it drifted, and how to fix it without losing data.