Skip to content

Explore the JVM

The machine that runs Java, part by part. Specification: Java SE 25 · Implementation: OpenJDK HotSpot, JDK 25

Drag to pan. Use the zoom buttons, Control or Command with the scroll wheel, or pinch to zoom. With the diagram focused, arrow keys pan, plus and minus zoom, and 0 fits the whole diagram. Tab moves between components; Enter or Space selects one.

PLATE 01The Java Virtual Machine, assembledSPECIFICATIONJava SE 25 · JVMS / JLSIMPLEMENTATIONOpenJDK HotSpot · JDK 25 · x64JVMS conceptHotSpotplatformSCHEMATIC · NOT TO SCALEJAVA PROCESSJAVA VIRTUAL MACHINEone address space: Java heap · Metaspace · code cache · thread stacks · native librariesBefore it runsjavac compiles source code intoclass files.PlatformThe operating system and CPU.java launcherNative librarieslibjava · libnio · libnet · libzip · libnativemath.soClass loadingFinds and prepares Javaclasses.12 parts inside · select to openMemoryStores objects and runtime data.15 parts inside · select to openExecution engineRuns bytecode.9 parts inside · select to openGarbage collectionReclaims memory that is no longer reachable.11 parts inside · select to openNative interfaceConnects Java to nativecode.1 part inside · select to open

Guided tour · 1 of 5

A map of the Java Virtual Machine

Every shape is a real part of the software machine that runs Java programs. The layout is simplified: positions and sizes are schematic, not a picture of memory.

Read me

Accuracy notes for this plate

Knowledge check

Check your understanding of JVM anatomy

8 questions. Answers are explained, right or wrong.

  1. Question 1

    Question 1 · Memory state

    While main runs Person p1 = new Person("Alex");, where is the variable p1 stored?

  2. Question 2

    Question 2 · Predict the output

    What does this line print on JDK 25?

    Predict the outputJava
    System.out.println(String.class.getClassLoader());
  3. Question 3

    Question 3 · Order of events

    Which order does the JVM Specification require for a class to be ready to run its static initializer?

  4. Question 4

    Question 4 · Concept

    Which runtime data area is private to each thread?

  5. Question 5

    Question 5 · Concept

    In HotSpot JDK 25, where is the metadata of a loaded class (its InstanceKlass, methods and bytecode) stored?

  6. Question 6

    Question 6 · Memory state

    After p1 = null; p2 = null;, no reference to the Person remains. What happens to the object immediately?

  7. Question 7

    Question 7 · Concept

    When does HotSpot deoptimize a compiled method?

  8. Question 8

    Question 8 · Predict the output

    On Linux, which file does System.loadLibrary("nativemath") look for on java.library.path?

Primary sources

Where these facts come from

Every component cites its own sources in the inspector. These are the foundations of the whole plate.

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.