Jenkins Upgrade and Presenting Issues

Jenkins setup: 2.504.2

Hello Community,

We recently upgraded our Jenkins instance from 2.462.1 to 2.504. Below are the configuration of Jenkins controller and agent.

Java version used on both - Java 17 (java-17-openjdk-17.0.15.0.6-2.el8.x86_64)
Apache Maven version - 3.6.3, 3.8.6, 3.9.9

Controller and Agent is connected via remoting.jar utility

Our development uses different versions of JDK including 8,11,17 and 21.

Testing:

  1. Using JDK 11 –
    I tested one of my smoke test which uses a Maven Project on Jenkins using JDK 11 and it encounter an issue related with Java incompatibility issue.
    Exception in thread “main” java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
  2. I tested the same smoke test using Freestyle job with JDK11 and the build is successful as well.
  3. using JDK 17 and JDK 21
    There are no any issues while using the JDK 17 and 21 for application build.

Questions:

  1. Is there any workaround or solution for the presenting issues on Testing #1 ?
  2. Is this a known issue with the current version of Jenkins? Is it a must condition to build the project with Java 17 or higher? I do not see any documentation stating that so far. Any links to blog or documentation will help.
  3. Is this only applicable to the projects that are Maven project ? Does it apply to the Freestyle and Multibranch project as well ?

Any suggestions to this is greatly appreciated.

Thanks,
Bipin G.

Jenkins 2.463 and higher requires Java 17 at runtime and also for the java process of agents. As the maven project type tightly integrates with Jenkins it requires that the jdk used there is as well at least Java 17.
The documentation of the Maven Integration plugin lists the jdk version that is required for certain Jenkins version. That list would need another entry stating that Jenkins 2.463 or higher requires at least Java 17.
The readme also recommends to not make use of the maven project type but instead use freestyle jobs with the maven build step or switch to pipeline jobs.
In freestyle and pipelie jobs you can choose whatever java version you want for the maven build as those a separate processes that do not interact with Jenkins.