I have one machine installed Eclipse 3.8, now I copy the installation folder to another machine, both of them have JDK and JRE installed, now Eclilpse can not startup with the following error message.

 eclipse can not startup

I checked the Environment variables, its strange that the JAVA_HOME is empty and Path variable don't contains any path point to JDK installation, but the JDK is installed by windows executable installer.

So I add the JRE path to Path varialbe in System property -> Advanced -> System variable

 
C:\Program Files\Java\jdk1.8.0_05\jre\bin
 

Now start it again, the Eclipse splash is displayed, but still failed with the error:

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

failed to start up jvm

This error caused by the 32 bit Eclipse and 64 bit JDK and JRE combo. The eclipse which copied from another machine which is 32bit system, and in current machine, system is 64 bit , also the installed JDK and JRE.

Now I have two choices: delete the 32 bit Eclipse and install the 64 bit version. Actually there also another way to go: you can also run 32bit JRE on 64 bit system. You just need to copy a 32 bit JRE to eclipse home directory, this is the first place the Eclipse try to locate jvm when start up. Obviously we should chose the second way.

For example I have 32bit JRE in d:\Java\jre7, now copy this folder to Eclipse's root directory and rename it to "jre". Now start eclipse.exe and it worked.

I suggest for each Eclipse installation, you should copy a right JRE to the root directory, and it will startup correctly where ever the Eclipse folder is copied to, you don't need to depend on the environment or deal with 32/64 bit conflict, the only exception is you can not run 64 bit Eclipse on 32 bit system.

This method also works when you get this error

 
java was started but returned exit code=13
 

This error happens when you run eclipse from cmd window. You should copy the jre folder and start eclipse by double clicking the executable.

Another way: run eclipse from command line

If you don't want to configure in Windows environment variables, you can start eclipse from Windows cmd, just make sure you can execute java -version in cmd.

Switch to folder of eclipse.exe, and execute it, it will use the JDK the java -version specified.