Error: A JNI error has occurred, please check your installation and try again
3 Exception in thread "main" java.lang.UnsupportedClassVersionError: AutoSend 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
4 at java.lang.ClassLoader.defineClass1(Native Method)
5 at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
6 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
7 at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
8 at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
9 at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
10 at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
11 at java.security.AccessController.doPrivileged(Native Method)
12 at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
13 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
14 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
15 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
16 at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
[root@localhost auto]# nohup java -jar AutoSend.jar >/auto/autosend.out 2>&1 &
- 我的故事:我一直用的JDK1.8 , 服务器也是1.8 , 所以一直没有问题 .
- 然后今天用idea打包了一个jar包...idea自带的jdk11 . 所以服务器低版本的jdk不认识高版本jdk编译出来的东西...
- 解决办法:把idea中jdk改回1.8