简体   繁体   English

Eclipse:-无法加载JNI共享库-

[英]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: 只是...帮助我,这是我运行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: 这是我的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! 我猜这与ini或我的愚蠢有关,但我真的很感谢您的帮助! 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. 在查看要查找JNI共享库和eclipse.ini的路径时,JNI抱怨它不在java / jre7中,但是您的ini使用的是java / jre6中的javaw.exe。 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. 同样从我的其他评论来看,您是否使用OS,Eclipse和Java相同的三重奏。 You want to make sure that all three are the same, being on 64bit you can still use 32bit Eclipse & Java though. 您需要确保所有三个都相同,但是在64位上,您仍然可以使用32位Eclipse和Java。

Working pairs of OS, JDK and Eclipse OS,JDK和Eclipse的工作对


32-bit 32位

  • 32-bit OS 32位操作系统
  • 32-bit JDK 32位JDK
  • 32-bit Eclipse 32位Eclipse

OR 要么

  • 64-bit OS 64位操作系统
  • 32-bit JDK 32位JDK
  • 32-bit Eclipse 32位Eclipse

64-bit 64位

  • 64-bit OS 64位操作系统
  • 64-bit JDK 64位JDK
  • 64-bit Eclipse 64位Eclipse

Download the proper JDK 下载适当的JDK

Make sure that you have downloaded the proper JDKs and JREs 确保您已下载正确的JDK和JRE

Download the Java SE JDK 8 下载Java SE JDK 8


Editing eclipse.ini 编辑eclipse.ini

If this is not the problem or it still fails, make sure to edit your eclipse.ini 如果这不是问题或仍然失败,请确保编辑您的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: 例如,我的eclipse.ini是这样的:

-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. 您的eclipse.ini看起来不错,但我只是为了防万一。 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... 我遇到了同样的问题:就我而言,实际上所有东西都在使用64位-64位OS,64位Eclipse和64位JRE,因此问题的根源有些混乱...

What helped was correcting environmental variables JAVA_HOME and PATH - and pointing them directly to 帮助纠正环境变量JAVA_HOME和PATH并将它们直接指向

.../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: 因此,在您的情况下,似乎在eclipse.ini文件中指定Java版本的行应为:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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