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 :
Based on the error message that you are getting:
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.
An easier approach could be to download Jenkins WAR for 2.127 (weekly release) or above. Then one can run the war with the following command:
${JAVA10_HOME}/bin/java --add-modules java.xml.bind -jar jenkins.war \
--enable-future-java --httpPort=8080 --prefix=/jenkins
Though note that there are few known issues registered on their tracker :
Here are the individual tracker for Java 10 compatiblity and one for Java 11.
Source - Jenkins with Java10-11
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With