Set Java_home:
One is to facilitate the reference, for example, the JDK installed in the C:\jdk1.6.0 directory, then set Java_home as the directory path, then to use this path later, just enter%java_home%, to avoid each reference to enter a long path string;
The second is a principle, when the JDK path changes, only need to change the value of the java_home variable, otherwise, it is necessary to change any of the absolute path references to the JDK directory document, if there is no change, a program can not find the JDK, the consequences are imagined----system crashes!
Thirdly, third-party software will refer to the agreed-upon java_home variable, otherwise you cannot use the software normally.
New Java_home (Java_home points to the JDK's installation path) in the System environment variable column
Path variable
The path variable allows us to run Java applications anywhere in the system, such as Javac, Java, Javah, and so on, to find the directory where we install the JDK,
Assuming that our JDK is installed in the C:\jdk1.6.0 directory, then in the C:\jdk1.6.0\bin directory is our common Java application, we need to add C:\jdk1.6.0\bin this directory into the PATH environment variable.
Classpath variable
The CLASSPATH environment variable is when we need to refer to a class that someone else has written when developing a Java program, let the Java interpreter know where to look for the class. In general, Sun provides us with some extra rich class packages, one is Dt.jar, the other is Tools.jar, and these two jar packages are located in the C:\jdk1.6.0\lib directory, so we usually add these two jar packages to our CLASSPATH environment variable. Set classpath=.; C:\jdk1.6.0\lib\tools.jar; C:\jdk1.6.0\lib\dt.jar.
Note When you finish configuring the environment variable, type the command when you test whether the JDK is installed successfully: Java-version
Java environment variable Configuration