Build a Java development environment and a Java Development Environment
I. preparations:
On the desktop, right-click my computer, click Properties in the dialog box, click Advanced System settings in the upper right corner of the window, and click environment variables in the lower left corner of the window to set, 1, Figure 2, figure 3.
Figure 1 Figure 2
Figure 3
Ii. Set Environment Variables
First, we need to configure three environment variables: JAVA_HOME, CLASSPATH, and Path.
1. variable name input: JAVA_HOME, variable value input: D: \ Java \ jdk1.8.0 _ 05 click OK.
Special note: The input value of the variable value is your jdk installation directory. For example, my jdk is installed in jdk 1.8.0 _ 05 under the Java folder of drive D, and my variable value is D: \ Java \ jdk1.8.0 _ 05
2. click the new button, and enter the variable name: CLASSPATH variable value input :.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar, and click OK.
Special note: When configuring CLASSPATH, the variable value is followed by the percentage sign. Do not forget to add a semicolon to it ,!
3. note: (1 ). if you already have the path variable, you can find the path, double-click the path, and add the following value to the end of the variable value (if not at the end of the original value; add it by yourself; ).
(2) If no path variable exists, click the new button and enter the following values. Variable name input: path variable value input: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin click OK.
Iii. test whether the Java development environment is successfully set up
Enter java-version in cmd to check whether related configuration information exists. If yes, the configuration is successful!
Annotation: The Separator in the environment variable is semicolon (;).