当我尝试打开Eclipse时,弹出对话框显示:

加载JNI共享库“C:/JDK/bin/client/jvm.dll”失败。

在此之后,Eclipse部队关闭。

以下是我想说的几点:

我查了下那条路径上有没有东西。它确实存在。 我的Eclipse和Java SE Development Kit都是64位的。我检查了我的系统,它可以处理64位。 我在谷歌和Stack Overflow上搜索过这个问题,我找到的唯一答案是下载32位版本的JDK和Eclipse。

下载32位版本是我想做的最后一件事。 如何解决这个问题?


当前回答

你应该卸载所有旧的[JREs][1],然后安装最新的…我也遇到过同样的问题,现在我解决了。我:

最好安装Jre 6 32位。真的有效果!

其他回答

上面的答案让我很感兴趣,所以我决定演练一下OS、Eclipse和JVM三人组的所有可能组合。无论如何,无论谁正在深入研究和阅读我的帖子,检查以下作为一个热点(我是Windows 7用户)。

You understand Program Files and Program File (x86) are two different folders... x86 stands for the 32-bit version of programs and the former is the 64-bit version. If you have multiple versions of Java installed with different bitness and release versions, which is bound to happen with so many open source IDEs, managers, administrative consoles, the best option is to set the VM argument directly in the eclipse.ini file. If you don't, Eclipse will go crazy and try searching itself which is not good.

如果你使用整个64位三人组,它仍然不能工作(我在Intellij Idea中启动Android Monitor时遇到了这个问题),可能是错误的jvm.dll被使用,而不是你的java所期望的。只需遵循以下步骤:

在JRE目录下找到jvm.dll: C:\Program Files\Java\jre7\server\bin\jvm.dll 在JDK目录下找到jvm.dll: c:\Program Files\Java\ jdk1.7.0_xx \ jre \ bin \ server \ 将JRE目录中的jvm.dll复制到JDK目录中,并覆盖JDK中的jvm.dll。

别忘了做备份,以防万一。不需要安装或卸载任何与Java相关的东西。

确保您的eclipse.ini文件包含以下几行。

-vm
C:\path\to\64bit\java\bin\javaw.exe

以eclipse.ini为例:

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.6.0_32\bin\javaw.exe
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

使用64位或32位的操作系统和Eclipse保持一致,并配置Eclipse .ini。

您的eclipse.ini文件可以在eclipse文件夹中找到。

安装JDK 1.8。_91(混合模式)是另一个解决方案!

在Eclipse的下载页面上,应该写“JRE 32位”或“JRE 64位”,而不是“Windows 32位”或“Windows 64位”。

请确保使用与您的JDE兼容的正确版本,如前所述。