'未能加载 JNI 共享库 "C:\Program Files\Java\jre7\bin\client\jvm.dll" '

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20713592/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 03:46:06  来源:igfitidea点击:

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

javaeclipsedlljava-native-interfaceshared-libraries

提问by user3124306

I have looked for a solution, but all the ones I found didn't work.

我一直在寻找解决方案,但我发现的所有解决方案都不起作用。

  • I have triple checked that I have both 64 bit JRE/JDK and Eclipse
  • I have added the '-vm' argument to the eclipse.ini file.
  • 我已经三重检查我有 64 位 JRE/JDK 和 Eclipse
  • 我已将“-vm”参数添加到 eclipse.ini 文件中。

Here's the file content:

这是文件内容:

 -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.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\jdk1.7.0_45\bin\javaw.exe
 -vmargs
 -Dosgi.requiredJavaVersion=1.6
 -Xms40m
 -Xmx512m

EDIT: It works now, the vm argument was pointed to the wrong file!

编辑:现在可以使用了,vm 参数指向了错误的文件!

采纳答案by user3807936

If you have updated your jdk to 7 you are most likely to face this problem.

如果您已将 jdk 更新为 7,您很可能会遇到此问题。

This happens mainly due to

发生这种情况主要是由于

  1. Incompatible sdk and jdk versions
  2. Using a 32 bit java version for your 64 bit eclipse JVM (programfilex86-java)
  1. 不兼容的 sdk 和 jdk 版本
  2. 为 64 位 Eclipse JVM 使用 32 位 java 版本(programfilex86-java)

WHAT YOU HAVE TO DO :

你必须做的:

Firstly check the "eclipse.ini" file to see if you have a path that is pointing to your JDK

首先检查“eclipse.ini”文件以查看是否有指向JDK的路径

It should look something like this

它应该看起来像这样

-vm    
C:\Program Files\Java\blah\blah\blah\javaw.exe  

if not then locate the jdk 7 javaw.exe file
sample : C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe

如果没有,则找到 jdk 7 javaw.exe 文件
示例:C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe

Paste -vmand the path below it into your eclipse.ini file

-vm将其下方的路径粘贴到您的 eclipse.ini 文件中

-vm    
C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe  

Make sure that you type the above just before the -vmargs and after the OpenFile.

确保在-vmargs之前和之后键入上述内容OpenFile

回答by Adit Ya

just check for all classpaths, etc. Have only one isntance of your JAVA_HOME and set the path to %JAVA_HOME%/bin and remove any occurances of 'jre' from 'classpaths', etc. It should start working !!

只需检查所有类路径等。只有一个你的 JAVA_HOME 路径并将路径设置为 %JAVA_HOME%/bin 并从“类路径”中删除任何出现的“jre”等。它应该开始工作!

回答by Imran Ali

-vm C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe

-vm C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe

Work for me

为我工作