简体   繁体   中英

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

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.

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!

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

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)

WHAT YOU HAVE TO DO :

Firstly check the "eclipse.ini" file to see if you have a path that is pointing to your 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

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

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

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

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

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

Work for me

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