导入项目运行报错
java.lang.UnsupportedClassVersionError: xxxx has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0
解决方案
-
选中项目右键properties,选择下图 “Java Build Path”,在libraries栏选中编辑jdk
-
编辑jdk版本,可以选择本地也可以选择eclipse自带的,只要和项目版本一致即可。
其他快捷方式
直接右键文件夹项目文件夹下的jre库,选择build path,然后和上图步骤相同。
相较而言,选择properties,里面很多项目配置相关的设置,抽空看一下有哪些设置,下次就不用一报错就去网上搜索啦,file下也有properties,那里是全局配置,里面内容大同小异