mukesh
mukesh

Reputation: 21

Failed to load JNI shared library

When I am trying to start my STS editor, I received a message as pop-up window open and said that

Failed to load the JNI shared library "C:\Program Files\Java\jdk1.7.0\bin...\jre\bin\server\jvm.dll

Here i am posting my STS.ini below.

-vm
C:\Program Files\Java\jdk1.7.0_21\bin
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
com.springsource.sts.ide
–launcher.defaultAction
openFile
–launcher.XXMaxPermSize
384M
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xmn128m
-Xms256m
-Xmx768m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=1000
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods

Upvotes: 2

Views: 24770

Answers (3)

Prajna
Prajna

Reputation: 11

Upgrade the jdk version to 1.8 or above. It works

Upvotes: 0

Mehedi hasan
Mehedi hasan

Reputation: 111

I am using Windows 7 64bit and my eclipse was 32 bit. i face the problem showing this message when want to open my eclipse

Failed to load the JNI shared library "C:\Program Files\Java\jdk1.7.0\bin...\jre\bin\server\jvm.dll

now i install 32bit JVM from below link and install it.

http://www.java.com/en/download/manual.jsp

Then i just set PATH from Environment variables

C:\Program Files (x86)\Java\jre1.8.0_25\bin

Now it's work for me!!!

Upvotes: 6

Taoufik Mohdit
Taoufik Mohdit

Reputation: 1931

The -vm option must specify the full absolute or relative path to the Java executable, not just to the Java home directory. In Windows that would be:

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

Also I would move the -vm option to be immediately before the -vmargs option:

...
–launcher.XXMaxPermSize
384M
-vm
C:\Program Files\Java\jdk1.7.0_21\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
...

More details can be found here: http://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM

Upvotes: 3

Related Questions