Skip to content

Learn

Start with a question

Each path begins with something you might already wonder about, and goes as deep as you like. If you are new, begin with the first one: everything else builds on it.

Begin here · about 21 minutes

What happens when you run a Java program?

Follow one small program from the text you type to the processor that runs it: the compiler, the class file, the JVM, memory, execution and garbage collection.

Start the first lesson
  1. 1Your first Java program
  2. 2The compiler
  3. 3The JVM
  4. 4Loading classes
  5. 5Memory
  6. 6Execution
  7. 7Garbage collection

Guides: short answers, then the whole story

Each guide answers one question simply, then in practice, then in depth, and links to the part of the machine that shows it.

Then follow your curiosity

In a sensible order, but take them in any order you like. Each links to what answers it today; dedicated laboratories are on their way.

  1. 2

    Where do my objects and variables live?

    The heap, the stack and the references between them: what new really does, and why two variables can share one object.

    Coming later: Memory Lab: step through your own code (M4)

  2. 3

    How does Java find and load my classes?

    Class loaders, the class path and the order of loading, linking and initialization, including the parts that wait until a name is first used.

    Coming later: Class Loader Explorer: a delegation simulator (M3)

  3. 4

    How does the JVM run my code, and why does it get faster?

    The interpreter, the JIT compilers and the code cache: why Java starts quickly and then speeds up while it runs.

    Coming later: Bytecode Explorer: real javap output, step by step (M5)

  4. 5

    What happens to objects I stop using?

    Reachability, garbage collection and HotSpot’s collectors: the difference between unreachable and actually reclaimed.

    Coming later: Garbage Collection Lab: collectors side by side (M6)

  5. 6

    How does Java talk to code written in C?

    Native methods, JNI and native libraries, and the newer Foreign Function & Memory API.

  6. 7

    How do threads share work safely?

    What each thread owns, what all threads share, and why shared objects need synchronization.

    Coming later: Concurrency Lab: interleave two threads (M7)

  7. 8

    How do ArrayList and HashMap work inside?

    Arrays, buckets, hashing and resizing: what your collections do with memory.

    Coming later: Collections Explorer: HashMap buckets and resizing (M7)

Your progress

Stored only in this browser.

First lesson
0 / 7 chapters
Parts of the JVM explored
0 / 66
Marked as understood
0

The full curriculum, by subject

For readers who prefer to work through the JVM topic by topic. Laboratories are released one milestone at a time and are linked only once they work.

  • Every subsystem of the JVM on one interactive plate: class loading, runtime data areas, the execution engine, the garbage collector and JNI, with dissections and execution walkthroughs.

  • Java execution lifecycle

    In development · M3

    From a .java file to instructions on the CPU: compilation, class files, JVM start-up, class loading, linking, initialization, interpretation and JIT compilation.

  • Class Loader Explorer

    In development · M3

    A delegation simulator and a step-by-step walkthrough of loading, linking (verification, preparation, resolution) and initialization.

  • Memory anatomy and laboratory

    In development · M4

    Stack versus heap, references, object layout, generations, Metaspace, native and direct memory, and the errors that come with them.

  • Bytecode and the execution engine

    In development · M5

    Source-to-bytecode comparisons from verified javap output, with the operand stack and local variables at every instruction; interpreter and JIT internals.

  • Garbage collection laboratory

    In development · M6

    Build object graphs, cut references, watch reachability change and run a simulated collection; then compare G1, ZGC and Shenandoah.

  • Concurrency laboratory

    In development · M7

    Two threads, one shared counter: reorder their steps and watch lost updates appear, then fix them with synchronization.

  • Collections anatomy

    In development · M7

    The real internal structures of ArrayList, LinkedList, HashMap, HashSet, TreeMap, PriorityQueue and ConcurrentHashMap (JDK 25).

  • Java language internals

    In development · M8

    How language features become JVM constructs: dispatch, generics and erasure, reflection and proxies, annotations, lambdas and invokedynamic, records, sealed classes and modules.

  • I/O and NIO

    In development · M8

    Streams, readers and buffers down to system calls; channels, selectors, ByteBuffer and memory-mapped files.

  • JVM performance engineering

    In development · M8

    Measuring before tuning: JFR and JMC, JMH, thread and heap dumps, GC logs, profiling, flags and heap sizing.

  • Operating system foundations

    In development · M8

    The OS concepts needed to understand the JVM, kept clearly separate from JVM concepts.

  • JNI and native integration

    In development · M8

    Native methods, native memory, the Foreign Function & Memory API and the life cycle of native resources.

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.