【eclipse】Failed to load the JNI shared library

点击桌面eclipse时报错,如下图所示

【eclipse】Failed to load the JNI shared library

注 :JNI = Java Native Interface (Java本地接口)

有人说这种现象是JDK和eclipse位数不匹配造成的,但是我之前明明能用的啊。

查看eclipse位数

进入到eclipse的安装目录,找到eclipse.ini文件,用记事本打开

【eclipse】Failed to load the JNI shared library
说明是64位的eclipse

查看JDK位数

使用java -version命令

【eclipse】Failed to load the JNI shared library
输出的结果如果带有(64)就说明是64位的,没有就是32位的。
说明JDK是32位的

我太难了,又得重新配置。

打开当时配置JDK的PPT
【eclipse】Failed to load the JNI shared library
这个JDK是32位。。。。。。我裂开了!

【eclipse】Failed to load the JNI shared library

解决方法

https://www.oracle.com/technetwork/java/javase/downloads/index.html
到甲骨文官网下载Windows 64位的Java Development Kit

下载之后解压,在系统环境变量里修改JAVA_HOME

重新打开eclipse 。 OK,能用了
【eclipse】Failed to load the JNI shared library