JDK8 or JDK11 to be used for Jenkins ?

54 views
Skip to first unread message

mj1414...@gmail.com

unread,
Dec 11, 2020, 5:00:27 AM12/11/20
to Jenkins Users
Hello,
I'm trying to decide, whether I should use JDK8 or JDK11 to run Jenkins.
So far I have been using JDK8.

If I look at the documentation, I find:
points to
"Java Requirements" https://www.jenkins.io/doc/administration/requirements/java/
which says
  • "Java 8 runtime environments, both 32-bit and 64-bit versions are supported"

  • "Since Jenkins 2.164 and 2.164.1 [1], 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."

So this sounds like "both JDK8 and JDK11 are supported"

So what is the current recommendation:
Use JDK8 ? JDK11 ?
Give JDK11 a try and report issues ?
Is an update planned to make JDK11 the preferred version ?

Regards

Martin

Dirk Heinrichs

unread,
Dec 11, 2020, 7:01:09 AM12/11/20
to jenkins...@googlegroups.com
Am Freitag, den 11.12.2020, 02:00 -0800 schrieb mj1414...@gmail.com:

I'm trying to decide, whether I should use JDK8 or JDK11 to run Jenkins.

We run ours on 11.

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
signature.asc

Mark Waite

unread,
Dec 11, 2020, 7:37:28 AM12/11/20
to Jenkins Users
On Fri, Dec 11, 2020 at 5:01 AM 'Dirk Heinrichs' via Jenkins Users <jenkins...@googlegroups.com> wrote:
Am Freitag, den 11.12.2020, 02:00 -0800 schrieb mj1414...@gmail.com:

I'm trying to decide, whether I should use JDK8 or JDK11 to run Jenkins.

We run ours on 11.


We run ci.jenkins.io on Java 11.

 
HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1be39a0b9d46dac4884aed1d8058336f3ee57b68.camel%40opentext.com.

Tej Singh Rana

unread,
Dec 11, 2020, 4:16:20 PM12/11/20
to jenkins...@googlegroups.com
Is an update planned to make JDK11 the preferred version ?
I don't think so. 
Depends on your Jenkins version. It matters when you use similar and above Jenkins 2.164.

Regards, 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.


--
---------------------
Tej Singh Rana

Richard Bywater

unread,
Dec 11, 2020, 4:22:26 PM12/11/20
to jenkins...@googlegroups.com
Personally if you are starting from a new Jenkins version then I'd go JDK11 unless you hit some strange edge-case issue where you might need to roll it back to JDK8.

Although JDK8 isn't going anywhere in the short term its probably best to keep with the newest LTS version of Java to not make the upgrade someone else's problem down the line 😀

Richard.

--

Baptiste Mathus

unread,
Dec 11, 2020, 4:28:38 PM12/11/20
to jenkins...@googlegroups.com
Agreed with Richard. 

Plus we literally have a thread on the dev list that's less than 10 days old, where we discussed bumping the minimum requirement to Java 11.

IOW, I'd recommend defaulting to Java 11 unless you've got very compelling reasons to run Java 8.
This way, when the requirement gets bumped, at some point (no date yet), this will be a no-event for you :-). (or will be facing a wall if you chose Java 8).

Cheers

mj1414...@gmail.com

unread,
Jan 25, 2021, 7:37:42 AM1/25/21
to Jenkins Users
I've updated from JDK 8 (jdk8u265-b01) to JDK11 (jdk-11.0.9.1+1)
Now I see in the log:
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/var/fpwork/ltedlphy/jenkinsCurrent/home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

It is not just this one specifc message, there are other similar ones.
This sounds like a ticking bomb...
Can I do something about this ? Opening tickets ?
Are my worries unfounded ?

Regards

Martin

Daniel Beck

unread,
Jan 25, 2021, 8:18:07 AM1/25/21
to jenkins...@googlegroups.com


> On 25. Jan 2021, at 13:37, mj1414...@gmail.com <mj1414...@gmail.com> wrote:
>
> WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/var/fpwork/ltedlphy/jenkinsCurrent/home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.TreeMap.comparator

At most you're on the current LTS release. Weekly releases have already been updated beyond this version of X-Stream, see https://www.jenkins.io/blog/2020/11/10/spring-xstream/

They may no longer show this warning, or at least not as often. https://github.com/x-stream/xstream/issues/101 seems to track it in general upstream.

mj1414...@gmail.com

unread,
Jan 25, 2021, 10:14:19 AM1/25/21
to Jenkins Users
Hello Daniel,
yes, we're on 2.263.1. (The open bug on the .2 is blocking us for the update)
Obviously should have mentioned the Jenkins version used ;-)

How to handle these " WARNING: Illegal reflective access" ? I see a whole bunch of them.
Given your statement about weekly releases, it probably doesn't make sense to report unreported once - does it ?

On the slaves we just found a blocker: We get a problem on building for Coverity (SCA). (I suspect a tool to fetch the different parts of the SW, which uses Java)
So far I don't understand, why the "normal" build seems to be ok. (Should be affected as well) I need a closer look.

Martin

mj1414...@gmail.com

unread,
Apr 30, 2021, 5:53:56 AM4/30/21
to Jenkins Users
Hello,

update: " On the slaves we just found a blocker: We get a problem on building for Coverity (SCA). (I suspect a tool to fetch the different parts of the SW, which uses Java) "
We found the culprit: A internal tool, which uses Java and got the check wrong. It tries to check for JDK >= 8 and got confused by finding JDK11 (with a differently formatted version string (Sun JJDK <=> openJDK)
So there never was a specific Coverity problem and we fixed our specific one.
We're currently using JDK11 on master and all slaves.

Martin
Reply all
Reply to author
Forward
0 new messages