Setup Overview
What You'll Install
Java Development Kit (JDK) 24
Integrated Development Environment (IDE)
Command Line Tools
Environment Variables
Estimated Time
Java JDK:
15-20 minutes
IDE Setup:
20-30 minutes
Configuration:
10-15 minutes
Total:
45-65 minutes
Java JDK Installation
1
Download Java 24 JDK
Download the latest Java Development Kit from Oracle's official website.
2
Install Java JDK
Windows Installation
- Run the downloaded .exe file as Administrator
- Follow the installation wizard
- Note the installation directory (default:
C:\Program Files\Java\jdk-24
) - Complete the installation
macOS Installation
- Open the downloaded .dmg file
- Run the .pkg installer
- Follow the installation wizard
- Java will be installed in
/Library/Java/JavaVirtualMachines/
Linux Installation
- Extract the .tar.gz file:
tar -xzf jdk-24_linux-x64_bin.tar.gz
- Move to /opt:
sudo mv jdk-24 /opt/
- Set permissions:
sudo chown -R root:root /opt/jdk-24
3
Set Environment Variables
JAVA_HOME
Points to your Java installation directory
Windows:
JAVA_HOME = C:\Program Files\Java\jdk-24
macOS/Linux:
JAVA_HOME = /opt/jdk-24
PATH
Add Java bin directory to system PATH
Windows:
PATH = %PATH%;%JAVA_HOME%\bin
macOS/Linux:
PATH = $PATH:$JAVA_HOME/bin
Setup Commands
Windows (Command Prompt as Administrator):
setx JAVA_HOME "C:\Program Files\Java\jdk-24"
setx PATH "%PATH%;%JAVA_HOME%\bin"
macOS/Linux (add to ~/.bash_profile or ~/.zshrc):
export JAVA_HOME=/opt/jdk-24
export PATH=$PATH:$JAVA_HOME/bin
IDE Setup
Verification & Testing
Command Line Verification
Verify Java installation from command line:
Check Java Version:
java -version
Expected output: java version "24.0.1" 2024-XX-XX
Check Java Compiler:
javac -version
Expected output: javac 24.0.1
Check Java Home:
echo $JAVA_HOME
Should show your Java installation path
Test Java Program
Create and run a simple Java program to verify everything works:
HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, Java 24!");
System.out.println("Java version: " + System.getProperty("java.version"));
System.out.println("Java home: " + System.getProperty("java.home"));
}
}
Compile and Run:
javac HelloWorld.java
java HelloWorld
Expected Output:
Hello, Java 24!
Java version: 24.0.1
Java home: /path/to/your/java
IDE Verification
Verify your IDE is properly configured:
Project Creation:
- Create new Java project
- Select JDK 24 as project SDK
- Verify project structure
Code Execution:
- Write simple Java code
- Compile and run from IDE
- Check for any errors
Debugging:
- Set breakpoints
- Start debug session
- Step through code
Troubleshooting
Common Issues
'java' is not recognized as an internal or external command
Solution: Check if JAVA_HOME and PATH are set correctly
- Verify JAVA_HOME environment variable
- Check PATH includes %JAVA_HOME%\bin (Windows) or $JAVA_HOME/bin (macOS/Linux)
- Restart command prompt/terminal
- Verify Java installation directory exists
Permission denied errors on macOS/Linux
Solution: Fix file permissions and ownership
- Check file permissions:
ls -la /opt/jdk-24
- Fix ownership:
sudo chown -R root:root /opt/jdk-24
- Set correct permissions:
sudo chmod -R 755 /opt/jdk-24
IDE cannot find JDK
Solution: Configure IDE to use correct JDK path
- Open IDE project settings
- Navigate to Project Structure/SDK
- Add JDK and browse to installation directory
- Verify JDK version is 24