As you probably know, we will have a Jenkins and Java 10+ online hackathon this week. In order to enable early adopters to try out Jenkins with new Java versions, we have updated Jenkins core and Docker packages. Starting from Jenkins 2.127, weekly releases can be launched with Java 10 and Java 11 (preview). Although there are some known compatibility issues, the packages are ready for evaluation and exploratory testing.

This article explains how to run Jenkins with Java 10 and 11 using Docker images and WAR files. It also lists known issues and provides contributor guidelines.

Update from the author: OpenJDK 11 has been released on September 25, 2018. Starting from this date, Java 10 is in the "end of life" state. The Jenkins project no longer ships preview versions for Java 10, please use these guidelines only for Java 11 preview builds.

Running in Docker

In order to simplify testing, we have created a new jenkins/jenkins-experimental repository on DockerHub. This repository includes various Jenkins Core images, including Java 10 and Java 11 images. We have also set up development branches and continuous delivery flows for Jenkins core, so now we can deliver patches for these images without waiting for weekly releases.

You can run the image simply as:

docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins-experimental:latest-jdk11

The following tags are available:

  • 2.127-jdk10, 2.128-jdk10 - Weekly releases packaged with Java 10

  • 2.127-jdk11, 2.128-jdk11 - Weekly releases packaged with Java 11

  • latest-jdk10 - Jenkins core build from the java10-support branch

  • latest-jdk11 - Automatic build from the core’s java11-support branch.

  • blueocean-jdk10, blueocean-jdk11 - Experimental build, which bundles all Jenkins Pipeline and Blue Ocean patches required to run on Java 11. If you want to try Pipeline, use this image

Java 10/11 images are fully compatible with the official jenkins/jenkins Docker image documentation, e.g. you can use plugins.txt to install plugins, mount volumes and pass extra options via environment variables.

Running Jenkins without Docker

Java 10

  1. Download Jenkins WAR for 2.127 or above (or build the experimental branch)

  2. Run WAR with the following command:

${JAVA10_HOME}/bin/java --add-modules java.xml.bind -jar jenkins.war \
    --enable-future-java --httpPort=8080 --prefix=/jenkins

Java 11

  1. Download Jenkins WAR for 2.127 or above (or build the experimental branch)

  2. Download the following libraries to the same directory as jenkins.war

  3. Run the following command:

Run Jenkins with ${JAVA11_HOME}/bin/java \
    -p jaxb-api.jar:javax.activation.jar --add-modules java.xml.bind,java.activation \
    -cp jaxb-core.jar:jaxb-impl.jar \
    -jar jenkins.war --enable-future-java --httpPort=8080 --prefix=/jenkins

Current state

As of June 17, we have achieved the following state:

Known issues

So far we know about the following issues:

  • Pipeline crashes immediately on Java 10 and 11 (JENKINS-46602)

    • Workaround: Pipeline: Support plugin should be updated to version 2.21-rc591.43d37d4d080a from the Incrementals repo (download)

  • FIXED - Git Client plugin 2.7.2 cannot be installed when running with Java 11 build 18ea

  • There are many warnings about Illegal reflective access during execution (linked in JENKINS-40689).

    • In current Java 10 and 11 releases it does not lead to failures, but we want to cleanup these warnings anyway

  • FIXED - Configuration-as-Code plugin fails to export configurations on Java 10 (JENKINS-51991)

We anticipate to discover and report more issues during the hackathon this week.

Contributing

If you discover incompatibilities in plugins, please report issues in our bugtracker. We have java10 and java11 labels for such issues.

If you are interested to try out Jenkins with Java 10 and 11 before June 22nd, you may be interested to sign-up to the Jenkins and Java 10+ online hackathon. Everybody is welcome to join, independently of their Jenkins experience and amount of time they have available. Exploratory testing is also within the hackathon’s scope. During this event, please also use the java10_hackathon label. It will help us to track contributions and send folks some small "thank you" gifts for participating (details will be figured out during the hackathon).

If you want to contribute patches to the core, please submit pull requests to java10-support or java11-support branches. If the patches are compatible with Java 8, we will try to upstream them to weekly releases. For plugin patches please create pull requests against main branches and then follow guidelines from plugin maintainers. If you need additional reviews and you are a member of the jenkinsci organization, feel free to mention the @jenkinsci/java10-support team in your PRs.

About the Author
Oleg Nenashev

R&D and Automation engineer with Hardware/Embedded background. He started using Hudson/Jenkins in 2008 and became an active contributor in 2012. Oleg maintains Jenkins core, Remoting and several plugins. He organizes events like Jenkins meetups and GSoC in the community. Nowadays Oleg works at CloudBees on making Jenkins cloud-native.