this version of the Java Runtime only recognizes class file versions up to 55.0 at ...
has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0at java.base/java.lang.ClassLoa
·
Java运行报错
报错信息:
Exception in thread "main" java.lang.UnsupportedClassVersionError: ###Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
报错原因:
编译版本和运行版本不一致,具体原因是编译版本高于运行版本
我的出错代码如下:
修改方法:遵循高运行低编译
- 将运行版本换成 jdk 17
- 将编译版本降低成 jdk 11
我选的是第二种方式,调整如下
将需要运行的子模块编译版本指定成 jdk 11
更多推荐
已为社区贡献3条内容
所有评论(0)