When executing the jar package: Exception in thread “main” java.lang.UnsupportedClassVersionError

Article directory


error style

Exception in thread “main” java.lang.UnsupportedClassVersionError: net/army/boot/ProfileDemo01Application has been compiled by a more rece
nt 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

Solution
Set the local java version to be the same as IDEA's java version to
insert image description hereset the local java environment variable
insert image description here

Note: After resetting the environment variables locally, you need to restart the IDEA program for the environment to take effect.

insert image description here
Re-execute the jar package (successfully)
insert image description here

Guess you like

Origin blog.csdn.net/m0_62617719/article/details/130970547