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:22

On the download page of Eclipse, it should be written "JRE 32 bits" or "JRE 64 bits" and not "Windows 32 bits" or "Windows 64 bits".

Be sure to use the correct version compatible with your JDE, as answered previously.

查看更多
墨雨无痕
3楼-- · 2018-12-31 09:23

Thank you misterfrb, I realised that Eclipse was giving this error, because I had just installed Oracle 10g Developer suite, and it was looking for the jvm.dll file in the C:\DevSuiteHome_1 folder (I must have opted to install JDK again along with developer suite).

After removing the DevSuiteHome lines from the paths variable and adding the correction location for 64-bit jvm.dll (not sure if this was necessary, didn't try without), Eclipse worked again, and Developer suite still does too.

查看更多
一个人的天荒地老
4楼-- · 2018-12-31 09:24

Downloaded 64 bit JVM from site and installed it manually and updated the system path variable. That solved the issue.

  1. Default JVM is installed in my system was in "C:\Program Files
    (x86)\Java\jre7"
  2. Manually installed JVM got installed in "C:\Program Files\Java\jre7" and after updating this pate to system path variable it worked.
查看更多
伤终究还是伤i
5楼-- · 2018-12-31 09:26

For a missing jvm.dll file, we can provide the path of the dll file in eclipse.ini file as

-vm
C:\Progra~1\Java\jdk1.6.0_38\jre\bin\server\jvm.dll

Here it is important to remove any space in the path and the double quotes. It worked for me when i removed the quotes and space.

I hope it helps someone.

查看更多
闭嘴吧你
6楼-- · 2018-12-31 09:26

The same occurred to me. I had 64-bit Eclipse, but my JDK was 32-bit. So I installed the 64-bit version and it's OK right now.

查看更多
公子世无双
7楼-- · 2018-12-31 09:28

Another option is:

Create a shortcut to the Eclipse.exe. Open the shortcut and change the target to:

"C:\Program Files\eclipse\eclipse.exe" -vm "c:\Program Files\Java\jdk1.7.0_04\bin\javaw.exe"

For your installation, make sure the locations point to the correct Eclipse installation directory and the correct javaw.exe installation directory.

(The 64/32 bit versions of Eclipse and Java need to be the same, of course.)

查看更多
登录 后发表回答