Campbell Ritchie wrote:You need the JDK to produce code. You can't get a JRE on its own. The JVM is a program which emulates a computer running, and it executes the code after you have compiled it.
To be precise, the JVM is the program named "java", which is one of the binary executables found in an installed JRE. And, while JREs no longer exist separately, every JDK has had a JRE embedded within it.
To further note the difference between a JRE and a JDK, the "java" (JVM) program is part of the JRE, but the "javac" (Java compiler) program was only part of the JDK.