Failed to load the JNI shared Library (JDK)
When I try opening Eclipse, a pop-up dialog states:
Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`.
Following this, Eclipse force closes.
Here's a few points I'd like to make:
Downloading the 32-bit versions is something I only want to do as a very last resort.
What would be suggested to solve this issue?
You need a 64-bit trio:
Working pairings of OS, JDK and Eclipse:
I had several JDKs and JREs installed.
Each of them had their own entry in the PATH variable, all was working more or less.
Judging from the PATH variables, some installations were completely useless, since they were never used. Of course, the "inactive" Javas could be referenced manually from within Eclipse if I needed, but I never did that, so I really did not need them. (At least I thought so at that time...)
I cleaned up the mess, deinstalled all current Java's, installed only JDK + JRE 1.7 64-bit.
One of the Eclipse 'installations' failed afterwards with the Failed to Load the JNI shared Library
and a given path relative to the fresh installed JDK where it thought the jvm.dll
to be.
The failing Eclipse was the only one of all my IDEs that was still a 32-bit version on my otherwise all-64-bit setup.
Adding VM arguments, like so often mentioned, in the eclipse.ini
was no use in my case (because I had only the wrong JDK/JRE to relate to.)
I was also unable to find out how to check if this Eclipse was a 32-bit or 64-bit version (I could not look it up in the Task Manager, since this Eclipse 'installation' would not start up. And since it had been a while since I had set it up, I could not remember its version either.)
In case you use a newer JDK and a older JRE you might be in for trouble, too, but then it is more likely a java.lang.UnsupportedClassVersionError
appears, IIRC.
Make sure your eclipse.ini file includes the following lines.
-vm
C:pathto64bitjavabinjavaw.exe
My eclipse.ini for example:
-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 FilesJavajdk1.6.0_32binjavaw.exe
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Use OS and Eclipse both 64 bit or both 32 bit keep same and config eclipse.ini .
Your eclipse.ini file can be found in your eclipse folder.
链接地址: http://www.djcxy.com/p/37568.html下一篇: 无法加载JNI共享库(JDK)