【发布时间】:2021-02-10 10:28:19
【问题描述】:
我想在终端运行eclipse分发的jar文件。
我是这样在终端输入命令的。
java -jar test.jar
然后发生了错误。
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError:
project01/test01 has been compiled by a more recent version of the
Java Runtime (class file version 59.0), this version of the Java
Runtime only recognizes class file versions up to 52.0
错误说我的 Java 类版本是 59,但我安装了 jdk1.8.0_281.jdk
那我就看不懂错误了,因为我的版本是52。
有解决办法吗?
我正在使用 macOS。
【问题讨论】: