JAVA Environment Building
1, install the JDK, the installation process can customize the installation directory and other information, such as we choose to install directory: C:\Program files\java\jdk1.6.0_21
2. When the installation is complete, right-click on "My Computer" and click "Properties".
3, click "Advanced System Settings" and click "Environment variables".
4, in "System Variables", set 3 properties,java_home,PATH,CLASSPATH(case does not matter), if already exist then click "Edit", do not exist then click "New": Java_ Home indicates the JDK installation path, which is the path you chose when you just installed it for example: C:\Program files\java\jdk1.6.0_21
Added under 5,path:;%java_home%\bin; %java_home%\jre\bin, notice that the front is separated by semicolons.
6, in the Classpath entry add:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar (to Add. Indicates the current path), if not present, click New.
7, "Start"->; " Run, type "cmd", type the command "Javac", and the following screen appears, stating that the environment variable is configured successfully.
Java Environment Building