In "system variables", set the three attributes java_home, classpath, and path (case-insensitive). If they already exist, click "edit". If they do not exist, click "new ";
B) java_home indicates the JDK installation path, which is the path C:/program files/Java/jdk1.7.0 _ 03 selected during installation. This path includes Lib, bin, JRE and other folders (it is best to set this variable, because later running tomcat, Eclipse, etc. all need to follow * this variable );
C) path allows the system to identify Java commands in any path. Here, note that the path should already exist, so do not create a new one. Find the path, click "edit". Add the following statement at the beginning of the value. If the PATH variable is overwritten, some basic commands in cmd cannot be found.
; % Java_home %/bin; % java_home %/JRE/bin;
D). classpath is the path of the Java loading class (class or Lib). Only the class in classpath can be identified by the Java command and set:
.; % Java_home %/lib/dt. jar; % java_home %/lib/tools. Jar (Add. to indicate the current path)
% Java_home % refers to the previously specified java_home;
4. Check whether the installation configuration is correct.
Click Start and type cmd ";
Run the "Java-version", "Java", and "javac" commands to check whether the output is similar .. The installation and configuration are OK.