132
votes

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

Failed to load JNI shared library C:\Program Files (x86)\eclipse\jre\bin\client\jvm.dll

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

He says that you only have to download a JRE 7 folder. Then I just have to replace C:\Program Files (x86)\Java\jre7\bin\server\jvm.dll with C:\Program Files (x86)\eclipse\jre\bin\client\jvm.dll.

But where is the JRE 7 link?

4
Dont forget to delete the %temp% folder as well. - Anushree Acharjee
Probably it's happening because of jre and eclipse version (32/64 bit) mismatch. Go to configuration folder of eclipse setup and see log files for exact reason. - Sohan Badaya
check your path environment variable that you include 32 bit jdk - Deniz
Eclipse seems to depend on the PATH in Windows, and I had an Spss one first and "C:\ProgramData\Oracle\Java\javapath" was missing. - js2010

4 Answers

196
votes

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).

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

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?

66
votes

Installing a 64-bit version of Java will solve the issue. Go to page Java Downloads for All Operating Systems

This is a problem due to the incompatibility of the Java version and the Eclipse version both should be 64 bit if you are using a 64-bit system.

19
votes

Yep, in Windows 7 64 bit you have C:\Program Files and C:\Program Files (x86). You can find Java folders in both of them, but you must add C:\Program Files\Java\jre7\bin to environment variable PATH.

10
votes

JRE 7 is probably installed in Program Files\Java and NOT Program Files(x86)\Java.