Which Java version should I run Jenkins with?

Solution 1:

Update 2017: After "Jenkins Upgrades To Java 8 (January)" and PR 2802, JDK 8 will be mandatory for Jenkins 2.54 or more (April 2017).


You can use any jdk (1.5+ 1.7+ for 1.608+) you want for Jenkins: this is separate from the JDK that a job would use (either a job running on the master, or on a slave).

So it doesn't really matter: using one JDK for running Jenkins won't prevent you to use any other JDK for your jobs.

Update 2015: Jenkins just said good by to JDK6 (2015-04-06)

About two years ago, we bumped our runtime JRE requirement from Java5 to Java6. And so the time has come once again for us to finally move on to Java7.
Because of all the new language features, many of us the developers really wanted to move right on to Java8, but after much discussion we settled to move to Java7 first and then to Java8.

Solution 2:

Jenkins now requires Java 8 or 11. To cite Jenkin's Java Requirements:

Running Jenkins

Modern Jenkins versions have the following Java requirements:

  • Java 8 runtime environments, both 32-bit and 64-bit versions are supported

  • Since Jenkins 2.164 and 2.164.1 2, Java 11 runtime environments are supported

    • Running Jenkins with Java 11 is documented here
    • There are some precautions to take when upgrading from Java 8 to Java 11 in Jenkins, please follow these guidelines.
  • Older versions of Java are not supported

  • Java 9 and Java 10 are not supported

  • Java 12 is not supported