【异常】has been compiled by a more recent version of the Java Runtime (class file version 55.0)

1. Problem description

Use the global JDK environment to run the project, the tips are as follows:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/logic/ids/IdsApplication 
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

insert image description here

2. Problem analysis

insert image description here
Just remembered that the JDK version of this project is 11 because the class was compiled in a higher Java version than the one trying to run it

More specifically, in this case, the class was compiled with Java 11, and I tried to run it with Java 8.
insert image description here

Guess you like

Origin blog.csdn.net/wstever/article/details/128492151