To start developing in Java you need to install the JDK — the Java Development Kit. It includes the javac compiler, the JVM, the standard library, and various utilities. Several JDK distributions are available — they all implement the same OpenJDK standard but differ in licensing and support.
Click a distribution to learn more
🌙
Eclipse Temurin
🔴
Oracle JDK
🟢
OpenJDK
🟠
Amazon Corretto
🔵
Microsoft Build
⚡
GraalVM
ℹ️For learning purposes Eclipse Temurin (Adoptium) is recommended — it is free, has no licensing restrictions, and is available at adoptium.net.
Installing the JDK
Select your operating system — the instructions differ by platform.
Via winget (recommended — built into Windows 10/11)
bash
winget install EclipseAdoptium.Temurin.25.JDK
# Verify
java -version
javac -versionIf winget is unavailable — download the .msi from adoptium.net and run it. The installer sets PATH automatically.
bash
# After manual install — verify in a new terminal
java -version
javac -versionConfiguring JAVA_HOME
Many build tools and IDEs use the JAVA_HOME environment variable to locate the JDK. Without it Maven, Gradle and others may fail to start.
Click to see which tools read JAVA_HOME ▶
JAVA_HOME
📦Maven
🐘Gradle
🧠IntelliJ IDEA
💙VS Code
🌑Eclipse IDE
Add to ~/.bashrc or ~/.zshrc
bash
export JAVA_HOME=/usr/lib/jvm/temurin-25
export PATH=$JAVA_HOME/bin:$PATH
# Apply immediately
source ~/.bashrc
# Verify
echo $JAVA_HOME
java -versionVerifying the Installation
After installation open a new terminal and run through these verification steps:
Click to walk through the verification steps ▶
📥
Install
JDK installed
→
🔄
New terminal
Reload PATH
→
☕
java
java -version
→
⚙️
javac
javac -version
→
📂
JAVA_HOME
echo $JAVA_HOME
→
✅
Ready
All checks passed
bash
java -version
# openjdk version "25.0.x" ...
# OpenJDK Runtime Environment Temurin-25...
javac -version
# javac 25.0.x
which java # Linux/macOS
where java # Windows⚠️If the java command is not found after installation — close and reopen your terminal. Changes to PATH only take effect for new sessions.
Managing Multiple JDK Versions
Real-world projects often require switching between Java versions. Dedicated version managers exist for this purpose.
Click a tool to see how it works
🚀
SDKMAN!
🔀
jenv
🐍
jabba
bash
# SDKMAN! — usage examples
sdk install java 25-tem # install Temurin 25
sdk install java 21-tem # install Temurin 21
sdk use java 21-tem # switch for current session
sdk default java 25-tem # set global default
sdk current java # show active version✅SDKMAN! is the best choice for developers on Linux/macOS. It manages not only Java but also Maven, Gradle, Kotlin, Scala, and other JVM tools.