提示编译时的版本和运行时的不一致。
jdk什么版本。
确实要坚持一下jdk版本
你javac 版本和 java 版本不一致,检查下环境变量吧
UnsupportedClassVersionError官方介绍:
Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.
当虚拟机尝试去读取某个类的字节码文件时,该错误决定当前主版本与次版本号是否支持当前字符码文件的读取!根据你的异常中可以看到:This version of The Java Runtime only recognize class file version up to 52.0。
也就是说当前 JR 只能识别最高版本号 52.0 的字节码文件。
解决方案:降低 JDK 版本号,可参见https://blog.csdn.net/weixin_44894962/article/details/105920550