Eclipse: Failed to load the JNI shared library "C:\Program Files(x86)\Java\jdk1.7.0_15\bin\..\jre\bin\client\jvm.dll

60,036

Solution 1

jdk-7u15-windows-i586.exe is not 64bit.

Reinstall Java 7 for 64 bits.

Solution 2

If you have 64bit java installed (you are running 64bit windows and you have c:\program files\java\jre7 for example - not program files (x86)!) but you still get this error, it is likely that the first java on your path is 32bit.

(You can check this by running java -version from cmd.exe, if you don't see the text 64-bit [eg Java HotSpot(TM) 64-Bit] then you have 32bit java first on your path.)

If you have many copies of eclipse (perhaps for blackberry 7 development) then changing your path(s) to point to the 64bit java could cause you big headaches.

Instead, you can edit the eclipse.ini file (in the eclipse directory of the Android SDK) and add the following lines:

-vm
C:\Program Files\Java\jre7\bin\javaw.exe

Below they are shown in the context of the whole file:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v22.2.1-833290

This instructs eclipse.exe where it can find the java VM, without relying on the system environment variables.

Solution 3

It worked for me too, I had installed 32-bit JDK on my 64-bit OS, now I updated my JDK with 64-bit.. got the issue resolved like charm..

I learnt that 32-bit JDK will still work fine on a 64-bit OS without any issue, until you install an application of 64-bit..

Solution 4

In addition to installing a 64-bit JVM, you may also need to modify your system path in order to override whatever JVM is pointed from Windows\System32. Just reference in the path the \bin directory of your JVM instalation before Windows\System32.

Share:
60,036
Alfred Bowley
Author by

Alfred Bowley

Updated on July 12, 2022

Comments

  • Alfred Bowley
    Alfred Bowley almost 2 years

    I'm trying to install Eclipse. I have done the following in order to install.

    • Installed JDK 7u15 64 bit (actual download name:jdk-7u15-windows-i586.exe) in C:\Program Files(x86)\Java\JDK 1.7.0_15

    • I Ran cmd in administrator and typed "C:\Users\Alfred>java -version" which gave me "Java version "1.7.0_15" java(TM) SE Runtime Enviroment (build 1.7.0_15-b03) Java Hotspot(TM) Client VM (build 23.7-b01, mixed mode, sharing)

    • In the same cmd window i typed "C:\Users\Alfred>javac -version" which gave me "javac 1.7.0_15"

    Both these last two points should mean my path is set to the right place correct?

    • I downloaded eclipse IDE for Java developers 64 bit (actual download name:eclipse-java-juno-SR1-win32-x86_64.zip) and unzipped it to my desktop

    • I've tripled checked that my system is 64 bit(Start>Control Panel>System>System type:64 bit operating system)

    • I've found and deleted java.exe and javaw.exe from C:\windows\system32 which resolved the error message "C:\Program Files\Java\jre7\lib\amd64\jvm.cfg'

    My problem as of now is the following error message when i try to start eclipse:

    • Failed to load the JNI shared library "C:\Program Files(x86)\Java\jdk1.7.0_15\bin..\jre\bin\client\jvm.dll

    I've made sure that this .dll file is there. I have looked around and everyone says to make sure everything is 64 bit. I have no clue what to do now. How I fix? Any and all help is greatly appreciated.

  • Alfred Bowley
    Alfred Bowley about 11 years
    ==============================
  • Alfred Bowley
    Alfred Bowley about 11 years
    I added the \bin directory before the windows\system32 and then again at the beginning of the path. Did not work. Thank you for suggesting though!
  • Alfred Bowley
    Alfred Bowley about 11 years
    You were completely right. God damn it. Thank you so much, this was driving me crazy.
  • Muhammad Umer
    Muhammad Umer about 10 years
    now why would that happen i followed direction correctly so how did i end up installing something that wasn't 64 bit hmmmmm
  • Wayne
    Wayne over 8 years
    Had to use this solution on my machine because Visual Studio SSDT is only available in 32bit and I use the 64bit Eclipse
  • Mike Warren
    Mike Warren over 8 years
    Where do I find download link, for Windows 7 OS?
  • FazoM
    FazoM over 8 years
    There is no difference between JDKs for different windows versions. There are only different versions for 32/64 bits. Download directly from Oracle site. Type: "java jdk" in google and use first results.