Learning overview
- Estimated time
- 4 minutes
- Difficulty
- Beginner
- Prerequisites
- No prior experience required
- Learning outcome
- Explain java using a clear mental model · Apply java in practical Java work
- Last updated
- July 20, 2026
What you are installing
Beginners install a JDK (Java Development Kit). The JDK includes tools to compile and run Java programs. You do not need every enterprise tool on day one.
Install steps by platform
Windows: download a current JDK installer, run it, then reopen the terminal. macOS: use the official installer or a package manager you already trust. Linux: use your distribution packages or the vendor install docs for your version.
- Prefer a current Long-Term Support JDK when unsure
- Restart the terminal after installing
- Keep PATH/JAVA_HOME guidance from the installer
- Avoid mixing many old JDKs until you understand versions
Verify the install
Ask the terminal for versions. A Java version reply means the command is reachable.
java -version
javac -versionOutput
java version "21.x.x" ... javac 21.x.x
Confirm with a tiny program
Create HelloSetup.java, compile with javac, run with java. Local success confirms install, PATH, and the edit-compile-run loop.
public class HelloSetup {
public static void main(String[] args) {
System.out.println("JDK setup works");
}
}Output
JDK setup works
Frequently asked questions
Do beginners need the JDK or only the JRE?
To write and compile programs, install a JDK. Running-only setups are not enough for learning to build.
What if java -version fails?
The terminal may not see Java yet, the install may be incomplete, or you may need a new terminal window after PATH changes.
Is OpenJDK okay for beginners?
Yes. A modern OpenJDK distribution is a common and solid beginner choice.
Do I need an IDE on day one?
No. A simple editor plus terminal is enough. An IDE helps as projects grow.
Topic graph
A taxonomy-generated path through this subject.
Related courses
Related learning
Recommended automatically from shared technologies, topics, intent, and difficulty.
Related Guides
Related Tutorials
Related Glossary
Related Cheatsheets
Related Projects
Related Interview Questions
Related reading
Hand-picked companion pages that deepen this topic.
Your next steps
