There are separate run and job execution requirements for Jenkins installations.
Java 8 or Java 11 are required for running modern versions of Jenkins. Upgrading an existing Jenkins setup from Java 8 to Java 11? See the upgrade guidelines.
Java 11 Docker installation instructions are included in "Downloading and running Jenkins in Docker"
Starting with the Jenkins 2.357 weekly release, Java 11 or Java 17 will be required. Java 8 is supported on the Long Term Support release line until the September 2022 LTS release.
Java 17 users can run the
jenkins/jenkins:jdk17 Docker image.
All other Java versions are not supported.
These requirements apply to all components of the Jenkins system, including Jenkins controller, all types of agents, CLI clients, and other components.
Jenkins project performs a full test flow with the following JDK/JREs:
OpenJDK JDK / JRE 11 - 64 bits
OpenJDK JDK / JRE 17 - 64 bits
JRE/JDKs from other vendors are supported and may be used. See our Issue tracker for known Java compatibility issues.
Jenkins jobs may be executed on Java versions different from the controller/agent runtime. Generally, Jenkins allows ANY version of JRE/JDK to be invoked during the build. It includes:
Execution of Java commands from CLI
Installation and execution of build steps using JDK managed by JDK tool installers
In the case of particular plugins, there are still Java requirements:
If you use Maven Integration Plugin, version of the JDK used for the build must be equal to the version used by Jenkins
If you use Swarm Plugin to create agents, JRE version must be equal to the version of the controller
If you use Docker Pipeline Plugin with a bundled JRE/JDK to execute jobs, versions of such bundled Java must be equal to the version of the controller
Modern versions of Jenkins controllers and Jenkins agents verify Java requirements and notify users when they are launched with an unsupported version.
The Jenkins Versions Node Monitors plugin provides detailed Java version monitoring.