what is jdk in java
What is JDK in Java?
The JDK means Java Development Kit. It is the toolkit you use to write, compile, debug, and run Java programs, and it includes the compiler plus other developer tools; it is different from the JRE, which is mainly for running Java programs.
Quick Scoop
Think of Java like a workshop:
- JDK = the full workshop with tools to build software.
- JRE = the runtime needed to execute Java programs.
- JVM = the engine that runs Java bytecode on a machine.
What it includes
The JDK typically includes:
javacfor compiling.javafiles into bytecode.javafor launching Java programs.javadoc,jar, and debugging/monitoring tools for development tasks.
Why it matters
If you only want to run a Java app, a runtime is enough. If you want to develop Java code, you need the JDK because it gives you the compiler and supporting tools required for programming.
Simple example
You write HelloWorld.java, then use the JDK compiler to turn it into
bytecode, and the JVM runs that bytecode on your system.
TL;DR: JDK is the full Java development package; JRE runs Java; JVM executes the bytecode.