Author
The Java Development Kit (JDK) is required to develop and run Spring Boot applications.
Without JDK, you cannot compile Java code, run Spring Boot projects, or use tools like Maven and Gradle.
Spring Boot works best with LTS (Long-Term Support) Java versions.
| JDK Version | Type | Recommendation |
|---|---|---|
| JDK 17 | LTS | Most recommended for Spring Boot |
| JDK 21 | LTS | Latest stable & future-ready |
| JDK 23 | Non-LTS | For learning & testing only |
? Best choice:
⚠ Avoid using non-LTS versions in production.
You can download JDK from trusted providers:
? Why Eclipse Temurin?
Choose:
.msi or .exe fileDefault path:
C:\\Program Files\\Java\\jdk-17
Using Installer
.pkg fileDefault path:
/Library/Java/JavaVirtualMachines/
For Java 17:
sudo apt update
sudo apt install openjdk-17-jdk
For Java 21:
sudo apt install openjdk-21-jdk
Run these commands in terminal / command prompt:
java -version
javac -version
Example output:
java version "17.0.10"
If both commands work → JDK is installed correctly.
JAVA_HOME = C:\\Program Files\\Java\\jdk-17
%JAVA_HOME%\\bin
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
echo %JAVA_HOME% # Windows
echo $JAVA_HOME # macOS / Linux
| Spring Boot Version | Java Requirement |
|---|---|
| Spring Boot 2.x | Java 8 / 11 |
| Spring Boot 3.x | Java 17+ (mandatory) |
? Spring Boot 3 will NOT work with Java 8 or 11.
Installing the correct JDK is the foundation of Spring Boot development.
For modern Java applications in 2025:
Once JDK is installed, your system is ready for Spring Boot, Maven, Gradle, REST APIs, Microservices, and Enterprise applications