简体   繁体   中英

Class has been compiled by a more recent version of the Java Environment (class file version 52.0.)'

Hi I am doing a course on Mulesoft and one of the exercises I need to locally host a database to help do the course exercises The first step is to run a jar file

When I try to run the command java -jar mulesoft-training-services-1.8.8.jar, I am getting a compiler error which says 'Class has been compiled by a more recent version of the Java Environment (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0.'

Now from reading, I know this is to do with jre and it seems I only have jre8 whereas this is Jre11. How would I go about fixing this? Do I need to update the JRE? If so how do I do it? Or is it my path and execution variables which need to be set?

If this is not the answer, is there something I can change in anypoint studio (which is the mulesoft IDE very similar to eclipse) to fix this?

Sorry I am new to this so if anything doesn't make sense, please let me know

Thanks

Yes, you need to update your JRE.

How you do it depends on what OS you use and how previous JRE was installed.

You are correct. The jar file was compiled using Java 11 so you need to have a Java 11 JRE or OpenJDK 11 to be able to execute it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM