Installing JDK & IDE
Install the JDK, set JAVA_HOME and PATH, verify versions, and configure an IDE.
Installing JDK & IDE is a free Java Academy lesson on CoddyKit — 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, one of 3 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What to Install
What you will install
- JDK: Java Development Kit (compiler
javacand 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_HOMEto your JDK folder and prepend%JAVA_HOME%\bintoPath. - macOS/Linux: In your shell profile (e.g.,
~/.zshrc):export JAVA_HOME=<jdk path>andexport PATH=$JAVA_HOME/bin:$PATH. - Open a new terminal so changes take effect.
Verify JDK
Verify installation
- Run
java -versionto check the runtime. - Run
javac -versionto 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.
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, and the Java Academy course includes 3 lessons in total. 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.
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; this is — lesson 2 of 3, so you can start here or from the beginning and move at your own pace.
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
- Introduction to Programming
- Installing JDK & IDE
- Writing First Program