Current configuration: Windows XP SP1, jdk1.4.2 _ 04, eclipse3.0.1
When JDK is installed, a JRE environment is installed in the system directory. At first, I uninstalled the JRE environment INSTALLED IN THE SYSTEM directory, added a java_home variable to the environment variable, and set the value to "F:/j2sdk" (JDK installation directory ), add "% java_home %/bin;" to the PATH variable ;". Start eclipse and you will find everything works. Click "window"> preferences> JAVA> installed JRE to find a JRE named "j2sdk. First, change the JDK installation directory name "F:/j2sdk" to "F:/noj2sdk" (either file name or delete "% java_home %/bin" in the PATH variable; "), and then start eclipse, you can find that eclipse cannot be started, and the following prompt appears: mainly that the Java Runtime Environment (JRE) is not found ). Because the eclipse directory does not contain the JRE directory, the correct Java W execution path cannot be found in the PATH variable. Therefore, eclipse cannot be started.
Three solutions to the problem:
1. in the MS-DOS window, switch to the eclipse directory and run eclipse-vm f:/noj2sdk/bin/javaw, you can start eclipse (the eclipse-VM Dir-location parameter can be used to specify other JRE .). 2. Copy the JRE directory under the F:/noj2sdk directory to the eclipse directory to start eclipse. 3. Change the "F:/noj2sdk" directory name to "F:/j2sdk" to start eclipse. The preceding three methods can be executed separately. If both methods are executed, by default, eclipse first executes the-VM parameter. If the-VM parameter is not found, it searches for the eclipse/JRE subdirectory. If no-VM parameter is found, eclipse looks for the Java Runtime Environment registered in the system.