简体   繁体   中英

Launch4j-FakeMain compiled by more recent version Java Runtime(class file version 55 0)this Java Runtime only recognizes class file version up to 52 0

This is my first application that i try to execute exe. I'm using launch4j to do this. After executing and trying to run, I get this error:

Blockquote Launch4j - Exception in thread "main" java.lang.UnsupportedClassVersionError: FakeMain has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I searched something about versions of java, so I checked my versions of java and they are the same.

That's my versions of java: My versions of java in cmd

Maybe I did something wrong there? Screen of Launch4j

I don't know what I can do. I spend all this day about fix this and nothing.

Error after try to run exe file

You have compiled the code with Java 11 as target. But your PC want's to execute the Java Code with Version 8, which is not possible.

Make sure you have installed the correct Versions and also make sure that the executable uses Java 11.

Here you can find the Java Versions mapped to the Runtime Versions: Java Version Numbers

The Article gives you also some information about how to compile and execute for the correct versions.

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