[Java] to configure Windows Java environment variables

First, the configuration environment variable
1. Create and CLASSPATH environment variable JAVA_HOME
variable name: JAVA_HOME
variable value: D: \ JDK jdk1.7.0_80 \
variable name: CLASSPATH
variable values: ;.% JAVA_HOME% \ lib \ Dt.jar;% JAVA_HOME % \ lib \ tools.jar;
2. edit system variable path
and finally add the path variable values ;% JAVA_HOME% \ bin;%
JAVA_HOME% \ jre \ bin; Note: If you use version 1.5 or later of the JDK, do not set CLASSPATH environment variables can be properly compile and run Java programs.

Second, the test JDK is installed successfully
1.Win + R to open the "Run" type cmd , and press Enter

2. Then were tested in a DOS window javac and java

Guess you like

Origin www.cnblogs.com/ly-2019/p/11768972.html