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.
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 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.
How ZGC keeps pauses near zero on big heaps: colored pointers, load barriers, concurrent relocation, allocation stalls, and what generational ZGC changed.
GC roots decide what the JVM keeps alive. Thread stacks, statics, JNI handles and references, measured on JDK 21, plus the JIT surprise that frees a live local.
A switch on a null String, enum, Integer or sealed type throws NullPointerException, and default won't catch it. Why, how 8 to 25 differ, and the fix.
Method.invoke wraps everything its target throws in an InvocationTargetException with no message. Here's how to see the real cause, on JDK 8 through 25.
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.
Virtual threads pinned by synchronized collapse throughput to your CPU count and can hang outright. Diagnose pinning on JDK 21 and fix it on 24+.
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.
NoClassDefFoundError and ClassNotFoundException look interchangeable and are not. Read the frames, find the real cause, and stop the repeat throws.