Failed to start Jenkins on macOs - Java 10

Lyes CHIOUKH :

I'm trying to start Jenkins using:

java -jar jenkins.war

I got this error:

java.lang.UnsupportedClassVersionError: 54.0
at Main.main(Main.java:128)

This problem comes after an update of my development environment, I'd switched to :

  • Java 10.0.1+10
  • Jenkins 2.107.2
  • MacOS 10.13.4
Stephen C :

Based on the error message that you are getting:

  • The JAR / WAR file being loaded was compiled for Java 10 (and later) because the message says that the classfile version is 54.
  • The JRE that is actually being used is Java 9 or earlier. If you were using Java 10, it would be happy with version 54.

In other words, despite upgrading your Java to Java 10, you must be using an older version to start Jenkins.

Check the launch script for Jenkins and make sure that it uses the correct JRE installation.

If you are launching Jenkins using java -jar jenkins.war, check what java -version tells you ... at the same command prompt.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=460780&siteId=1