What are the JDK, the JRE and the JVM, and how do they relate to each other?
Show the explanation
Short answer: the JVM runs bytecode, the JRE is the JVM plus the standard libraries needed to run programs, and the JDK is the JRE plus the tools needed to develop them.
- JVM (Java Virtual Machine) — loads
.classfiles, verifies the bytecode, and executes it with an interpreter plus a JIT compiler that turns hot code into native machine code. It also manages memory (heap, stacks, garbage collection). There is a JVM build for each OS and CPU; the bytecode is the same everywhere. - JRE (Java Runtime Environment) — the JVM together with the core class libraries (
java.lang,java.util, …). Enough to run an application, not to compile one. - JDK (Java Development Kit) — the JRE plus development tools:
javac(compiler),java(launcher),jar,javadoc,jdb,jshelland others.
JDK = JRE + javac, jar, javadoc, jshell, …
JRE = JVM + class librariesSince Java 11, Oracle and most vendors ship only the JDK; a trimmed runtime for deployment is built with jlink. Saying that in an interview shows you know the modern picture.
Original UniCircle question. Last reviewed 22 Oct 2026.
