Java & the JVM Mind Map

Algorithm & Systems Visualizations

Every Java & the JVM visualization on this site on one map. The branches are the main ideas. Each leaf is a page; the grey line under it is the one thing to remember about it. Click a branch to focus on it, click a page to open it.

Recall mode hides the page names. Read the hint, say the name, then click the "?" to check.

1. How the map is organized

Overview of the Java & the JVM mind map: From source to bytecode, Startup and class loading, JIT compilers, Memory and GC, Collections, Threads and memory model, Spring framework.
The map at a glance: 7 branches, 28 pages.

Follow a Java program through its life, and each branch is one stage:

  • Before it runs: source becomes bytecode (source to bytecode), then the JVM starts and loads classes (startup).
  • While it runs: hot code gets compiled to machine code (JIT), and dead objects get freed (memory and GC).
  • What your code uses: library data structures (collections), threads and their visibility rules (threads), and frameworks that wire objects together (Spring).
  • Pages about Python, Go or V8 sit on the branch of the same idea, to compare with the JVM.

2. The branches side by side

BranchWhenKey ideaTypical problem
From source to bytecodebuild timeportable bytecodecompile errors
Startup and class loadingstart, first use of a classparent delegationslow start, ClassNotFoundException
JIT compilersafter code gets hotprofile, then optimisedeoptimisation, warm-up
Memory and GCall the timereachability from rootspauses, OutOfMemoryError
Collectionseach callhashing, sorted treebad hashCode, resize cost
Threads and memory modeleach threadhappens-beforestale values, pinning
Spring frameworkcontext start, each callinversion of controlself-call skips the proxy

3. Five facts to remember

  • javac makes portable bytecode; the JVM interprets it at first and JIT-compiles only the hot methods.
  • Class loaders ask their parent first, so java.lang classes always come from the bootstrap loader.
  • Objects live on the heap; each thread's stack holds frames with locals and references.
  • A tracing GC frees unreachable cycles; plain reference counting cannot.
  • Without volatile or synchronized, one thread may never see another thread's write.

See all Java & the JVM pages in the index, or the other mind maps.