I am trying to install Jenkins on AWS Linux Image. I have installed Jenkins using the following command:
sudo yum install jenkins -y
But now when I start the service using the following command:
sudo service jenkins start
I get the following error:
Complete!
[ec2-user@ip-10-0-2-100 ~]$ sudo service jenkins start
Starting Jenkins Aug 29, 2019 12:18:03 PM Main verifyJavaVersion
SEVERE: Running with Java class version 51, which is older than the Minimum required version 52. See https://jenkins.io/redirect/java-support/
java.lang.UnsupportedClassVersionError: 51.0
at Main.verifyJavaVersion(Main.java:182)
at Main.main(Main.java:142)
Jenkins requires Java versions [8, 11] but you are running with Java 1.7 from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231.x86_64/jre
java.lang.UnsupportedClassVersionError: 51.0
at Main.verifyJavaVersion(Main.java:182)
at Main.main(Main.java:142)
[ OK ]
[ec2-user@ip-10-0-2-100 ~]$