Eclipse failed to Load after installing new JRE.

Sometime as a developer you may change your setting/JRE or JDK for testing and then other Java tools like Eclipse stop working. For example:

Failed to load the JNI shared library “c:\Program Files (x86)\Java\jre7\client\jvm.dll

If Eclipse was working and then all of a sudden it stops, it can be the JRE version, the path order or simply a conflict between version etc.

Looking at my Java version for JRE7 I find

C:\Users\Steve Robinson>java -d64 -version

Error: This Java instance does not support a 64-bit JVM.

Please install the desired version.

We can clearly see that the JRE that was last installed has set the Java Path to a 32 bit version.

What we can do is downloading and install a 64 bit version. Also what we can also do is tell my 64Bit Eclipse version by adding a -vm parameter to eclipse.ini, but using the reference below we may have to use thr JRE or JDK.

vm value: Windows Example

This is how the -vm argument might look on Windows (your exact path to javaw.exe could be different, of course):



This might not work on all systems. If you encounter “Java was started but returned exit code=1” error while starting the eclipse, modify the
-vm argument to point to jvm.dll (exact path could be different):



Using the eclipse.ini is best as it can override any confusion in your paths as required for other apps/tools.

Here is an example of an eclipse.ini specifying my location of a 64bit JDK


















C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll







Leave a Reply