132

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?

Community
  • 1
  • 1
Bocercus
  • 1,347
  • 2
  • 8
  • 3

4 Answers4

197

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?

Community
  • 1
  • 1
E-Riz
  • 28,616
  • 7
  • 83
  • 119
66

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Namila
  • 754
  • 4
  • 8
19

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
David
  • 191
  • 2
  • 1
    Moreover, you can have multiple versions of Java (on all platforms) and have forgotten, so make sure the system only sees one of them. I just go – Alex Aug 07 '12 at 14:20
10

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

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Ankit
  • 101
  • 2