The example of this article for everyone to share the Java environment variable setting method for everyone to refer to, the specific content as follows
After installing the JDK, find My Computer (right) --" properties --" Advanced tab --" environment variables , which have administrator user variables, there are system variables. Choose which one does not matter, I chose the administrator of the user variable is the user variable, click "New", the following is required to fill in the three environment variables, the form is the environment name = Environment Value , in turn, fill in can:
java_home=c:\j2sdk1.5.0 (JDK installation folder location)
Classpath=.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; (.;;; Must not be less because it represents the current path)
Path=%java_home%\bin
You can then write a simple Java program to test whether the JDK has been installed successfully:
public class test{public
static void Main (String args[]) {
System.out.println ("This is the Test program.");
}
}
Save the above program as a file with a file name of Test.java.
Then open the Command Prompt window, the CD to your Test.java directory, and then type the following command:
Javac Test.java
Java Test
At this point, if you see the print this are a test program. If the installation is successful, if you do not print out this sentence, you need to carefully check the configuration.
The above is the Java environment variable configuration of the entire content, I hope to help you learn, but also hope that we support the cloud habitat community.