Jenkins on Linuz AWS AMI error java lang UnsupportedClassVersionError 51 0

0 votes

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 ~]$
Aug 29, 2019 in AWS by Meghna
1,322 views

1 answer to this question.

+1 vote
I had a similar problem, i removed the Jdk 1.7 version and everything worked fine.

To do so, i did as following:

- rpm -aq | grep -i jdk

- sudo yum remove <desired_java_version>

- sudo yum install java-1.8.0-openjdk-devel

I hope this can help you :-)
answered Feb 6, 2020 by Jacques Schmitz Junior

Related Questions In AWS

0 votes
1 answer

Jenkins on AWS error "wget: missing URL"

Hahah @Dipti, its a very silly mistake. ...READ MORE

answered Aug 29, 2019 in AWS by Kalgi
• 52,360 points
1,710 views
0 votes
1 answer

A strange spark ERROR on AWS EMR

Those warning messages can be suppressed by ...READ MORE

answered Jul 13, 2018 in AWS by Flying geek
• 3,280 points
1,447 views
0 votes
1 answer

aws java sdk for ssm gives java.lang.NoSuchFieldError: SIGNING_REGION

You may start with Checking that you ...READ MORE

answered Aug 6, 2018 in AWS by Priyaj
• 58,090 points
6,575 views
0 votes
1 answer

Getting memory leak error on AWS EMR - Saving Dataframe into hive external table on S3 -

You can start by creating  a temp ...READ MORE

answered Aug 9, 2018 in AWS by Priyaj
• 58,090 points
1,287 views
0 votes
2 answers

Error : No supported authentication methods available on AWS

Diff from other answers above: I received this ...READ MORE

answered Mar 25, 2019 in AWS by Bathinda
• 140 points
31,535 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP