I downloaded the latest version of Eclipse, but I can not start it.

The error message I get is:

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

How do I fix this?

I use 64-bit Windows, 32-bit JDK, and downloaded 64-bit Eclipse.

  • That's strange. The jvm.dll should be in C:\Program Files (x86)\Java\jdk1.6.0_20\jre\bin\client\jvm.dll, not in C:\Program Files (x86)\Java\jdk1.6.0_20\bin\... – AndrejaKo Sep 8 '10 at 9:17

11 Answers 11


This usually happens if you have a 32- vs. 64-bit mismatch between the installed JDK and Eclipse versions!

Your version of Eclipse is trying to access a 32-bit JDK (as indicated by C:\Program Files (x86)), but either fails because Eclipse is expecting a 64-bit JDK or because the 32-bit JDK is missing - consequently you'll need to make sure to match the Eclipse and JDK versions bit wise accordingly.

  • I use 64 bit Windows, 32 bit JDK, and downloaded 64 bit Eclipse. Now with 32 bit Eclipse it works better, thanks. – Jonas Sep 8 '10 at 16:54
  • @Jonas - I removed the erroneous assumptions about the installed versions, thanks for pointing this out by specifying your setup. – Steffen Opel Sep 8 '10 at 17:32

I had installed both JDK and Eclipse 64-bit versions, but had the same issue...

Finally I discovered that my %PATH% system variable didn't include the folder. Don't forget to change it to the correct folder where your JDK\bin is installed. Worked for me.

C:/Program Files/Java/jdk1.6.0_32/jre/bin

use eclipse and os both 64 bit or both 32 bit


On Windows 7 you have the chance to use symbolic links as under unix.

So with cmd (run as an admin), run the following: mklink /d jdk jdk-versionnr-etc you don't need to update your path, JAVA_JOME the next time you update Java !


I had a 64 bit Eclipse and 32 bit Java and had the same issue. After installing 64 bit Java and updating system path, no issues.


If you have downloaded 64-bit Eclipse and a 64-bit JDK/JRE, check the availablity of javaw.exe for 64-bit.

In my case it was in C:\Program Files\Java\jre6\bin

I have extracted Eclipse to the c:\eclipse folder; within that the eclipse.ini file is available. Replace the contents of that file with the following:

C:\Program Files\Java\jre6\bin\javaw.exe

Leave the new line in between the -vm flag and the value. It worked for me.

  • Thanks. All I did was copy the line" -vm C:\Program Files\Java\jre6\bin\javaw.exe" I left everything else the same. – Stopher87 Aug 4 '11 at 15:01

I was facing same issue even though I had 64-bit versions of both JDK and Eclipse. I found out that the JDK path was missing in eclipse.ini.

So I added following lines in eclipse.ini file:

C:\Program Files\Java\jdk1.7.0_45\jre\bin <this might be different on your machine>

This solved the problem! :-)


If eclipse is 64 bit , update Java in Path to C:\Program Files\Java\jre7

or else

check the Java location being referred by eclipse and copy the content C:\Program Files\Java\jre7 to eclipse jre location.

Reference - http://www.buggybread.com/2013/01/failed-to-load-jni-shared-library.html


1.Uninstall available jdk7.1 (It was 64 bit) 2. Downloaded and installed jdk7.1 32 bit. The jvm.dll will be in the follwing path: "C:\Program Files (x86)\Java\jdk1.7.0_75\jre\bin\client"

Hope it works.


To elaborate on Steffen Opel's answer the mismatch occurs between the JVM specified in eclipse.ini file and the JVM encountered and launched as a result of the entries on your Windows path environment variable. So to fix the issue, ensure they both refer to the same JVM.

To fix this issue follow these steps:

1. Amend Eclipse Configuration So It Launches with Desired Version of JVM
Open eclipse.ini and change the line below to the java version you wish to use eg:


2. Ensure Eclipse Can Access the JVM It Requires
Goto Control Panel --> Edit System Environment Variables --> Path.
    a) Make sure an entry exists here to your java
    b) Make sure this entry sits higher (or earlier) than any other java paths within your @path entry.

Hopefully that should fix the problem for you.


Although this is an old question, I thought to add some more relevant info to the Accepted answer given by @Steffen Opel.

It is possible to install any number of versions of 32-bit JDKs and 64-bit JDKs in a 64-bit Windows OS. Also it is possible to install 32-bit Eclipse and 64-bit Eclipse in the same computer as well. But to run one of those platform related Eclipse (in OPs case 64-bit Eclipse) version, the machine should have matching “Environment Variables” configured for JDK. This can be done (should be done) without modifying eclipse.ini file.

Environment Variables

To run java without giving full path it is required to add file location for java.exe to PATH environment variable. And also for some other third party utilities, JAVA_HOME environment variable is required as well.

Normally java developers always need to have JDK installed (JRE is included in JDK). And PATH is set to “bin” folder under JDK installation folder (in OPs case C:\Program Files\Java\jdk1.6.0_40\bin) while JAVA_HOME is set to JDK installation folder (in OPs case C:\Program Files\Java\jdk1.6.0_40).

Here OP has only got 32-bit JDK but trying to use 64-bit Eclipse. So to fix the issue OP need to install 64-bit JDK. And change JAVA_HOME & PATHEnvironment Variables” to match that installation location.

Here is the more complete steps:

  • Download and install 64-bit JDKx.x.x_xx
  • Then open Windows Explorer, right click on Computer icon and select

    Properties -> Advanced system settings.
    It will open up System Properties window, and in “Advanced” tab select “Environment Variables” to open up editing window.

  • Under the System variable section look for JAVA_HOME variable name and click “Edit” button at the bottom section, if not available click “New” and enter C:\Program Files\Java\jdk1.6.0_40 and click OK.

  • Then select the PATH variable and click “Edit” and append %JAVA_HOME%\bin; to the front or %JAVA_HOME%\bin to the end of the existing string. DO NOT over write the existing string, and click OK -> OK ->OK to complete.

Now Eclipse will be open without the error.


  • If someone needs to use 32-bit Eclipse then default JDK path will be C:\ Program Files (x86) \Java\jdkx.x.x_xx

  • When changing PATH Environment variables in Windows 10 there is an additional window will comes up as shown in picture below.

enter image description here

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.