Failed to load the JNI shared Library (JDK)

2018-12-31 08:56发布

When I try opening Eclipse, a pop-up dialog states:

Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`.

Following this, Eclipse force closes.

Here's a few points I'd like to make:

  • I checked to see if anything exists at that path. It does exist.
  • My Eclipse and Java SE Development Kit are both 64-bit. I checked my system, and it can handle 64-bit.
  • I've searched for this problem on Google and on Stack Overflow, and the only answer I found was to download the 32-bit versions of JDK and Eclipse.

Downloading the 32-bit versions is something I only want to do as a very last resort.
What would be suggested to solve this issue?

30条回答
千与千寻千般痛.
2楼-- · 2018-12-31 09:10

It is crucial to add the -vm parameter and its value on 2 lines AT THE BEGINNING of the eclipse.ini

-vm C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe

查看更多
君临天下
3楼-- · 2018-12-31 09:11

You need a 64-bit trio:

  • 64-bit OS
  • 64-bit Java
  • 64-bit Eclipse
查看更多
只靠听说
4楼-- · 2018-12-31 09:11

You can solve that problem as many other replicated. You need that Eclipse and the JDK be 32-bits or both on 64-bits. The architecture of the OS doesn't matter while the others remains on the same type of arquitecture.

查看更多
孤独寂梦人
5楼-- · 2018-12-31 09:11

I had the same issue after upgrading from Java 6 to Java 7. After I removed Java 6 (64 bit) and reinstalled Java 7 (64 bit), Eclipse worked. :)

查看更多
永恒的永恒
6楼-- · 2018-12-31 09:11

You can install the 32-bit version of JDK on a 64-bit machine. See JDK 7 downloads.

查看更多
春风洒进眼中
7楼-- · 2018-12-31 09:11

I'm not sure why but I had the jre installed into my c:\windows directory and java.exe and javaw.exe inside my windows\system32 directory.

Obviously these directories were getting priority even AFTER adding the -vm flag to my eclipse.ini file.

Delete them from here fixed the issue for me.

查看更多
登录 后发表回答