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

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

在此之后,Eclipse部队关闭。

以下是我想说的几点:

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

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


当前回答

确保您的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文件夹中找到。

其他回答

上面的答案让我很感兴趣,所以我决定演练一下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.

我经历过所有的Eclipse错误,这是其中之一。问题是Eclipse 64位版本。下载32位版本并启动它。

最简单的解决方案是在eclipse.ini中包含一个特定的JRE:

wiki.eclipse.org/Eclipse.ini

有了它,您几乎可以启动任何Eclipse版本

你需要一个64位的trio:

64位操作系统 64位Java 64位Eclipse

这是因为窗口路径的交互方式。32位JRE在64位版本之前列出。因为32位和64位版本的javaw.exe名称相同,所以它会尝试找到的第一个版本。更改Path environment变量的顺序,使64位版本在列表中的位置高于32位版本,这样它就能正常工作。