JDK — development kit. JRE — runtime environment. JVM — virtual machine.Simple analogy:- JVM is the foundation — supports the structure but needs more to be useful.- JRE is the furnished house — foundation + walls + plumbing. You can live in it (run Java apps).- JDK is the builder's toolkit — everything needed to BUILD new houses (develop Java apps).Why it matters: Understanding this hierarchy helps set up development environments correctly and troubleshoot "command not found" errors.JVM (Java Virtual Machine):- Executes bytecode — the actual runtime engine.- Part of JRE — never installed alone.- Platform-specific — different binaries for Windows, Linux, macOS.JRE (Java Runtime Environment):- JVM + core libraries + supporting files.- For running Java applications — not developing them.- No development tools like compilers or debuggers.bash# JRE includes:# - JVM# - Core libraries (java.base, java.desktop, etc.)# - Supporting configuration filesJDK (Java Development Kit):- JRE + development tools — the complete package for developers.- Includes javac, java, jar, javadoc, debugger, jps, jstat, jmap, jstack.bash# JDK includes:# - JRE (everything above)# - javac (Java compiler)# - java (application launcher)# - jar (archiver)# - javadoc (documentation generator)# - jdb (Java debugger)Relationship: JDK > JRE > JVMModern note (Java 9+): Starting with Java 11, Oracle no longer provides a standalone JRE. Use jlink to create custom runtime images with only needed modules.javapublic class Hello { public static void main(String[] args) { System.out.println("JDK compiles this!"); }}// javac Hello.java (uses JDK compiler)// java Hello (uses JRE/JVM to run)Interview tip: Remember the nesting relationship and name at least 3 JDK tools not in the JRE.