Eclipse wont start error “Failed to load JNI shared library”

Downloaded Eclipse and keep getting the “Failed to load JNI shared library” on startup / opening the application? Check out the solutions below.

Solutions:

  • This often occurs when the downloaded version of Eclipse is for Java EE and the installed Java Packages are Java SE not Java EE.
    i.e. “Eclipse IDE for Java Developers” vs “Eclipse IDE for Java EE Developers” make sure you have the correct Eclipse Package
  • Ensure that Java, Eclipse and the Operating System (OS) are all either 32bit or 64bit – you can’t mix and match
  • If the above are all fine with your system then try the below:

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.

  • If you still have no luck then edit the Eclipse.ini file and point it straight at your JVM

This solves the problem. I added the -vm C:\Program Files\Java\jdk1.6.0_32\bin\javaw.exe line to my eclipse.ini file and it started up just fine.

  • an alternative to the above is to specify the JVM in the application properties:

    Create a shortcut in Windows to the Eclipse.exe. Open the shortcut and change the target to:

    "C:\Program Files\eclipse\eclipse.exe" -vm "c:\Program Files\Java\jdk1.7.0_04\bin\javaw.exe"
    

    For your installation, make sure the locations point to the correct Eclipse installation directory and the correct javaw.exe installation directory.

    (The 64/32 bit versions of Eclipse and Java need to be the same, of course.)

Leave a Reply