Back to course

Setting up Your Environment: JDK, JRE, and IDE

Java Mastery: From Zero to Professional Developer (50-Lesson Journey)

Lesson 2: Setting up Your Environment: JDK, JRE, and IDE

To write and run Java code, you need specific tools.

1. Understanding JDK, JRE, and JVM

  • JVM (Java Virtual Machine): The component that executes Java bytecode. It's the core of Java's platform independence.
  • JRE (Java Runtime Environment): Includes the JVM, plus the core libraries and necessary files to run Java applications. If you only want to run a Java program, you need the JRE.
  • JDK (Java Development Kit): The full development kit. It includes the JRE and vital development tools like the compiler (javac) and debugger. As a developer, you need the JDK.

2. Installation Steps (JDK)

  1. Download the latest long-term support (LTS) version of the JDK (e.g., Java 17 or 21) from Oracle or OpenJDK providers.

  2. Follow the installation prompts.

  3. Verification: Open your command line (Terminal/CMD) and type:

    bash java -version javac -version

    If you see version numbers, the JDK is installed correctly.

3. Choosing an Integrated Development Environment (IDE)

An IDE dramatically simplifies coding, compiling, debugging, and project management.

IDEBest ForNotes
IntelliJ IDEA (Community Edition)Beginners/ProfessionalsHighly recommended for modern Java development.
EclipseEnterprise DevelopmentLong-standing, robust, and free.
VS CodeLightweight DevelopmentGood for quick edits, requires Java extensions.

Action Item: Download and install IntelliJ IDEA Community Edition and the JDK (if you haven't already).