I want to previde another solution for this error, especially for who want to use 32-bit and 64-bit Eclipse in one system.
Eclipse will startup using the JRE/JDK in jre
sub-directory if it exists. (STS or other eclipse based IDE also support this feature...)
The solution is create directory junction using mklink.exe
command which exist in windows vista or newer version (junction.exe offer similar function for Windows 2000/XP)
Open the command line windows and exeute following command:
mklink /j "$ECLIPSE-HOME/jre" "$JDK_or_JRE_home"
Of course, if the Eclipse is for 64-bit Windows, the architecture of JDK/JRE
must be the same.
Assume:
Eclipse for windows x86_64
is installed in d:\devTool\eclipseJDK for windows x64
is installed in C:\Program Files\Java\jdk1.8.0The command for creating the jre
folder will be:
mklink /j "d:\devTool\eclipse\jre" "C:\Program Files\Java\jdk1.8.0"
BTW, delete directory junction will NOT delete any file. If you create a wrong link, you can delete it using file explorer or rmdir
command.
rmdir "d:\devTool\eclipse\jre"