In system variables, set the 3 property Java_home, CLASSPATH, Path (case-insensitive), if it already exists then click "Edit", do not exist then click "New";
1. Java_home indicates the JDK installation path, which is the path e:/java/jdk1.6.0_20 selected at the time of installation, including Lib,bin,jre folder (this variable is the best
Settings, as it is necessary to run tomcat,eclipse later, etc.);
2, Path allows the system to identify the Java command under any path, here, to note that the path should be existing, do not create new, find path, click "Edit"
Add the following statement to the front of the value. If you overwrite the path variable, some basic commands will not be found under CMD.
%java_home%/bin;%java_home%/jre/bin;
“; %java_home%\bin;%java_home%\jre\bin ". Note the preceding semicolon.
3, Classpath is the Java load Class (or LIB) path, only the class in Classpath, the Java command can be recognized, set as:
.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar (to Add. Indicates the current path)
%java_home% is referring to the previously specified java_home;
Variable values are filled in ".; %java_home%\lib;%java_home%\lib\tools.jar ". Be careful not to forget the former
The dot and middle semicolon of the polygon.
4, check the installation configuration is correct
Click "Start", type "cmd", enter java-version after the car, press ENTER to display the installed JDK version information
Note: JDK can be installed on other disks, JDK installation and Eclipse installation path can be independent, they are completely independent.