Reputation: 4409
I am trying to setup Jenkins on first step I got following error when running the command "java -jar jenkins.war"
SEVERE: Running with Java class version 55.0, but 52.0 is required.Run with the --enable-future-java flag to enable such behavior. See https://jenkins.io/redirect/java-support/
java.lang.UnsupportedClassVersionError: 55.0
at Main.main(Main.java:139)
Jenkins requires Java 8, but you are running 11.0.1+13-LTS from /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
java.lang.UnsupportedClassVersionError: 55.0
at Main.main(Main.java:139)
Can any one guild me how to fix this?
Upvotes: 1
Views: 10935
Reputation: 11
If you have more Recent Java version installed, Run
java -jar jenkins.war --enable-future-java --httpPort=xxxx
Upvotes: 0
Reputation: 1
Upvotes: 0
Reputation: 31
It works with "java -jar jenkins.war --enable-future-java --httpPort=9090".
Steps:
Jenkins will start. then Go to "http://localhost:9090/" and enter "initialAdminPassword" then Jenkins will start properly.
Upvotes: 3
Reputation: 14651
I think the errormessage is quite clear. You are trying to run Jenkins with Java version 11, while it would prefer Java 8.
According to the documentation Java 11 is not fully supported yet, but as the errormessage suggest, you can make it work by using the --enable-future-java
flag via command line.
The more safe option is to install and use the Java version preferred by the Jenkins team, which is Java 8 at this point. For that you need to install of course that version on your machine first.
Upvotes: 5