简体   繁体   中英

Eclipse: -Failed to load the JNI shared library-

I know that this question has been asked countless times, but I have no idea what I'm doing, and need some help. Just... help me This is what I get when I run eclipse:

Failed to load the JNI shared library "C:\\Program Files\\Java\\jre7\\bin\\client\\jvm.dll".

And this is what's in my eclipse.ini:

-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.v20130807-1835 -product org.eclipse.epp.package.standard.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile --launcher.appendVmargs -vm C:\\Program Files\\Java\\jre6\\bin\\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m

I'm guessing it has something to do with the ini or me being stupid, but I would really appreciate some help! None of the other solutions I've tried have worked for me.

Thanks in advance!

In looking at path that it is looking for the JNI shared library, and the eclipse.ini, the JNI is complaining that it's not in the java/jre7, but your ini is using javaw.exe from java/jre6. Did you validate both of these paths? another thing would be to get them both using the same thing.

Also from my other comment, are you using the same trio of OS, Eclipse, and Java. You want to make sure that all three are the same, being on 64bit you can still use 32bit Eclipse & Java though.

Working pairs of OS, JDK and Eclipse


32-bit

  • 32-bit OS
  • 32-bit JDK
  • 32-bit Eclipse

OR

  • 64-bit OS
  • 32-bit JDK
  • 32-bit Eclipse

64-bit

  • 64-bit OS
  • 64-bit JDK
  • 64-bit Eclipse

Download the proper JDK

Make sure that you have downloaded the proper JDKs and JREs

Download the Java SE JDK 8


Editing eclipse.ini

If this is not the problem or it still fails, make sure to edit your eclipse.ini

Make sure you add:

-vm
-C:\Your\Path\To\Java\JDK\bin

after

org.eclipse.platform

For instance, my eclipse.ini is like this:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.8.0_11\bin
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

Your eclipse.ini seems fine, but I just put mine up just in case. I had the exact same problem and it took me a couple of hours to figure it out.

I hope I was able to help you.

I had the same problem: in my case everything was in fact 64-bit - 64-bit OS, 64-bit Eclipse and 64-bit JRE in use, so there was some confusion as to the origins of the issue...

What helped was correcting environmental variables JAVA_HOME and PATH - and pointing them directly to

.../My/Java/Location/bin

instead of

.../My/Java/Location

So it seems like in you case the line specifying Java version in your eclipse.ini file should be:

-vm
C:\Program Files\Java\jre6\bin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM