站点图标 AI技术聚合

has been compiled by a more recent version of the Java Runtime (class file version 55.0)解决方法

Java项目编写完成后生成jar包,在cmd窗口运行时出现如下异常:Exception in thread “main” java.lang.UnsupportedClassVersionError: com/itbaizhan/travel/TravelApplication 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

造成以上异常的原因是:当前计算机环境的JDK 与 编写项目时打包的JDK版本不一致。而且一般旧版本的JDK环境无法运行新版本JDK生成的jar包,需要查看项目的JDK版本,然后在计算机环境变量中重新配置JAVA_HOME。

版权声明:本文为博主作者:油爆酥葱原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/hdjag/article/details/135630285

退出移动版