Reference
Glossary
84 terms, each explained simply and in depth. Terms underlined with dots anywhere on the site open these explanations in place.
- <clinit>also: class initialization method
The hidden method the compiler builds from a class's static blocks and static field initializers.
Why it exists
It gives static initialization ordinary bytecode that the JVM can run under its initialization rules.
Where it fits
Initialization in the JVM anatomySources
- SpecJVMS §2.9 Special Methods(opens in a new tab)
Instance initialization methods <init> and class initialization methods <clinit>. · Java SE 25
- Spec
- <init>also: instance initialization method, constructor
The bytecode name of a constructor.
Why it exists
It separates allocation (
new) from construction, while the verifier guarantees objects are initialized before use.Related
Sources
- SpecJVMS §2.9 Special Methods(opens in a new tab)
Instance initialization methods <init> and class initialization methods <clinit>. · Java SE 25
- SpecJVMS §6.5 invokespecial(opens in a new tab)
Invokes instance initialization methods, private methods and superclass methods. · Java SE 25
- Spec
- Application class loaderalso: System class loader
The loader for your own classes and the libraries on your class path.
Why it exists
Applications need a default loader that knows where their classes are.
Where it fits
Application class loader in the JVM anatomySources
- APIjava.lang.ClassLoader(opens in a new tab)
Built-in loaders, the delegation model, and getPlatformClassLoader / getSystemClassLoader. · Java SE 25
- API
- Bootstrap class loader
The JVM's built-in loader for the core classes such as
ObjectandString. Java code sees it asnull.Why it exists
Someone has to load the classes that class loaders themselves are made of.
Where it fits
Bootstrap class loader in the JVM anatomySources
- SpecJVMS §5.3.1 Loading Using the Bootstrap Class Loader(opens in a new tab)
The bootstrap loader searches for a class representation in an implementation-dependent way. · Java SE 25
- Sourcemodule-loader-map.conf(opens in a new tab)
Which JDK modules are defined by the boot loader and which by the platform loader. · JDK 25 GA (tag jdk-25-ga)
- Spec
- Bytecode
The compact instruction language inside
.classfiles, designed for the JVM rather than for any particular CPU.Why it exists
A portable, verifiable, compact format that any JVM can interpret or compile to native code.
Misconception: The CPU executes bytecode.
CPUs execute only native machine code. Bytecode is interpreted by machine-code templates or compiled to machine code by the JIT.
Where it fits
Class file in the JVM anatomySources
- SpecJVMS §2.11 Instruction Set Summary(opens in a new tab)
Opcodes, operands and the inner loop of a JVM interpreter. · Java SE 25
- ToolThe javap command(opens in a new tab)
Disassembles class files: constant pool, descriptors and bytecode. · JDK 25
- Spec
- C1also: client compiler
HotSpot's fast compiler.
Why it exists
To get hot code out of the interpreter quickly.
Where it fits
C1 compiler in the JVM anatomyRelated
Sources
- Sourcec1_Compilation.hpp(opens in a new tab)
The C1 (client) compiler. · JDK 25 GA (tag jdk-25-ga)
- Source
- C2also: server compiler, opto
HotSpot's thorough compiler, producing the fastest code.
Why it exists
Peak performance for the code that dominates run time.
Where it fits
C2 compiler in the JVM anatomySources
- Sourcecompile.hpp(opens in a new tab)
The C2 (server, "opto") compiler. · JDK 25 GA (tag jdk-25-ga)
- Source
- Class data sharing (CDS)
A start-up shortcut: the JVM maps pre-processed core classes from an archive file instead of loading them one by one.
Why it exists
Start-up time and memory: loading hundreds of classes from scratch on every launch is wasteful.
Where it fits
Bootstrap class loader in the JVM anatomySources
- JEPJEP 341: Default CDS Archives(opens in a new tab)
A class data sharing archive is shipped and used by default. · JDK 12
- JEPJEP 483: Ahead-of-Time Class Loading & Linking(opens in a new tab)
Classes can be loaded and linked ahead of time into an AOT cache. · JDK 24
- JEP
- Class file
The compiled form of one Java class: its name, fields, methods and their bytecode.
Why it exists
A stable, documented contract between any compiler and any JVM.
Where it fits
Class file in the JVM anatomyRelated
Sources
- SpecJVMS §4.1 The ClassFile Structure(opens in a new tab)
Magic number, versions, constant pool, fields, methods and attributes. · Java SE 25
- Spec
- Class loader
A part of the JVM, or a Java object, that finds the bytes of a class and hands them to the JVM.
Why it exists
To load classes from anywhere (files, JARs, modules, networks, memory) and to isolate groups of classes from each other.
Where it fits
Class loader subsystem in the JVM anatomySources
- APIjava.lang.ClassLoader(opens in a new tab)
Built-in loaders, the delegation model, and getPlatformClassLoader / getSystemClassLoader. · Java SE 25
- SpecJVMS §5.3 Creation and Loading(opens in a new tab)
Defining and initiating loaders; loading with the bootstrap and user-defined loaders. · Java SE 25
- API
- Class unloading
Removing classes from memory, possible only together with the class loader that loaded them.
Why it exists
Long-running programs that load code dynamically must eventually free the metadata of code no longer used.
Where it fits
Unloading in the JVM anatomySources
- SpecJLS §12.7 Unloading of Classes and Interfaces(opens in a new tab)
Unloading is permitted, and only when the defining loader is reclaimable. · Java SE 25
- Spec
- Code cache
The memory where the JVM keeps machine code it generated.
Why it exists
Generated code needs executable memory managed separately from the heap.
Where it fits
Code cache in the JVM anatomySources
- JEPJEP 197: Segmented Code Cache(opens in a new tab)
Code cache split into non-method, profiled and non-profiled segments. · JDK 9
- SourcecodeCache.hpp(opens in a new tab)
Code cache and its code heaps (segments). · JDK 25 GA (tag jdk-25-ga)
- JEP
- Compressed oops
A memory-saving trick: object references are stored in 4 bytes instead of 8.
Why it exists
Smaller references mean smaller objects and better cache use.
Misconception: A Java reference is the memory address of the object.
It may be an encoded 32-bit value, and moving collectors change addresses while the program runs.
Where it fits
Heap in the JVM anatomyRelated
Sources
- ToolThe java command(opens in a new tab)
Launcher syntax, -Xss, -Xmx, -Xlog and the HotSpot -XX options. · JDK 25
- Tool
- Constant pool
A numbered table in each class file listing the names and constants the class's code uses.
Why it exists
Sharing names and constants in one table keeps bytecode small and lets references stay symbolic until run time.
Where it fits
Class file in the JVM anatomySources
- SpecJVMS §4.4 The Constant Pool(opens in a new tab)
Constant pool entry kinds such as Class, Fieldref, Methodref and String. · Java SE 25
- Spec
- Defining loader
The class loader that actually created a class from its bytes. It is part of the class's identity.
Why it exists
Identity per loader makes isolation possible: two plugins can each have their own version of a class.
Misconception: Classes with the same fully qualified name are always the same class.
Only if the same loader defined them; otherwise casting between them fails with
ClassCastException.Where it fits
Loading in the JVM anatomySources
- SpecJVMS §5.3 Creation and Loading(opens in a new tab)
Defining and initiating loaders; loading with the bootstrap and user-defined loaders. · Java SE 25
- SpecJVMS §5.3.4 Loading Constraints(opens in a new tab)
Constraints that keep type safety when classes are visible through different loaders. · Java SE 25
- Spec
- Deoptimization
Falling back from optimized code to the interpreter when an assumption turns out wrong.
Why it exists
It makes speculative optimization safe.
Where it fits
Deoptimization in the JVM anatomySources
- Sourcedeoptimization.hpp(opens in a new tab)
Deoptimization and the reasons uncommon traps record. · JDK 25 GA (tag jdk-25-ga)
- Source
- Dynamic linking
Each frame knows which class's constant table to use, so names in its code can be looked up while running.
Why it exists
Method and field references are bound at run time, not at compile time.
Where it fits
Frame data in the JVM anatomySources
- SpecJVMS §2.6.3 Dynamic Linking(opens in a new tab)
Each frame refers to the run-time constant pool of the current method's class. · Java SE 25
- Spec
- Eden
Where new objects are born.
Why it exists
A dedicated nursery makes allocation simple and collection of short-lived objects cheap.
Where it fits
Eden in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- Escape analysis
The compiler checks whether an object ever leaves a method; if not, it may not need a real heap object at all.
Why it exists
Idiomatic Java creates many short-lived helper objects; removing them is a large win.
Misconception: Every `new` creates an object in the heap.
In compiled code, objects that do not escape may never be allocated.
Where it fits
Optimization in the JVM anatomySources
- Sourceescape.hpp(opens in a new tab)
C2 escape analysis. · JDK 25 GA (tag jdk-25-ga)
- Source
- Foreign Function & Memory API
A modern Java API for calling C functions and using off-heap memory without writing C glue code.
Why it exists
JNI is verbose and error-prone; FFM is safer and needs no native code of your own.
Where it fits
Native interface in the JVM anatomySources
- JEPJEP 454: Foreign Function & Memory API(opens in a new tab)
A supported alternative to JNI for calling native code. · JDK 22
- APIjava.lang.foreign package(opens in a new tab)
Foreign Function & Memory API: calling native code and accessing off-heap memory. · Java SE 25
- JEP
- Framealso: stack frame
The workspace of one method call: its local variables and a scratch stack.
Why it exists
Each invocation needs its own state, separate from other calls of the same method.
Where it fits
Stack frame in the JVM anatomySources
- SpecJVMS §2.6 Frames(opens in a new tab)
A frame is created per method invocation and destroyed when it completes. · Java SE 25
- Spec
- G1 (Garbage-First)
The default garbage collector, which divides the heap into regions and cleans the most wasteful ones first.
Why it exists
A balanced default: good throughput with predictable pauses.
Where it fits
G1 (Garbage-First) in the JVM anatomySources
- JEPJEP 248: Make G1 the Default Garbage Collector(opens in a new tab)
G1 became the default collector on server-class machines. · JDK 9
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- JEP
- G1 region
One of many equal-sized blocks the G1 collector divides the heap into.
Why it exists
Regions let G1 collect a chosen subset of the heap, the regions with the most garbage, to meet pause-time goals.
Where it fits
Heap in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Sourceg1CollectedHeap.hpp(opens in a new tab)
The G1 collector's heap. · JDK 25 GA (tag jdk-25-ga)
- Guide
- Garbage collection
Automatic cleanup: finding objects nothing refers to any more and reusing their memory.
Why it exists
Manual memory management causes leaks, dangling pointers and double frees.
Misconception: Objects are freed as soon as they become unreachable.
They become eligible; a later collection reclaims them, or none does before the program ends.
Where it fits
Garbage collector in the JVM anatomySources
- SpecJVMS §2.5.3 Heap(opens in a new tab)
Shared heap for all class instances and arrays, reclaimed by automatic storage management. · Java SE 25
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Spec
- GC roots
The starting points of the search for live objects: variables in running methods, static fields and a few JVM-held references.
Why it exists
Reachability must start from references the program can definitely use.
Where it fits
GC roots in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- Heap (Java heap)
The shared memory where all objects and arrays live, cleaned up automatically by the garbage collector.
Why it exists
Objects must outlive the method call that creates them and be shareable between threads.
Misconception: The Java heap is the same as the operating system heap used by `malloc`.
They are separate parts of process memory. The JVM manages the Java heap itself; native code uses the C heap.
Where it fits
Heap in the JVM anatomySources
- SpecJVMS §2.5.3 Heap(opens in a new tab)
Shared heap for all class instances and arrays, reclaimed by automatic storage management. · Java SE 25
- Spec
- HotSpot
The JVM that ships with OpenJDK and most Java downloads. Its name comes from finding the "hot spots" of a program and compiling them.
Why it exists
The specification describes behaviour; somebody has to build a fast, production-quality machine that implements it.
Where it fits
Java Virtual Machine in the JVM anatomySources
- GuideJava Virtual Machine Guide(opens in a new tab)
HotSpot features including class data sharing, compilation and signal handling. · JDK 25
- Guide
- Humongous object
In G1, an object so big it gets its own run of heap regions.
Why it exists
Copying very large objects during young collections would be expensive.
Where it fits
Old generation in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- Initialization (class)
Running a class's static setup code, once, the first time the class is really used.
Why it exists
Static state must be set up exactly once, at a predictable time, safely across threads.
Misconception: Static initializers run when the program starts.
They run at the class's first active use, which may be late in the program or never.
Where it fits
Initialization in the JVM anatomyRelated
Sources
- SpecJVMS §5.5 Initialization(opens in a new tab)
Executing <clinit>; the conditions that trigger initialization and its locking procedure. · Java SE 25
- SpecJLS §12.4.1 When Initialization Occurs(opens in a new tab)
The exact events that trigger class or interface initialization. · Java SE 25
- Spec
- Inlining
Copying a small method's body into the place that calls it, so the call disappears.
Why it exists
Removes call overhead and lets the optimizer see caller and callee together.
Where it fits
Optimization in the JVM anatomySources
- Sourcecompile.hpp(opens in a new tab)
The C2 (server, "opto") compiler. · JDK 25 GA (tag jdk-25-ga)
- Source
- Interpreter
The part of the JVM that runs bytecode one instruction at a time, starting immediately.
Why it exists
To run code with no compilation delay and to observe how it behaves.
Where it fits
Interpreter in the JVM anatomySources
- SpecJVMS §2.11 Instruction Set Summary(opens in a new tab)
Opcodes, operands and the inner loop of a JVM interpreter. · Java SE 25
- Spec
- javac
The Java compiler. It checks your
.javafiles and turns them into.classfiles.Why it exists
To separate checking and translating the language from executing it.
Where it fits
javac in the JVM anatomyRelated
Sources
- ToolThe javac command(opens in a new tab)
Compiles Java source files into class files. · JDK 25
- Tool
- JDKalso: Java Development Kit
The download developers install: a Java runtime plus tools such as
javac,javapandjcmd.Why it exists
Developers need both a runtime to run programs and tools to build, inspect and diagnose them.
Misconception: JDK, JRE and JVM are three names for the same thing.
The runs bytecode; a runtime (historically the ) is the JVM plus the class library; the JDK adds development tools.
Where it fits
Build time in the JVM anatomySources
- ToolThe javac command(opens in a new tab)
Compiles Java source files into class files. · JDK 25
- Tool
- jimage (lib/modules)
The single file in a modern JDK that contains all the platform's classes.
Why it exists
Faster lookup and a modular, linkable runtime layout.
Where it fits
Bootstrap class loader in the JVM anatomySources
- JEPJEP 220: Modular Run-Time Images(opens in a new tab)
The runtime image layout and the lib/modules jimage file. · JDK 9
- JEP
- JIT compilationalso: just-in-time compilation
Turning frequently used bytecode into native machine code while the program runs.
Why it exists
Interpreting is slow; compiling everything up front is slow to start and lacks run-time knowledge.
Where it fits
JIT compiler in the JVM anatomySources
- SourcecompilationPolicy.hpp(opens in a new tab)
Tiered compilation levels 0–4 and the thresholds that move methods between them. · JDK 25 GA (tag jdk-25-ga)
- SpecJVMS §2.13 Public Design, Private Implementation(opens in a new tab)
Implementations may translate bytecode to native code and choose their own internals. · Java SE 25
- Source
- JNI (Java Native Interface)
The standard way for Java and C/C++ code to call each other.
Why it exists
To reach OS services, hardware and existing native libraries from Java.
Where it fits
JNI in the JVM anatomySources
- SpecJava Native Interface Specification(opens in a new tab)
JNIEnv, local and global references, native method registration and the Invocation API. · Java SE 25
- Spec
- JNIEnv
The handle native code receives to talk back to the JVM.
Why it exists
It gives native code a stable, VM-independent way to use Java objects.
Where it fits
JNI in the JVM anatomySources
- SpecJava Native Interface Specification(opens in a new tab)
JNIEnv, local and global references, native method registration and the Invocation API. · Java SE 25
- Spec
- JREalso: Java Runtime Environment
A Java runtime without the developer tools: enough to run Java programs, not to build them.
Why it exists
End users needed to run Java programs without installing developer tools.
Where it fits
Java Virtual Machine in the JVM anatomySources
- JEPJEP 220: Modular Run-Time Images(opens in a new tab)
The runtime image layout and the lib/modules jimage file. · JDK 9
- JEP
- JVMalso: Java Virtual Machine
The engine that runs Java bytecode on a real computer, managing memory and turning bytecode into machine work.
Why it exists
"Write once, run anywhere": one compiled class file behaves the same on every operating system and CPU.
Where it fits
Java Virtual Machine in the JVM anatomySources
- SpecJVMS §2.13 Public Design, Private Implementation(opens in a new tab)
Implementations may translate bytecode to native code and choose their own internals. · Java SE 25
- Spec
- JVM stack
Each thread's stack of method calls; every call adds a frame on top.
Why it exists
Nested calls need private, short-lived storage that is released automatically on return.
Where it fits
JVM stack in the JVM anatomySources
- SpecJVMS §2.5.2 Java Virtual Machine Stacks(opens in a new tab)
Per-thread stacks of frames; StackOverflowError and OutOfMemoryError conditions. · Java SE 25
- Spec
- Linking
Getting a loaded class ready: check it, set up its static fields, and connect its names to real classes and methods.
Why it exists
To make sure a class is safe and complete before its code runs.
Where it fits
Linking in the JVM anatomySources
- SpecJVMS §5.4 Linking(opens in a new tab)
Verification, preparation and (optionally lazy) resolution. · Java SE 25
- Spec
- Loading
The first step in using a class: find its compiled bytes and build an internal description of it.
Why it exists
Classes are needed on demand and can come from many sources.
Misconception: Loading a class runs its static initializer.
is a separate, later step with its own triggers.
Where it fits
Loading in the JVM anatomySources
- SpecJVMS §5.3 Creation and Loading(opens in a new tab)
Defining and initiating loaders; loading with the bootstrap and user-defined loaders. · Java SE 25
- Spec
- Local variable array
The numbered slots holding a method's parameters and local variables.
Why it exists
Fast, indexed storage that the verifier can type-check.
Where it fits
Local variable array in the JVM anatomyRelated
Sources
- SpecJVMS §2.6.1 Local Variables(opens in a new tab)
Array of local variables sized at compile time; long and double use two slots. · Java SE 25
- Spec
- Machine codealso: native code
Instructions in the language of one particular kind of processor (CPU). It is the only kind of instruction a processor can run by itself.
Why it exists
Processors differ. Bytecode stays the same everywhere, and each JVM produces machine code for the processor it runs on.
Sources
- SpecJVMS §2.13 Public Design, Private Implementation(opens in a new tab)
Implementations may translate bytecode to native code and choose their own internals. · Java SE 25
- SourcetemplateInterpreter.hpp(opens in a new tab)
HotSpot's template interpreter, generated at VM startup. · JDK 25 GA (tag jdk-25-ga)
- Spec
- Mark word
The first part of every object's header, holding things like its hash code and age.
Why it exists
It packs frequently needed per-object state into one word.
Where it fits
Heap in the JVM anatomyRelated
Sources
- SourcemarkWord.hpp(opens in a new tab)
Object header (mark word) bit layout, with and without compact headers. · JDK 25 GA (tag jdk-25-ga)
- Source
- Metaspace
HotSpot's memory for class information. It lives outside the Java heap.
Why it exists
Sizing a fixed PermGen inside the heap was a frequent source of
OutOfMemoryErrors.Misconception: Static fields are stored in Metaspace.
In HotSpot static field values live in the
java.lang.Classmirror object in the Java heap.Where it fits
Method area in the JVM anatomySources
- JEPJEP 122: Remove the Permanent Generation(opens in a new tab)
Class metadata moved from PermGen (Java heap) to Metaspace (native memory). · JDK 8
- Sourcemetaspace.hpp(opens in a new tab)
Metaspace: native memory for class metadata. · JDK 25 GA (tag jdk-25-ga)
- JEP
- Method area
Where the JVM keeps what it knows about each class: methods, bytecode, fields and constants.
Why it exists
Class definitions are shared by all objects and threads, so they are stored once.
Where it fits
Method area in the JVM anatomySources
- SpecJVMS §2.5.4 Method Area(opens in a new tab)
Shared per-class structures; "logically part of the heap", location not mandated. · Java SE 25
- Spec
- Method profile (MethodData)
Statistics the JVM records about a method while it runs: which types and branches it actually sees.
Why it exists
Profile-guided speculation lets C2 optimize for the common case.
Where it fits
Runtime profiling in the JVM anatomySources
- SourcemethodData.hpp(opens in a new tab)
MethodData (MDO): per-method profiling information. · JDK 25 GA (tag jdk-25-ga)
- Source
- Module
A named group of Java packages that declares what it needs and what it shares, like
java.baseorjava.sql.Why it exists
Strong encapsulation and reliable configuration for the JDK and for large applications.
Where it fits
Parent delegation in the JVM anatomySources
- JEPJEP 261: Module System(opens in a new tab)
Platform class loader, module-aware delegation, and the module path. · JDK 9
- SpecJVMS §5.3.6 Modules and Layers(opens in a new tab)
Run-time modules, layers and how class loaders map to them. · Java SE 25
- JEP
- Native library
A file of machine code (
.so,.dylib,.dll) that Java can load and call.Why it exists
Some functionality exists only as native code.
Where it fits
Native libraries in the JVM anatomySources
- APISystem.loadLibrary(String)(opens in a new tab)
Loads a native library; the name is mapped to a platform-specific file name. · Java SE 25
- JEPJEP 472: Prepare to Restrict the Use of JNI(opens in a new tab)
Warnings when JNI is used without --enable-native-access. · JDK 24
- API
- Native method stack
Stack space for native (C/C++) code called from Java.
Why it exists
Native code follows the platform's C calling convention and needs a conventional stack.
Where it fits
Native method stack in the JVM anatomySources
- SpecJVMS §2.5.6 Native Method Stacks(opens in a new tab)
Conventional "C stacks" used to support native methods. · Java SE 25
- Spec
- nmethod
HotSpot's name for one compiled Java method.
Why it exists
Compiled code needs metadata so the GC, deoptimization and stack walking can understand it.
Where it fits
Code cache in the JVM anatomyRelated
Sources
- Sourcenmethod.hpp(opens in a new tab)
Compiled Java methods (nmethods) and their states. · JDK 25 GA (tag jdk-25-ga)
- Source
- Object header
Hidden bookkeeping stored at the start of every object.
Why it exists
The JVM needs per-object data for locking, hashing, GC and finding the object's class.
Where it fits
Heap in the JVM anatomySources
- SourcemarkWord.hpp(opens in a new tab)
Object header (mark word) bit layout, with and without compact headers. · JDK 25 GA (tag jdk-25-ga)
- JEPJEP 519: Compact Object Headers(opens in a new tab)
Compact object headers became a product feature (off by default). · JDK 25
- SpecJVMS §2.7 Representation of Objects(opens in a new tab)
The JVM does not mandate any particular internal structure for objects. · Java SE 25
- Source
- Old generation
The part of the heap for long-lived objects, cleaned less often.
Why it exists
Long-lived objects should not be copied again and again by young collections.
Where it fits
Old generation in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- On-stack replacement (OSR)
Switching a method that is already running a long loop over to compiled code, mid-loop.
Why it exists
A method called once but looping for a long time (like
main) would otherwise never benefit from compilation.Where it fits
Compilation in the JVM anatomySources
- SourcecompilationPolicy.hpp(opens in a new tab)
Tiered compilation levels 0–4 and the thresholds that move methods between them. · JDK 25 GA (tag jdk-25-ga)
- Source
- Operand stack
A small scratch stack in each frame where the JVM puts values while computing.
Why it exists
A stack machine needs no register names, which keeps bytecode compact and portable.
Misconception: Compiled Java code still pushes and pops an operand stack.
The JIT maps stack slots to CPU registers; the operand stack is a model.
Where it fits
Operand stack in the JVM anatomySources
- SpecJVMS §2.6.2 Operand Stacks(opens in a new tab)
LIFO operand stack with a maximum depth fixed at compile time. · Java SE 25
- Spec
- OutOfMemoryError
The error thrown when the JVM cannot get memory it needs.
Why it exists
Memory is finite; the JVM reports exhaustion as an error the application can log or, rarely, handle.
Where it fits
Heap in the JVM anatomySources
- SpecJVMS §2.5.3 Heap(opens in a new tab)
Shared heap for all class instances and arrays, reclaimed by automatic storage management. · Java SE 25
- SpecJVMS §2.5.4 Method Area(opens in a new tab)
Shared per-class structures; "logically part of the heap", location not mandated. · Java SE 25
- Spec
- Parent delegation
The rule that a class loader asks its parent for a class before looking for it itself.
Why it exists
To keep core classes authoritative and to give each loader a consistent view of types.
Misconception: Loaders are always strictly parent-first.
Built-in loaders route by module first, and custom loaders (for example in web containers) may load child-first.
Where it fits
Parent delegation in the JVM anatomySources
- SourceBuiltinClassLoader.java(opens in a new tab)
loadClassOrNull: module-aware lookup, then parent delegation, then class path. · JDK 25 GA (tag jdk-25-ga)
- APIjava.lang.ClassLoader(opens in a new tab)
Built-in loaders, the delegation model, and getPlatformClassLoader / getSystemClassLoader. · Java SE 25
- Source
- PC registeralso: program counter
Each thread's bookmark: which bytecode instruction it is executing.
Why it exists
A thread must know where to continue after a call or a context switch.
Where it fits
PC register in the JVM anatomyRelated
Sources
- SpecJVMS §2.5.1 The pc Register(opens in a new tab)
Each thread has its own pc register; undefined while a native method runs. · Java SE 25
- Spec
- Platform class loader
The loader for parts of the Java platform that are not core, such as the database API
java.sql.Why it exists
To load platform modules with fewer privileges than core classes, and to let them be left out of custom runtimes.
Where it fits
Platform class loader in the JVM anatomySources
- APIjava.lang.ClassLoader(opens in a new tab)
Built-in loaders, the delegation model, and getPlatformClassLoader / getSystemClassLoader. · Java SE 25
- JEPJEP 261: Module System(opens in a new tab)
Platform class loader, module-aware delegation, and the module path. · JDK 9
- API
- Platform thread
A normal Java thread, backed by one operating-system thread.
Why it exists
It maps Java concurrency directly onto the OS scheduler.
Where it fits
Java thread in the JVM anatomyRelated
Sources
- SourcejavaThread.hpp(opens in a new tab)
HotSpot's representation of a Java thread. · JDK 25 GA (tag jdk-25-ga)
- Source
- Preparation
Reserving the static variables of a class and setting them to defaults: 0, false or null.
Why it exists
So every static field has a defined value before any code can observe it.
Where it fits
Preparation in the JVM anatomySources
- SpecJVMS §5.4.2 Preparation(opens in a new tab)
Creates static fields and initializes them to default values. · Java SE 25
- Spec
- Reachability
Whether a program can still get to an object by following references from a root.
Why it exists
Reachability is the precise definition of "no longer needed".
Where it fits
GC roots in the JVM anatomySources
- SpecJLS §12.6 Finalization of Class Instances(opens in a new tab)
Reachability terminology and the (deprecated) finalization mechanism. · Java SE 25
- APIjava.lang.ref package(opens in a new tab)
Strong, soft, weak and phantom reachability. · Java SE 25
- Spec
- Reference
A value that points to an object, like
p1pointing to a Person. Copying it copies the pointer, not the object.Why it exists
Objects live in the heap; variables and fields need a compact way to refer to them.
Where it fits
Local variable array in the JVM anatomySources
- APIjava.lang.ref package(opens in a new tab)
Strong, soft, weak and phantom reachability. · Java SE 25
- SpecJVMS §2.7 Representation of Objects(opens in a new tab)
The JVM does not mandate any particular internal structure for objects. · Java SE 25
- API
- Resolution
Looking up what a name in the bytecode really refers to, the first time it is used.
Why it exists
Late binding lets classes be compiled separately and lets the JVM load only what is used.
Where it fits
Resolution in the JVM anatomySources
- SpecJVMS §5.4.3 Resolution(opens in a new tab)
Dynamically determines concrete values from symbolic references. · Java SE 25
- Spec
- Run-time constant pool
The in-memory version of a class's constant table. When code first uses an entry, the JVM looks up what it refers to and remembers the answer.
Why it exists
To support late binding: code is linked to classes and methods only when it actually runs.
Where it fits
Run-time constant pool in the JVM anatomySources
- SpecJVMS §2.5.5 Run-Time Constant Pool(opens in a new tab)
Per-class run-time representation of the constant_pool table. · Java SE 25
- SpecJVMS §5.1 The Run-Time Constant Pool(opens in a new tab)
How symbolic references in the class file become run-time constant pool entries. · Java SE 25
- Spec
- Safepoint
A moment when every Java thread has paused at a known, safe position so the JVM can do maintenance.
Why it exists
Some VM operations need a consistent view of every thread's stack and references.
Where it fits
Garbage collector in the JVM anatomySources
- Sourcesafepoint.hpp(opens in a new tab)
Safepoints: bringing Java threads to a stop for VM operations. · JDK 25 GA (tag jdk-25-ga)
- Source
- Shenandoah
A low-pause garbage collector that moves objects while your program runs.
Why it exists
Low, heap-size-independent pause times.
Where it fits
Shenandoah in the JVM anatomyRelated
Sources
- JEPJEP 379: Shenandoah: A Low-Pause-Time Garbage Collector (Production)(opens in a new tab)
Shenandoah became a product feature. · JDK 15
- JEPJEP 521: Generational Shenandoah(opens in a new tab)
Shenandoah's generational mode became a product feature. · JDK 25
- JEP
- Source codealso: source file, .java file
Instructions written by people in a programming language. A Java source file, such as
Hello.java, is plain text you can read and edit.Why it exists
People need a language they can read and reason about; machines need precise instructions. Source code is the human side of that translation.
Related
Sources
- JEPJEP 330: Launch Single-File Source-Code Programs(opens in a new tab)
java Main.java compiles in memory and runs the result. · JDK 11
- JEP
- StackOverflowError
The error thrown when a thread makes too many nested calls, usually from endless recursion.
Why it exists
To stop runaway recursion safely instead of corrupting memory.
Where it fits
JVM stack in the JVM anatomySources
- SpecJVMS §2.5.2 Java Virtual Machine Stacks(opens in a new tab)
Per-thread stacks of frames; StackOverflowError and OutOfMemoryError conditions. · Java SE 25
- SourcestackOverflow.hpp(opens in a new tab)
Stack guard zones: reserved, yellow, red and shadow zones. · JDK 25 GA (tag jdk-25-ga)
- Spec
- Stop-the-world pause
A pause during which the application threads wait while the garbage collector works.
Why it exists
Some GC work is simplest and fastest when objects cannot change underneath it.
Where it fits
Garbage collector in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- Survivor space
A holding area for objects that survived a young collection, until they are old enough to move on.
Why it exists
It filters out medium-lived objects before they reach the expensive old generation.
Where it fits
Survivor space in the JVM anatomyRelated
Sources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- Symbolic reference
A reference by name ("the class called Person") instead of by location.
Why it exists
Classes can be compiled separately and evolve independently, as long as the names they use still exist at run time.
Where it fits
Resolution in the JVM anatomySources
- SpecJVMS §5.1 The Run-Time Constant Pool(opens in a new tab)
How symbolic references in the class file become run-time constant pool entries. · Java SE 25
- Spec
- System call
A request from a program to the operating system, such as "read this file".
Why it exists
Only the kernel may access hardware and other processes' resources.
Where it fits
System calls in the JVM anatomyRelated
Sources
- SourceNativeLibraries.java(opens in a new tab)
Loading native libraries and finding JNI symbols. · JDK 25 GA (tag jdk-25-ga)
- Source
- Template interpreter
HotSpot's interpreter: every bytecode has a ready-made piece of machine code.
Why it exists
It is much faster than a C++
switchloop while staying simple to keep correct.Where it fits
Interpreter in the JVM anatomySources
- SourcetemplateInterpreter.hpp(opens in a new tab)
HotSpot's template interpreter, generated at VM startup. · JDK 25 GA (tag jdk-25-ga)
- SourcetemplateTable.hpp(opens in a new tab)
The per-bytecode machine-code templates. · JDK 25 GA (tag jdk-25-ga)
- Source
- Tiered compilation
HotSpot's step-by-step approach: interpret first, then compile quickly, then compile thoroughly.
Why it exists
It combines fast warm-up (C1) with peak performance (C2).
Where it fits
JIT compiler in the JVM anatomySources
- SourcecompilationPolicy.hpp(opens in a new tab)
Tiered compilation levels 0–4 and the thresholds that move methods between them. · JDK 25 GA (tag jdk-25-ga)
- Source
- TLAB (thread-local allocation buffer)
A private slice of the heap that each thread uses to create objects quickly without waiting for other threads.
Why it exists
Allocation is extremely frequent in Java; making it lock-free and cache-friendly is a large performance win.
Where it fits
Eden in the JVM anatomySources
- SourcethreadLocalAllocBuffer.hpp(opens in a new tab)
Thread-local allocation buffers. · JDK 25 GA (tag jdk-25-ga)
- Source
- Uncommon trap
A tripwire in compiled code that fires when something the compiler did not expect happens.
Why it exists
It lets the compiler omit code for rare paths while keeping exact semantics.
Where it fits
Deoptimization in the JVM anatomySources
- Sourcedeoptimization.hpp(opens in a new tab)
Deoptimization and the reasons uncommon traps record. · JDK 25 GA (tag jdk-25-ga)
- Source
- Verification
A safety check of a class's bytecode before it may run.
Why it exists
Bytecode can come from anywhere; verification lets the JVM run it fast without checking every instruction at run time.
Where it fits
Verification in the JVM anatomyRelated
Sources
- SpecJVMS §4.10 Verification of class Files(opens in a new tab)
Type checking with StackMapTable frames and the constraints a class file must meet. · Java SE 25
- SpecJVMS §5.4.1 Verification(opens in a new tab)
Ensures the binary representation of a class is structurally correct. · Java SE 25
- Spec
- Virtual memory
The private address space the operating system gives each process, backed by real memory as it is used.
Why it exists
Isolation between processes and flexible use of physical memory.
Where it fits
Virtual memory in the JVM anatomySources
- ToolThe java command(opens in a new tab)
Launcher syntax, -Xss, -Xmx, -Xlog and the HotSpot -XX options. · JDK 25
- Tool
- Virtual thread
A very lightweight Java thread; millions can exist, sharing a few OS threads.
Why it exists
Thread-per-request code becomes affordable for I/O-heavy servers.
Where it fits
Java thread in the JVM anatomyRelated
Sources
- JEPJEP 444: Virtual Threads(opens in a new tab)
Lightweight threads scheduled by the JDK on carrier platform threads. · JDK 21
- JEP
- Young generation
The part of the heap for new objects, cleaned often because most objects die young.
Why it exists
The weak generational hypothesis: most objects become unreachable soon after allocation.
Where it fits
Young generation in the JVM anatomySources
- GuideHotSpot Virtual Machine Garbage Collection Tuning Guide(opens in a new tab)
Generations, ergonomics, and the G1, Parallel, Serial, Z and other collectors. · JDK 25
- Guide
- ZGC
A garbage collector built for very short pauses, even with huge heaps.
Why it exists
Latency-sensitive applications cannot tolerate pauses that grow with heap size.
Where it fits
ZGC in the JVM anatomySources
- JEPJEP 439: Generational ZGC(opens in a new tab)
ZGC gained separate young and old generations. · JDK 21
- JEPJEP 490: ZGC: Remove the Non-Generational Mode(opens in a new tab)
ZGC is generational only. · JDK 24
- JEP