Install JDK and IDE

What You Need

ToolWhyGet it
JDK 17 or 21Selenium 4 needs Java 11+, current releases recommend 17+Eclipse Temurin (adoptium.net)
IntelliJ IDEA Community or Eclipsewrite and run testsjetbrains.com / eclipse.org (both free)
Mavendownloads Selenium and other jarsbundled with IntelliJ and Eclipse; or maven.apache.org
Google Chromebrowser to automategoogle.com/chrome

Check the Installation

Example

Open a terminal and run:

java -version
mvn -v

Example output

openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)

Apache Maven 3.9.9
Java version: 21.0.4, vendor: Eclipse Adoptium

Example

You can also check the version from Java itself:

public class Main {
    public static void main(String[] args) {
        int version = Runtime.version().feature();
        System.out.println("Java " + (version >= 17 ? "17 or newer" : "too old") + ": ready for Selenium 4 = " + (version >= 17));
    }
}

Output

Java 17 or newer: ready for Selenium 4 = true