JDK (Java Development Kit)

The Java Development Kit (JDK) is the complete toolkit for writing, compiling, debugging and running Java programs. It bundles the JVM, the Java standard class library, the compiler (javac) and a set of diagnostic tools.

What the JDK contains

  • JVM β€” the runtime that executes bytecode
  • Class library (java.*, javax.*, jdk.*)
  • javac β€” the Java compiler (source β†’ bytecode)
  • jar β€” package Java classes into JAR archives
  • jdb β€” command-line debugger
  • jshell β€” interactive REPL (Java 9+)
  • jlink, jpackage β€” build custom runtime images and native installers
  • jmap, jstack, jfr, jconsole β€” diagnostic and profiling tools

JDK vs JRE

The JRE (Java Runtime Environment) is a subset of the JDK containing only the JVM and class library. A JRE can run Java programs but not compile them. Most OpenJDK distributions no longer ship a separate JRE β€” just install the JDK.

Which JDK to install

Install an OpenJDK build from a trusted vendor: Eclipse Temurin, Amazon Corretto, Microsoft Build of OpenJDK, or Azul Zulu. All are free for commercial production use. See the download guide.