java.lang.UnsupportedClassVersionError: com/lvshitech/java51/TestJDK has been compiled by a more rec

标题:java.lang.UnsupportedClassVersionError: com/lvshitech/java51/TestJDK 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

The target is jdk11
insert image description hereand the actual running environment is 1.8, so the above error occurs,
the solution: make it consistent (both make it 1.8 or 11)
Note : If the above picture is the lower version 1.8, and the lower picture is the higher version 11, then Explain that the target is 1.8 [indicate that the specification used is 1.8], and the actual operating environment is 11, (because the higher version 11 is compatible with the lower version 1.8, so there will be no error)
insert image description hereinsert image description here

Guess you like

Origin blog.csdn.net/weixin_45986454/article/details/127164345