Jenkins on Linux AWS can not start

Today, I have installed Jenkins on Linux AWS. Then start it, but an error as below.

[root@Jenkins_Server ~]# service jenkins restart
Shutting down Jenkins                                      [FAILED]
Starting Jenkins Mar 13, 2020 11:22:44 AM Main verifyJavaVersion
SEVERE: Running with Java class version 51, which is older than the Minimum required version 52. See
java.lang.UnsupportedClassVersionError: 51.0
        at Main.verifyJavaVersion(
        at Main.main(

Jenkins requires Java versions [8, 11] but you are running with Java 1.7 from /usr/lib/jvm/java-1.7.0-openjdk-
java.lang.UnsupportedClassVersionError: 51.0
        at Main.verifyJavaVersion(
        at Main.main(

I have installed java Version 1.8.x. Check Java version on Linux AWS the default version 1.7.x.

[root@Jenkins_Server ~]# java -version
java version "1.7.0_231"
OpenJDK Runtime Environment (amzn- u231-b01)
OpenJDK 64-Bit Server VM (build 24.231-b01, mixed mode)
[root@Jenkins_Server ~]# echo $JAVA_HOME

How to fixed it. I use the command below to switch JDK to Java version “1.8.x”. You can refer to the link here

sudo alternatives --config java

Link youtube

Now, I have started Jenkins is OK. Thank you for reading page

, , ,

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.