Java Install and Setup
To write Java programs you must install a JDK (Java Development Kit). There are many free builds of the same OpenJDK, from Eclipse Temurin, Oracle, Amazon Corretto, Microsoft and others. They all work the same for learning.
Which version to install?
Install the newest LTS (long term support) version. At the time of writing it is Java 25. LTS versions get updates for many years, so they are the best for learning and for real projects.
Install steps
Windows
- Download the JDK installer (
.msi) of Java 25 from adoptium.net (Eclipse Temurin) or oracle.com/java. - Run the installer. Choose the option to set the
JAVA_HOMEvariable and to add Java to thePATH. - Open a new Command Prompt and check the install.
macOS
- Download the
.pkgfile from adoptium.net and run it, or use Homebrew. - Check the install in the Terminal.
brew install --cask temurin@25
Linux
# Ubuntu or Debian (the package name can change with the version)
sudo apt update
sudo apt install openjdk-25-jdk
Check the install
Two commands must work: java (the runtime) and javac (the compiler).
$ java -version
openjdk version "25.0.5" 2026-10-20 LTS
OpenJDK Runtime Environment Temurin-25.0.5+8 (build 25.0.5+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.5+8 (build 25.0.5+8-LTS, mixed mode, sharing)
$ javac -version
javac 25.0.5
If you see “command not found” the JDK is not in your PATH. Close the terminal, open a new one and try again, or check the JAVA_HOME and PATH settings.
Code editor or IDE
| Tool | Good for |
|---|---|
| IntelliJ IDEA (Community) | The most used Java IDE, with great hints |
| Eclipse | Free IDE, also very popular |
| VS Code with the Java extension | Light editor for beginners |
| Notepad or any text editor | Fine for the first small programs, with the terminal |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |