Difference between JDK, JRE and JVM in Java

JVM or Java Virtual Machine is a specification to provide the runtime environment in which a bytecode can be executed. JVMs are prepared platform specific and are available for almost all the hardware and machine.

JRE is the implementation of JVM and contains libraries and other files which are used by JVM. JRE is used by a Java-based application to execute java programs.

JDK is set of JRE and development tools like javac and java etc. JDK is used to develop Java programs and Java-based applications.