JDK, JRE, and JVM
JDK (Java Development Kit)
What it is: The JDK is a software development kit that provides the tools and libraries needed to develop Java applications.
What it includes:
- javac: The Java compiler that translates .java source code into bytecode, an intermediate language.
- JRE (Java Runtime Environment): A subset of the JDK that includes essential components to run Java programs.
- Other tools: Debuggers, documentation generators, and classpath management utilities.
JRE (Java Runtime Environment)
What it is: The JRE is a software environment that allows your computer to execute Java programs.
What it includes:
- JVM (Java Virtual Machine): The core component that interprets and executes bytecode instructions.
- Standard libraries: Classes that provide functionalities for common tasks like file I/O, networking, and GUI development.
JVM (Java Virtual Machine)
What it is: The JVM is a software program that acts as a virtual machine.
What it does:
-
Takes bytecode generated by the javac compiler as input.
-
Translates the bytecode into machine code specific to your computer’s processor at runtime (just-in-time compilation). Executes the machine code instructions, allowing the Java program to run.