Simple
No programming needed
A frame is the workspace of one method call. It holds the method's local variables and a small scratch stack for calculations, and it remembers how to get back to the caller.
An independent atlas of the Java Virtual Machine
Understand the Java Virtual Machine from the first instruction to the runtime systems that execute it.
Architecture
66 components, from the class file to the processor, drawn where they belong and connected by what flows between them. Select any part to see what it is.
Three depths
Every part has three explanations of the same facts. Choose your level from the menu at the top of any page; it applies everywhere. Here is the stack frame at each one.
No programming needed
A frame is the workspace of one method call. It holds the method's local variables and a small scratch stack for calculations, and it remembers how to get back to the caller.
Code, APIs and what you observe
A frame lives exactly as long as one method call. Its local variables are the method’s parameters and locals; javac works out how many slots and how deep an operand stack each method needs (locals= and stack= in javap -v).
That is why local variables vanish when a method returns, and why a lambda can only use local variables that never change after they are set (effectively final): it gets a copy of the value, not the frame’s slot.
Specification sections and HotSpot structures
JVMS §2.6: a frame is created each time a method is invoked and destroyed when the invocation completes, normally or abruptly. It contains a , an and a reference to the run-time constant pool of the current method's class (). Their sizes are fixed at compile time (max_locals, max_stack in the Code attribute: 3 and 3 for our main). Only one frame per thread is active: the current frame.
HotSpot's interpreter frame on x86-64 additionally stores the sender's stack pointer, the Method*, the class mirror, the profiling pointer (mdp), the constant pool cache, the locals pointer, the bcp and a monitor block. Compiled frames look different again: values live in registers and one physical frame can represent several inlined methods.
Subsystems
Start here
What happens when you run a Java program? Seven short chapters, about 21 minutes, no programming knowledge needed. Each one asks you to predict, shows you what really happens, and checks that it made sense.
Begin the first lessonType anything you like between the quotes, then press Run it to follow your line from the compiler to the processor.
Exhibits
Step through real programs with their verified javap output, or open a part and see its internal structure.
java Main to the first bytecodeCompilation, JVM creation, core classes, loading and initializing the main class, and the first frame.new Person("Alex")One statement, instruction by instruction: resolution, class loading, allocation, the operand stack, a constructor frame, and references.Accuracy
Every simplified picture says what it leaves out, and every analogy says where it stops being true. Bytecode, logs and numbers come from running a real JDK (OpenJDK 25.0.4), never from memory.
What the Java specification requires is kept apart from how OpenJDK’s HotSpot JVM happens to do it, and the drawings say which is which:
Every claim cites its source: 123 primary sources, from the Java SE 25 specifications to the OpenJDK source code. Browse the references or read the accuracy policy.
The project
JVM Atlas has no accounts, no tracking and no backend: your progress stays in your browser. The content and code are open source, and corrections are welcome.