Win10 安 装 JDK system environment variable Win10 安 装 JDK system environment variable Win10 安 装 JDK system environment variable Win10 安 装 JDK system environment variable

1. First, select “This computer” and right-click properties, as shown in Figure 1-1-1; Open the control panel – All Control Panel items – System, as shown in Figure 1-1-2.

Figure 1-1-1 This computer – properties

Figure 1-1-2 Advanced system Settings

2. Click “Advanced System Settings” in FIG. 1-1-2, open system properties, and then click “Environment Variables”, as shown in FIG. 2-1-1:

Figure 2-1-1 System environment variables

3. After opening the system environment variables, set the following contents in the system variables:

  • Create the JAVA_HOME variable, and its value is the JDK installation directory, as shown in Figure 3-1-1.
  • Create a CLASSPATH variable with the value.; %JAVA_HOME%\lib, as shown in Figure 3-1-2;
  • Find the path variable in the system variable, and add a new variable value: %JAVA_HOME%\bin, as shown in Figure 3-1-3.

Figure 3-1-1 JAVA_HOME variable

Figure 3-1-2 CLASSPATH variable

Figure 3-1-3 PATH variable

4. After setting the above system environment variables, open the system terminal and enter Java, it can be used normally, as shown in Figure 4-1-1: