[java] Eclipse reported "Failed to load JNI shared library"

I can't open Eclipse because I get an alert that says

Failed to load JNI shared library C:\Program Files (x86)\eclipse\jre\bin\client\jvm.dll

I've found a kind of solution on YouTube, Eclipse Failed to load JNI library fix.

He says that you only have to download a JRE 7 folder. Then I just have to replace C:\Program Files (x86)\Java\jre7\bin\server\jvm.dll with C:\Program Files (x86)\eclipse\jre\bin\client\jvm.dll.

But where is the JRE 7 link?

This question is related to java eclipse java-native-interface

The answer is


JRE 7 is probably installed in Program Files\Java and NOT Program Files(x86)\Java.


Yep, in Windows 7 64 bit you have C:\Program Files and C:\Program Files (x86). You can find Java folders in both of them, but you must add C:\Program Files\Java\jre7\bin to environment variable PATH.


First, ensure that your version of Eclipse and JDK match, either both 64-bit or both 32-bit (you can't mix-and-match 32-bit with 64-bit).

Second, the -vm argument in eclipse.ini should point to the java executable. See http://wiki.eclipse.org/Eclipse.ini for examples.

If you're unsure of what version (64-bit or 32-bit) of Eclipse you have installed, you can determine that a few different ways. See How to find out if an installed Eclipse is 32 or 64 bit version?


Installing a 64-bit version of Java will solve the issue. Go to page Java Downloads for All Operating Systems

This is a problem due to the incompatibility of the Java version and the Eclipse version both should be 64 bit if you are using a 64-bit system.


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to java-native-interface

A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1 JNI and Gradle in Android Studio how to make jni.h be found? Eclipse reported "Failed to load JNI shared library" Can't load IA 32-bit .dll on a AMD 64-bit platform Failed to load the JNI shared Library (JDK) What is the native keyword in Java for? How to fix an UnsatisfiedLinkError (Can't find dependent libraries) in a JNI project Calling a java method from c++ in Android Converting from signed char to unsigned char and back again?