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.
The version of the JDK used to build Java-based projects, or the version of Java used to run Java-based tools is independent from the version of Java used to run the Jenkins controller and agent processes. During a build, any version of the JRE or JDK can be launched as long as it’s compatible with the system the build is running on. This includes:
Execution of java
or javac
from shell build steps and similar
Execution of Maven/Ant/… build steps using a JDK managed by JDK tool installers
A few plugins have more strict requirements, generally requiring that a build is executing in the same version of Java as is used to run the Jenkins controller and agents. A notable example of that is Maven Integration Plugin, which requires that the version of the JDK used for the Maven build must be at least the same version as is used for the Jenkins controller. These cases are generally documented in the plugin documentation.
Modern versions of Jenkins controllers and Jenkins agents verify Java requirements and notify users when they are launched with an unsupported version.
The Versions Node Monitors plugin provides detailed Java version monitoring.