Java - Installation & Toolchain

Installation & Toolchain

1) Install a JDK

  • Temurin (Adoptium) JDK is a widely used, free distribution.
  • Prefer an LTS version (e.g., 17 or 21) for stability.

2) Verify CLI Tools

java -version
javac -version

3) IDEs

  • IntelliJ IDEA (Community/Ultimate)
  • VS Code with Java extensions

4) Build Tools

Maven

mvn -v
# create a quickstart
mvn archetype:generate -DgroupId=com.example -DartifactId=demo -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
cd demo
mvn test
mvn package

Gradle

gradle -v
# initialize (if Gradle is installed)
gradle init --type java-application

5) JAVA_HOME

Set JAVA_HOME to your JDK installation and add $JAVA_HOME/bin to PATH.

Try it

  1. Run java -version and javac -version to verify your JDK.
  2. Initialize a Maven or Gradle project and run the default tests (mvn test or gradle test).
  3. Open the project in your IDE and run the sample app.