11

Reference: Jenkins Users :: Jenkins on Windows: Java + JRE (version) confusion

Which Java version should I run Jenkins with (on Windows)? Should I use the included JRE of the Windows master? Should I use the last 1.6 release? Should I just run it on a current 1.7 version? (Note that I'm running the stand-alone version.)

All I could find on the Jenkins pages was: To run Jenkins, minimally you need to have JRE 1.5 or later.

Aside: My Windows server(s) are still 32bit 2k3, but what do you run Jenkins with on 64 bit platform? 32bit or 64bit JVM?

Note that this question is only about the JRE (or JDK) I use to run the Jenkins instance(s) with. I'm not concerned with the JDK used to build Java programs.

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
Martin
  • 563
  • 4
  • 10
  • 25
  • Also putting comment link from VonC here: https://issues.jenkins-ci.org/browse/JENKINS-13585 – Martin Mar 18 '13 at 09:24

4 Answers4

12

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.

VonC
  • 2,653
  • 5
  • 29
  • 48
  • Yeah, I know that I *can*. Question is, isn't there anything recommended? (I added a note about JDK for building - I'm not concerned with that one.) – Martin Mar 18 '13 at 07:48
  • @Martin no, there isn't anything recommended: the easiest is to use the JDK that it will find in the PATH (as mentioned in [this book](http://my.safaribooksonline.com/9781449311155/chapter-installing-downloading) for instance). – VonC Mar 18 '13 at 07:55
  • It'd be interesting what [Jenkins on Jenkins](http://ci.jenkins-ci.org/) uses. – Martin Mar 18 '13 at 08:16
  • 1
    @Martin you doesn't seem to be the only one ;) https://issues.jenkins-ci.org/browse/JENKINS-13585 – VonC Mar 18 '13 at 08:30
  • Is there anything about JDK vs. JRE to be mindful of? Even if I'm not building java projects? – Alexander Trauzzi Dec 14 '17 at 19:17
  • @Omega For Jenkins, a JRE is enough (https://jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8/). In general, read https://stackoverflow.com/q/1906445/6309. – VonC Dec 14 '17 at 19:38
  • Does Jenkins currently support Java 9? I can't find their canonical reference for Java compatibility. – nnyby May 23 '18 at 17:35
  • nvm - I found some info here: https://issues.jenkins-ci.org/browse/JENKINS-40689 Looks like it's best to just stick with Java 8 at the moment. – nnyby May 23 '18 at 17:36
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

aventurin
  • 211
  • 1
  • 2
  • 7
  • it doesn't require 8 or 11, it supports 8 or 11. so basically that means, use anything not not supported at your own risk (Java 14, for example) – linuxUser123 Jul 16 '20 at 12:39
1

If a project, Jenkins here, does not recommend any specific JRE version I would go with one of the current stable version recommended by Oracle.

But as I think that Java 8 is generally not ready for production at the moment of writing these words and as there have been some Java 8-specific bugs in Jenkins I would use JRE 7.


For 64-bit Windows Oracle has a special server JRE 7 64-bit version, documented here, available for download here.

For 32-bit Windows just go with latest standard JRE 7 32-bit, available here.

Greg Dubicki
  • 1,191
  • 1
  • 14
  • 30
1

As of Version 2.38 of Jenkins it's possible to use JDK 1.8.

timbru31
  • 111
  • 2