Eclipse 报告“加载 JNI 共享库失败";

2022-01-25 00:00:00 java eclipse java-native-interface

我无法打开 Eclipse,因为我收到一条提示

I can't open Eclipse because I get an alert that says

无法加载 JNI 共享库 C:Program Files (x86)eclipsejreinclientjvm.dll

Failed to load JNI shared library C:Program Files (x86)eclipsejreinclientjvm.dll

我在 YouTube 上找到了一种解决方案,Eclipse Failed to load JNI library修复.

I've found a kind of solution on YouTube, Eclipse Failed to load JNI library fix.

他说你只需要下载一个 JRE 7 文件夹.然后我只需要更换C:Program Files (x86)Javajre7inserverjvm.dllC:Program Files (x86)eclipsejreinclientjvm.dll.

He says that you only have to download a JRE 7 folder. Then I just have to replace C:Program Files (x86)Javajre7inserverjvm.dll with C:Program Files (x86)eclipsejreinclientjvm.dll.

但是 JRE 7 链接在哪里?

But where is the JRE 7 link?

推荐答案

首先,确保你的 Eclipse 和 JDK 版本匹配,要么都是 64 位,要么都是 32 位(不能混合匹配 32位与 64 位).

First, ensure that your version of Eclipse and JDK match, either both 64-bit or both 32-bit (you can't mix-and-match 32-bit with 64-bit).

其次,eclipse.ini 中的-vm 参数应该指向java 可执行文件.看http://wiki.eclipse.org/Eclipse.ini 示例.

Second, the -vm argument in eclipse.ini should point to the java executable. See http://wiki.eclipse.org/Eclipse.ini for examples.

如果您不确定所安装的 Eclipse 版本(64 位还是 32 位),您可以通过几种不同的方式来确定.请参阅 如何查找如果安装的 Eclipse 是 32 位还是 64 位版本?

If you're unsure of what version (64-bit or 32-bit) of Eclipse you have installed, you can determine that a few different ways. See How to find out if an installed Eclipse is 32 or 64 bit version?

相关文章