Error: A JNI error has occurred, please check your installation and try again

has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0
错误信息:

原因:因为重新配置了别的版本的jdk、可能你的电脑中有不止一个版本的jdk。导致了编译环境和运行环境不一致

解决办法第一步:在项目的属性里设置jdk版本,方法是
右击项目-->properties-->java compiler --> Enable project specific settings -->将compiler compliance level设置为1.8,也就是与jvm一致的版本
此举有时候并不能解决问题......(这就很尴尬)

如果无法解决问题,那么就是你的项目运行环境出现了错误;那么就让我们来配置一下运行环境吧!

第一步:右击项目-->build path-->configure build path

第二步:选中Libraries 移除当前类库

第三步:导入新的类库

最关键的一步来了 ***一定要选择 Execution environment 并选择与你jdk相匹配的版本 本文用的是当下最稳定最适用的版本1.8

点击finish --> apply and close
设置完成

原文地址:https://www.cnblogs.com/mitoris/p/14091229.html