25

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

10 Answers 10

30

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
3

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.

2
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:/Program Files/Java/jdk1.6.0_32/jre/bin
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

use eclipse and os both 64 bit or both 32 bit

1

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 !

1

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.

1

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:

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmx700m
-XX:MaxPermSize=690M

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
0

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:

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

This solved the problem! :-)

0

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

0

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.

0

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:

-Dosgi.requiredJavaVersion=1.5

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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