报错信息
A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher 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 52.0
这个错误的意思是当时开发程序的人使用的JDK的版本要比你现在运行的环境上的JDK版本高。比如他是使用JDK11开发的,然后把程序打包好,你下载了他的jar包到本地运行,然后报错,可能你本地的JDK版本是低于11的,所以报错。
解决方法
安装JDK21就行。继续看文章下面的对应关系,就知道应该安装哪个版本。
下载地址
官网下载
https://www.oracle.com/java/technologies/downloads/
天翼云盘下载
https://cloud.189.cn/web/share?code=JVBJn2ymYru2(访问码:le55)