Java Setup
Install JDK (Java Development Kit)
Step 1:
Go to the official Oracle JDK download page:
https://www.oracle.com/java/technologies/javase-downloads.htmlStep 2:
- Download the latest JDK for your operating system (Windows, Mac, or Linux).
- Run the installer and follow the installation steps (just click "Next", "Next", etc.).
Step 3:
After installing, set up the Environment Variable (only for Windows):
- Open Control Panel → System → Advanced system settings → Environment Variables.
-
Under System Variables, click New:
- Variable Name: JAVA_HOME
- Variable Value: Path to your JDK installation (like C:\Program Files\Java\jdk-21)
- Then, edit the Path variable:
- Add %JAVA_HOME%\bin to the list.
Step 4:
Check if Java is installed correctly:
Open Command Prompt (or Terminal) and type:
java -version
and
javac -version
If you see the version printed (like java version "21"), ✅ it's installed!
Install an IDE (Integrated Development Environment)
You can use a simple text editor + terminal, but using an IDE makes Java much easier.
- (a) Install IntelliJ IDEA
- Go to: 👉 https://www.jetbrains.com/idea/download/
- Download IntelliJ IDEA Community Edition (free).
- Install it normally (Next, Next, Finish).
- Open IntelliJ → Create New Project → Select Java → Done!
- Install Eclipse IDE
- Go to: 👉 https://www.eclipse.org/downloads/
- Download the Eclipse IDE for Java Developers.
- Install and open Eclipse.
- Create a new Java Project → Add a class → Start coding!