Java Academy · Lesson

Installing JDK & IDE

Install the JDK, set JAVA_HOME and PATH, verify versions, and configure an IDE.

Lesson 2 of 38 steps

Installing JDK & IDE is a free Java Academy lesson on CoddyKit. This is lesson 2 of 3. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Java Academy learning path, and your progress syncs across the web and the CoddyKit app. The Java Academy course includes 3 lessons in total.

What to Install

What you will install

  • JDK: Java Development Kit (compiler javac and tools).
  • IDE: an editor to write and run code comfortably (IntelliJ or VS Code).
  • Command line: verify versions and run simple commands.

After this lesson you will be ready to write and run Java on your machine.

Pick a JDK

Choose a JDK distribution

  • Common choices include OpenJDK builds (e.g., Temurin) or Oracle JDK.
  • Pick a stable LTS version (e.g., 17 or later).
  • Download the installer for your OS (Windows, macOS, Linux).

All provide the same Java language; differences are mostly licensing and packaging.

Set Environment

Set JAVA_HOME and PATH

  • Windows: System Properties > Environment Variables. Add JAVA_HOME to your JDK folder and prepend %JAVA_HOME%\bin to Path.
  • macOS/Linux: In your shell profile (e.g., ~/.zshrc): export JAVA_HOME=<jdk path> and export PATH=$JAVA_HOME/bin:$PATH.
  • Open a new terminal so changes take effect.

Verify JDK

Verify installation

  • Run java -version to check the runtime.
  • Run javac -version to check the compiler.
  • If a command is not found, re-check your PATH and JAVA_HOME settings.

Install an IDE

Install an IDE

  • IntelliJ IDEA Community or VS Code are great free options.
  • Point the IDE to your installed JDK.
  • Create a new project and choose a simple template if available.

An IDE gives you code completion, build/run buttons, and quick feedback.

First Run

First run: Create Main.java in your project and run it. You should see the message printed in the console. Try compiling and running from the terminal too.

public class Main {
  public static void main(String[] args) {
    System.out.println("Hello, Java from your IDE!");
  }
}

Requirements Check

Quick check: Which items do you need to write and run Java locally?

Recap and Next

Recap: You installed a JDK, set JAVA_HOME and PATH, verified versions, installed an IDE, and ran a first program.

Next: Practice by creating a small project and running it from the terminal and the IDE.

Free to start

Learn Java with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
104
Lessons
374

Frequently Asked Questions

Is the “Installing JDK & IDE” lesson free?

Yes — the full text of “Installing JDK & IDE” is free to read here on the web. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Java Academy course, upgrade to CoddyKit PRO. The Java Academy course includes 3 lessons in total.

What will I learn in “Installing JDK & IDE”?

Install the JDK, set JAVA_HOME and PATH, verify versions, and configure an IDE. You practise Java Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Java Academy?

No prior experience is required. Java Academy on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 2 of 3.

How long does the “Installing JDK & IDE” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Java Academy lesson?

Yes. Every Java Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Introduction to Programming
  2. Installing JDK & IDE
  3. Writing First Program
← Back to Java Academy