JDK is a superset of JRE. JDK contains everything that JRE has along with development tools for developing, debugging, and monitoring Java applications. You need JDK when you need to develop Java applications.

Few important components shipped with JDKs are as follows:

appletviewer – this tool can be used to run and debug Java applets without a web browser
apt – the annotation-processing tool
extcheck – a utility that detects JAR file conflicts
javadoc – the documentation generator, which automatically generates documentation from source code comments
jar – the archiver, which packages related class libraries into a single JAR file. This tool also helps manage JAR files
jarsigner – the jar signing and verification tool
javap – the class file disassembler
javaws – the Java Web Start launcher for JNLP applications
JConsole – Java Monitoring and Management Console
jhat – Java Heap Analysis Tool
jrunscript – Java command-line script shell
jstack – utility that prints Java stack traces of Java threads
keytool – tool for manipulating the keystore
policytool – the policy creation and management tool
xjc – Part of the Java API for XML Binding (JAXB) API. It accepts an XML schema and generates Java classes
Same as JREs, JDKs are also platform dependent. So take care when you download the JDK package for your machine.

Top 5 Books for Learn Core Java for Beginners