How is JVM different from JRE and JDK?
Is it really a big difference?
JVM is the interpreter, it is responsible for executing the Java program line by line. It is inbuilt in both JDK & JRE. Every program you write either in JDK or JRE goes into JVM for execution.
JRE is an environment in which you can run your program on your computer, not develop.
JDK is a kit which includes both JRE & development tools. If you are looking for a whole package to develop, execute & run, a Java program, use a JDK.
JDk is the whole package . In this you get everything ...like developing tools (debugger,compiler)+ (run-time environment) JRE
JRE- JVM +Libraries +other components
JVM-Intrepreter+JIT(just-in-time-compiler)-It does the job of converting our bytecode using interpreter mostly and occasionally JIT (just -in-time )-COMPILER one of the two . JIT compiler is used for part of program frequently used .
Jvm is the subset of jre ,and jre is the subset of jdk. Jdk has both comiler and and jvm so that by using jdk we can develope,compile, and execute java application and also modify ,,compile and execute already developed application. But jre has only jvm,using jre we can only execute already developed application.
JVM is virtually present in your software or hardware and simply help to execute Java code but it is not present physically in device. It simply provide the virtual environment for the java code.
JRE is actually a combination of JVM and libraries set. The libraries set are required by the JVM at the runtime for the execution of code. JRE physically exist.
JDK contains the JRE and the development tools. In this the JRE only helps to develop the code but the development tools(debugger, compiler, executor, JavaDoc) helps to build a application.