JVM, Jre&jdk
JVM, Jre&jdk
What is JVM?
JVM (Java Virtual Machine) is an machine that enables your computer to run a Java program.
When you run the Java program, Java compiler first compiles your Java code to bytecode. Then, the JVM translates
bytecode into native machine code (set of instructions that a computer's CPU executes directly).
What is JRE?
JRE (Java Runtime Environment) is a software package that provides Java class libraries, Java Virtual Machine (JVM),
and other components that are required to run Java applications.
JRE is the superset of JVM.
What is JDK?
JDK (Java Development Kit) is a software development kit required to develop applications in Java. When you download JDK,
JRE is also downloaded with it.
In addition to JRE, JDK also contains a number of development tools (compilers, JavaDoc, Java Debugger, etc).
So we can say tat JDK contains both JRE and JVM in it.