Last updated 19 September 2026. Default examples are mid-level Spring and Java 17–21. Junior and senior sit in labeled sections so the first screen is not a fresher dump.
JDK, JRE, JVM, and JIT are four different layers. The 64-word page that used to rank for this cluster was the problem, not the query. This hub is the rewrite: what each acronym is, how bytecode reaches the CPU, and which knobs interviews actually expect on Java 17 and 21.
Junior
The JVM is the process that executes bytecode and provides memory management, threads, and a security/classloading model. The JRE was the runtime bits: JVM plus core libraries, enough to run a program. The JDK is the JRE plus javac, javadoc, jdeps, and the rest of the toolchain. Since Java 9 the distribution story is modules and jlink; many teams still say JRE to mean a runtime image. Be precise: you develop on a JDK, you run on a runtime that includes a JVM.
javac emits bytecode in .class files. The classloader loads them. The interpreter starts execution. The JIT compiles hot methods to native code. HotSpot has C1 and C2 compilers. Tiered compilation is the default: C1 first, C2 later for hot code. This is why a microbenchmark that ignores warmup lies.
Heap versus stack: stack frames hold locals and partial results per thread. The heap holds objects. References live in frames or in other objects. Escape analysis can allocate on the stack or scalar-replace objects; do not promise that in production without a flight recording.
OutOfMemoryError is not one failure. Heap, metaspace, and native are different pools. On a 512MB Heroku dyno, RSS includes more than -Xmx. That is an R14, not an interview toy.
Mid-level
Classloading: bootstrap, platform, and application loaders. A Class.forName uses the caller's loader unless you say otherwise. Leaking a loader (for example through a static cache of classes from a redeployed webapp) is a metaspace leak. Thread context classloader matters for libraries that load SPI implementations.
GC interviews: generational collection, TLAB allocation, and the difference between throughput collectors and low-pause collectors. Parallel GC, G1, ZGC, and Shenandoah are the names. G1 is the default on recent HotSpot. ZGC targets low pauses as heaps grow. The harvest page on ZGC in Java 11 is a child link, not this hub's only content. You enable a collector with a flag; you prove it with logs and pause metrics.
JIT deoptimization happens when a speculative assumption fails. This is why a rare path can suddenly get slower. PrintCompilation is a learning tool, not a production dashboard. Prefer JFR.
jlink builds a custom runtime. jpackage wraps an installer. Modules (JPMS) exist; most apps still live on the classpath. Know module-info enough to read a split-package error. Do not redesign a Boot app as a 40-module graph for an interview unless they ask.
Senior
Senior JVM: safepoints, biased locking history (mostly gone), and how virtual threads change the debugging story. Native memory: direct ByteBuffers, metaspace, thread stacks, code cache. NMT is how you see them. A heap dump does not show a native leak.
GC tuning without a goal is folklore. Pick a pause or throughput SLO, enable logs, change one flag. -Xmx without leaving room for non-heap is how processes die at 100% RSS. UseCGroupMemoryLimitForHeap is a Java 8 flag; Java 17 rejects it and the process never starts. Container support is on by default.
Intrinsics, vector API, and the difference between interpreted, C1, and C2 code for a single method over time. If you talk about 'the JIT' as one compiler, a strong interviewer will push.
Security manager is removed. Do not build a 2026 answer on it. Agents and attach APIs still exist; they have operational cost.
Probe yourself
JDK versus JRE versus JVM?
JVM executes bytecode. JRE (runtime image) is JVM plus libraries. JDK adds the compiler and tools.
Why does a short benchmark lie about Java performance?
The interpreter and C1 run first. C2 compiles hot methods after warmup. Measure after steady state, preferably with JMH.
Why can -Xmx384m still R14 on a 512MB dyno?
RSS includes metaspace, thread stacks, code cache, and native buffers. Heap is only one pool.
Related questions on this topic are linked below. Read the full answer on the question URL; this hub does not repeat those answers.
Pitfalls interviewers still use
Saying 'stack is primitives, heap is objects' is incomplete. Objects are on the heap (or scalar-replaced). Locals that are references live in frames and point at the heap. A primitive local lives in the frame. An Integer lives on the heap.
Confusing JDK and JRE in 2026: many vendors ship only JDKs. A custom jlink image is the modern JRE. If you say 'install the JRE' as an ops plan, say which vendor image you mean.
Tuning GC from a blog: -XX:+UseG1GC plus a dozen survivor flags copied from a 2014 post. Default G1 on a current JDK is fine until you have pause data. ZGC is a choice with trade-offs, not a trophy flag.
Assuming -Xmx is the process size. Metaspace, threads, code cache, and direct buffers sit outside. This site already died once from a Java 8 cgroup flag on Java 17. Know your runtime.
Microbenchmarks without warmup or without JMH. A for-loop in main that prints nanos is a story, not evidence.
For the room: draw javac, classloader, interpreter, C1, C2, GC, and native memory. If JIT is a single box named 'faster', keep drawing.
How to answer in the room
JDK is the development kit: compiler, tools, and a runtime. JRE was the runtime-only bundle; many 2026 vendors ship JDKs and jlink images instead. JVM is the process that executes bytecode. JIT is the compiler inside the JVM that turns hot bytecode into native code. If those four boxes blur, stop and redraw.
javac emits class files. A classloader defines them. The interpreter runs them first. C1 and C2 compile hot methods. Deoptimization can throw a method back. A microbenchmark that ignores warmup is a story, not a number. JMH exists for a reason.
Memory: heap for objects (unless scalar-replaced), metaspace for class metadata, thread stacks, code cache, and direct buffers. -Xmx is not RSS. This site already crashed on a Java 8 cgroup flag under Java 17. Know the flags your platform actually honors.
GC: default G1 is fine until you have pause data. Parallel is a throughput choice. ZGC and Shenandoah are low-pause choices with trade-offs. Do not paste 2014 survivor-ratio flags. Read gc logs after a change, not before you invent one.
Classloading: bootstrap, platform, application, then custom. A NoClassDefFoundError after a ClassNotFoundException is a different time of failure. LinkageError is a conflict. In Boot, the restart classloader is DevTools, not production.
Native image and AOT are not 'the JIT but earlier' in a casual sense. They change reachability and warmup. Mention them if the job uses Graal. Do not promise them as a free Heroku memory fix.
This topic used to be a 64-word stub. The child question pages may still be thin. This hub is the page that should rank for the head term. Thin children get noindex after this ships if they fail the word or GSC keep rules.