Jdk environment variable configuration, jdk environment variable
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.
How to install JDK 16? Configure environment variables?
JAVA_HOME = C: \ Program Files \ Java \ jdk1.6.0 _ 10
Classpath =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; (.; must not be small, because it represents the current path)
Path = % JAVA_HOME % \ bin
How to install JDK 16? Configure environment variables?
JAVA_HOME = C: \ Program Files \ Java \ jdk1.6.0 _ 10
Classpath =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; (.; must not be small, because it represents the current path)
Path = % JAVA_HOME % \ bin