Selenium Java 8 Support: What Developers Need to Know
Selenium announced Java 11 as the minimum for its Java bindings and Grid effective September 30, 2023. Here’s how to interpret conflicting documentation and plan your upgrade.
Short answer: Selenium announced that Java 11 would become the minimum supported version for both the Java bindings and Selenium Grid on September 30, 2023. If you maintain a Selenium project on Java 8, plan to move its test and Grid runtimes to Java 11 or later. The announcement establishes the project’s policy; it does not say that every older Selenium artifact is technically unable to launch on Java 8.
The current Selenium downloads page lists version 4.49.0 as the stable Java binding and Grid release, as of October 3, 2026. The Selenium 4 upgrade guide still says the minimum Java version is 8, which conflicts with the later, dated policy announcement. Treat that sentence as stale or internally inconsistent guidance unless Selenium corrects it. Selenium’s Java 8 support announcement is the more specific source for the change and its effective date.
What the Java 11 minimum covers
The June 9, 2023 announcement says the change took effect on September 30, 2023. It applies to both Selenium’s Java bindings and Selenium Grid. Selenium explained that Java 8 had reached the end of active support and that the project was moving to Java’s native HTTP Client, which requires Java 11 or later. The announcement says the project chose Java 11 rather than moving directly to Java 17 as a more cautious transition. It does not establish Java 17 as a later minimum.
The downloads page currently lists Selenium 4.49.0 as stable for Java and Grid, released September 9, 2026. The release announcement does not describe a return to Java 8 support or a changed minimum. Check the official downloads page when selecting a Selenium release.
Why official documentation appears to disagree
The Selenium 4 upgrade guide contains a statement that the minimum Java version is still 8. That sentence conflicts with the later announcement, which gives a specific effective date and explicitly covers both Java bindings and Grid. The reviewed sources do not explain why the upgrade guide differs.
When guidance conflicts, compare its publication date, whether it describes a future transition or the current state, and the exact components in scope. Here, the dated policy announcement is both later and more specific than the upgrade guide’s sentence. Use Java 11 or later as the announced baseline for current Selenium Java bindings and Grid.
Check every Java runtime in your setup
Adding a Selenium dependency does not choose the JDK that runs your tests. Check the runtime used by local commands, IDEs, CI jobs, and any Grid server. The Selenium installation guide documents Maven and Gradle dependency setup; configure the build tool and execution environment separately.
- Inspect the local Java runtime. Run
java -versionin the same terminal or environment used to launch tests. Also check the IDE’s project SDK and test-run configuration. - Inspect the build tool’s runtime. Run
mvn -versionfor Maven or./gradlew --versionfor Gradle. These report the Java runtime used by the build process, which may differ from the shell’s default. - Inspect CI. Check the JDK configured in the job that compiles and runs tests. Updating a developer workstation does not change a CI runner’s runtime.
- Inspect Grid. If you run Grid, check the Java runtime on the machine or container hosting the Grid server. The announced minimum includes Grid as well as the bindings.
- Align the build target and runtime. Set the project’s source and target compatibility or Java toolchain to the version you intend to use, and ensure that the actual test process runs with Java 11 or later.
Dependency setup and a minimal Java example
Use the Selenium Java dependency shown in the official installation guide, and select a version from the official downloads page. The snippets below show dependency placement; they do not pin a Selenium release so the version can be chosen from the current official release information.
Maven
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>YOUR_SELENIUM_VERSION</version>
</dependency>
</dependencies>
Gradle
dependencies {
testImplementation("org.seleniumhq.selenium:selenium-java:YOUR_SELENIUM_VERSION")
}
Runnable Java smoke test
This small program starts a browser, opens a page, prints its title, and closes the browser. It assumes a browser and a compatible driver are available to Selenium in the environment; the Selenium compatibility announcement does not prescribe a browser-driver installation method.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class SeleniumSmokeTest {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
try {
driver.get("https://example.com");
System.out.println(driver.getTitle());
} finally {
driver.quit();
}
}
}
Compile and run that class with the Java runtime used by your project. For a test framework, put the same browser lifecycle in a test or fixture and retain a finally or teardown path that calls quit().
Upgrade checklist for Java 8 projects
- Choose a supported JDK version of 11 or later for the Selenium Java process.
- Update the local development environment and IDE project/test runtime.
- Set the Maven or Gradle toolchain and compilation configuration consistently.
- Update CI runners and container images that compile or execute the tests.
- Update the runtime for every Selenium Grid server.
- Run a representative test suite and review failures separately from Java-version configuration issues.
- Record the selected JDK and Selenium versions so local, CI, and Grid environments can be compared during troubleshooting.
Common problems and fixes
| Symptom | Likely cause | What to check or do |
|---|---|---|
| The shell reports Java 11, but tests still fail with a Java-version error. | The IDE, build daemon, test worker, or CI job is using a different JDK. | Inspect the runtime reported by Maven or Gradle and the IDE’s test configuration. Set the test execution runtime to Java 11 or later. |
| The project compiles, but the Selenium process fails at startup on Java 8. | Compilation and execution use different Java versions, or a Selenium component requires the announced Java 11 baseline. | Check the runtime of the process that launches the tests, not only the compiler settings, then upgrade that runtime. |
| The Selenium upgrade guide says Java 8 is sufficient. | The guide’s minimum-version sentence conflicts with the dated policy announcement. | Use the specific announcement for the September 30, 2023 policy change and check current official release information. |
| Tests run locally but fail when using remote Grid. | The Grid server may be running under a different or older JDK. | Check the Java runtime on the Grid host or container as well as the client runtime. The announced minimum covers both. |
| A dependency update did not change the Java version used by tests. | A Maven or Gradle dependency selects Selenium libraries, not the process JDK by itself. | Configure the build tool, IDE, CI runner, and Grid runtime separately. |
Performance, reliability, and upgrade cost
The cited Selenium policy sources explain a compatibility baseline; they do not publish comparative performance benchmarks for Java 8 and Java 11. Do not assume a speed improvement from this version change alone. Evaluate execution time with the same tests and environment if performance is a concern.
For reliability, the practical risk is runtime drift: local tests may use one JDK while a CI worker or Grid host uses another. Make the Java version explicit in each environment and verify the runtime that actually launches the process. A staged rollout can start with a representative local test run, followed by CI, then Grid-host updates, while keeping failures attributable to a specific environment.
The sources do not quantify upgrade effort or cost. Estimate it from the number of local, CI, and Grid environments that need a JDK change, plus any project-specific compatibility work. Selenium’s announcement does not say every earlier artifact will fail technically on Java 8, so distinguish a project support-policy decision from a claim about every historical binary.
Or skip the browser setup
If the task is capturing a website screenshot rather than running browser automation, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns an image or PDF. Its clean-shot steps can accept cookie consent and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 screenshots.
Example using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Create a free account for 1,000 screenshots a month, with no card required.
FAQ
Does the announcement set Java 17 as the minimum?
No. The 2023 announcement chose Java 11 and described it as a cautious step rather than moving directly to Java 17.
Does this prove every old Selenium version cannot run on Java 8?
No. The sources establish the announced support baseline, not a technical failure guarantee for every older Selenium artifact.
Does changing the Maven or Gradle dependency upgrade Java?
No. The dependency selects Selenium libraries. The JDK used by the build and test processes must be configured in their execution environments.


