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.

Windows

Download the Windows x64 Installer (.exe)

Download for Windows

macOS

Download the macOS x64 DMG file

Download for macOS

Linux

Download the Linux x64 Compressed Archive (.tar.gz)

Download for Linux
2

Install Java JDK

Windows Installation

  1. Run the downloaded .exe file as Administrator
  2. Follow the installation wizard
  3. Note the installation directory (default: C:\Program Files\Java\jdk-24)
  4. Complete the installation

macOS Installation

  1. Open the downloaded .dmg file
  2. Run the .pkg installer
  3. Follow the installation wizard
  4. Java will be installed in /Library/Java/JavaVirtualMachines/

Linux Installation

  1. Extract the .tar.gz file: tar -xzf jdk-24_linux-x64_bin.tar.gz
  2. Move to /opt: sudo mv jdk-24 /opt/
  3. 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

Eclipse IDE

Popular open-source IDE with extensive plugin ecosystem.

Installation Steps:

  1. Download Eclipse IDE for Java Developers
  2. Extract the downloaded archive
  3. Run eclipse.exe (Windows) or eclipse (macOS/Linux)
  4. Choose workspace location

Initial Configuration:

  1. Create new Java project
  2. Configure build path with JDK 24
  3. Install additional plugins if needed
  4. Set up code formatting

Visual Studio Code

Lightweight editor with Java extensions for development.

Installation Steps:

  1. Download VS Code
  2. Install VS Code
  3. Install Java Extension Pack
  4. Install additional Java extensions

Required Extensions:

  • Extension Pack for Java
  • Language Support for Java
  • Debugger for Java
  • Java Test Runner
  • Maven for Java

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

  1. Verify JAVA_HOME environment variable
  2. Check PATH includes %JAVA_HOME%\bin (Windows) or $JAVA_HOME/bin (macOS/Linux)
  3. Restart command prompt/terminal
  4. Verify Java installation directory exists

Permission denied errors on macOS/Linux

Solution: Fix file permissions and ownership

  1. Check file permissions: ls -la /opt/jdk-24
  2. Fix ownership: sudo chown -R root:root /opt/jdk-24
  3. Set correct permissions: sudo chmod -R 755 /opt/jdk-24

IDE cannot find JDK

Solution: Configure IDE to use correct JDK path

  1. Open IDE project settings
  2. Navigate to Project Structure/SDK
  3. Add JDK and browse to installation directory
  4. Verify JDK version is 24

?? Setup Complete!

You now have a fully configured Java development environment. You're ready to start coding in Java 24!