JDK
Description
The Java Development Kit is for creating software.
Explanation
It contains javac, java, debugging tools, and libraries.
Example
javac VersionCheck.java← Chapter 1 — Getting Started with Java
mixed
The JDK is the toolkit used by developers. It includes the compiler, documentation tools, and a runtime environment.
The JVM is the engine that executes Java bytecode. The term JRE traditionally described the runtime pieces, although modern Java distributions commonly package the runtime with the JDK.
The Java Development Kit is for creating software.
It contains javac, java, debugging tools, and libraries.
javac VersionCheck.javaThe Java Virtual Machine runs bytecode.
Different JVMs can execute the same compiled class file.
java VersionCheckThink of the JDK as a workshop, bytecode as the finished instruction set, and the JVM as the machine that follows those instructions. This division is central to Java portability.
public class VersionCheck {
public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
}
}