0

Java 运行 Jar 报错 Unsupported major.minor version 52.0

will created at5 years ago view count: 2519

运行Jar,报错,错误信息:

Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) at java.net.URLClassLoader.access$100(URLClassLoader.java:64) at java.net.URLClassLoader$1.run(URLClassLoader.java:354) at java.net.URLClassLoader$1.run(URLClassLoader.java:348) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:347) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

report
回复
0
    J2SE 9 = 53
    J2SE 8 = 52
    J2SE 7 = 51
    J2SE 6.0 = 50
    J2SE 5.0 = 49
    JDK 1.4 = 48
    JDK 1.3 = 47
    JDK 1.2 = 46
    JDK 1.1 = 45

对应JDK版本, 说明你的Jar是用 java version 1.8 编译的。

解决方法: 升级JDK版本 或者 换到 低版本编译再运行。

5 years ago 回复

Recent search keywords