1. Create a java_home variable in the system variable. The variable value is c: \ Program Files \ Java \ jdk1.6.0 _ 14 (set it according to your installation path)
2. Create a classpath variable in the system variable. The variable value is ..; % java_home % \ Lib \ tools. jar.
3. add the variable value % java_home % \ bin; % java_home % \ JRE \ bin in the PATH variable (the variable values are separated)
Enter javac in cmd. If the command is printed properly, the configuration is successful.
Environment variable explanation:
Java_home: JDK installation path
Classpath: the class path loaded by Java. Only the Java commands of the class in classpath can be identified. A "." is added before the path to indicate the current path.
Path: The system can recognize Java and javac commands in any path.
JDK environment variable configuration