Ch 1.2 Setting Up the Development Environment
To start Java development, you primarily need two things: the JDK to translate code into machine instructions, and an IDE to help you write code efficiently.
1. Installing the Java Development Kit (JDK)
The JDK is a collection of tools necessary to develop and run Java programs.
- Choosing a Version: Java has commercial versions (Oracle JDK) and free open-source versions (OpenJDK). For learning, we recommend ** OpenJDK-based**distributions such as Amazon Corretto or Azul Zulu.
- LTS (Long Term Support) Versions: We suggest using version 17 or 21 for stability.
- Verification: After installation, open your terminal (or CMD) and run these commands to verify the installation:
java -version
javac -version
2. Installing IntelliJ IDEA
IntelliJ IDEA is the most widely used Integrated Development Environment (IDE) in modern Java development.
- Community Version: Free and sufficient for learning and open-source development.
- Ultimate Version: Paid version including advanced web and enterprise features.
- Why we recommend it: It provides powerful code completion, real-time error detection, and intuitive shortcuts that maximize productivity.
💡 Environment Variables (Windows Users)
While most modern installers handle this automatically, if manual setup is required, set the JAVA_HOME system variable to the JDK installation path and add %JAVA_HOME%\bin to your Path variable.
In the next section, we will write our very first Java program.