I am automation engineer i have deployed my build on the Jenkins using maven, I want to when scripts are executed then the browser should open. I searched on it some peoples says my me Run the Jenkins war file through cmd prompt when I am trying to Run the Jenkins through command prompt as:
java -jar Jenkins.war
Then the system generates an error as follows:
SEVERE: Running with Java class version 53.0, but 52.0 is required error
Anyone have any idea how I can fix the problem?
Beginning with Jenkins 2.357 (released on June 28, 2022) and the forthcoming 2.361. 1 LTS release, Jenkins requires Java 11 or newer on both the controller JVM (i.e., the JVM running jenkins.
OpenJDK JDK / JRE 17 - 64 bits.
Open Command prompt and go to the directory where Jenkins is installed. Here, the option --enable-future-java, is used to start Jenkins with Java 17. As you can see, Jenkins is now up and running. Next, you can open your browser and go to http://localhost:8080 or the port number that you provided for Jenkins.
This error message...
SEVERE: Running with Java class version 53.0, but 52.0 is required.
...implies that you have tried to initialize Jenkins on a system which is using java class version 53.0 which stands for Java 9.
As per the Jenkins documentation on Java requirements the following are mentioned:
There are two possible solutions as follows:
You can downgrade your Jenkins host JRE to Java 8 version and initiate Jenkins as follows:
${JAVA8_HOME}/bin/java -jar jenkins.war
You can upgrade your Jenkins host JRE to Java 10 or Java 11 version and initiate Jenkins along with the --enable-future-java
flag as follows:
${JAVA10_HOME}/bin/java -jar jenkins.war --enable-future-java
Java 10
Run the Jenkins WAR file 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
Run the Jenkins WAR file with the following command:
${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
As per Java class file - Wikipedia following are the major version number of the class file format being used:
Java SE 11 = 55
Java SE 10 = 54
Java SE 9 = 53
Java SE 8 = 52
Java SE 7 = 51
Java SE 6.0 = 50
Java SE 5.0 = 49
JDK 1.4 = 48
JDK 1.3 = 47
JDK 1.2 = 46
JDK 1.1 = 45
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