Skip to content

An independent atlas of the Java Virtual Machine

Explore the machine behind every Java program.

Understand the Java Virtual Machine from the first instruction to the runtime systems that execute it.

  • Java SE 25 specifications
  • OpenJDK HotSpot, JDK 25
  • Free and open source
  • Works offline
From the source code at the top to the processor at the bottom. Dotted edges mark build-time tools and the platform, which are not part of the JVM. The layers are drawn apart to show them: this is not a map of memory.

Architecture

The whole machine on one plate

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.

Loading the map…

Three depths

One machine, explained at the depth you need

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.

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.

Developer

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.

Deep dive

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.

Open the stack frame in the atlas

Subsystems

Seven areas, from source code to processor

  1. Build time3 parts inside · outside the JVMBefore the JVM starts, a compiler turns source files into .class files that hold bytecode: javac for Java (other JVM languages have their own compilers).
  2. Class loading12 parts insideThe class loader finds class files and turns them into classes the JVM can use.
  3. Memory15 parts insideRuntime memory holds what a running program needs: objects, method calls in progress and class information.
  4. Execution engine9 parts insideThe execution engine runs bytecode instructions, and compiles busy code into machine code.
  5. Garbage collection11 parts insideThe garbage collector finds objects the program can no longer reach and reclaims their memory.
  6. Native interface1 parts insideThe native interface lets Java call code written for the operating system, such as C libraries, and lets that code call back.
  7. Platform4 parts inside · outside the JVMThe operating system and processor that the JVM itself runs on.
System.out.println("");

Type anything you like between the quotes, then press Run it to follow your line from the compiler to the processor.

Exhibits

Watch it run, then look inside

Step through real programs with their verified javap output, or open a part and see its internal structure.

Accuracy

Simple is short, never false

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:

  • Specification: what every JVM must do
  • HotSpot: how OpenJDK’s JVM does it (marked HS)
  • Platform and build time: outside the JVM

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

Independent, free and open

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.

JVM Atlas

Explore the machine behind Java programs. A free, open-source atlas of the Java Virtual Machine. Specification baseline: Java SE 25. Implementation details: OpenJDK HotSpot, JDK 25.

MIT licensed · no accounts, no tracking, no backend · your progress stays in your browser.

JVM Atlas is an independent educational project and is not affiliated with or endorsed by Oracle. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.