Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'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!

like image 516
user3124306 Avatar asked Dec 20 '13 23:12

user3124306


1 Answers

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 -vmargs and after the OpenFile.

like image 148
user3807936 Avatar answered Oct 06 '22 00:10

user3807936