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

1、检查java version和javac -version版本是否一致,如果不一致,检查环境变量中,Path中jdk的路径是否在最前面,如果不在, 上移到最前面。

eclipse报错Error:A JNI error has occurred, please check your installation and try again_第1张图片

2、如果一致,检查项目-属性-java编译器是否为自己的就java版本。
右击项目 -> 选择properties -> 选择java compiler 设置版本为1.8

eclipse报错Error:A JNI error has occurred, please check your installation and try again_第2张图片

eclipse报错Error:A JNI error has occurred, please check your installation and try again_第3张图片 

再次编译运行项目就可以了  

 

你可能感兴趣的:(eclipse,java,ide)