Module 1: Start Coding in Java
Install JDK 25 and Verify `java` and `javac`
Install a current Java 25 JDK, verify the runtime and compiler from the terminal, and avoid outdated JRE-only advice.
Author
Java Learner Editorial Team
Reviewer
Technical review by Java Learner
Last reviewed
2026-04-16
Java version
Java 25 LTS
Learning goals
- Install a JDK instead of looking for a separate JRE download
- Check `java -version` and `javac -version` successfully
- Understand why the JDK is the right beginner install
Use the JDK, not a separate JRE download: For current Java, beginners should install a JDK. Oracle and OpenJDK distributions no longer focus on a separate end-user JRE download path for modern development.
Why JDK 25 LTS: Java 25 is the current LTS baseline for this course. That gives you a stable version with long-term support while keeping examples current.
What to verify: java -version checks that Java can run. javac -version checks that the compiler is available. If javac is missing, you probably installed the wrong package or your PATH is not set correctly.
Common distributions: Oracle JDK and OpenJDK-based builds such as Eclipse Temurin are both valid learning setups. The important part is that you are on a current JDK, not outdated JRE instructions.
Runnable examples
Check the runtime version
java -versionExpected output
Shows your installed Java runtime version, such as Java 25.
Check the compiler version
javac -versionExpected output
Shows your installed Java compiler version, such as javac 25.
Common mistakes
Installing Java but not verifying `javac`
Always check both `java -version` and `javac -version` after install.
Following old articles that only mention the JRE
For current Java development, install a JDK and use current docs such as Dev.java.
Mini exercise
Run both version commands and write down the exact output you see.
Summary
- Install a current JDK, not outdated JRE-only guidance.
- `java` runs programs and `javac` compiles source files.
- Java 25 LTS is the baseline for this course.
Next step
Once the JDK is installed, run one Java file from the terminal and from an IDE.
Sources used