The following is a description of the Java environment variable configuration, which is the configuration of the JDK environment variable under windows 7.
Method/Step
- 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 on "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", not exist then click "New": Java_home indicates the JDK installation path , Just the path you chose when you installed C:\Program files\java\jdk1.6.0_21
- 5
The path entry adds:;%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 be added . Represents the current path)
- 7
" Start"->; " Run, type "cmd", type the command "Javac", and the following screen appears, indicating that the environment variable is configured successfully
The above is the basic configuration information
Configuring JDK environment Variables and Java environment variable configurations under Windows 7