In "system variables", set three attributes: java_home, path, and classpath (Case Insensitive). If the attributes already exist, click "edit". If the attributes do not exist, click "new ";
Java_home indicates the JDK installation path, which is the path D:/Java/jdk1.5.0 _ 08 selected during the installation. This path contains Lib, bin, JRE, and other folders (it is best to set this variable, because in the future, tomcat, eclipse, and so on all need to follow * this variable); Path allows the system to identify Java commands in any path, set:
% Java_home %/bin; % java_home %/JRE/bin
Classpath is the path of the Java loading class (class or Lib). Only the class in classpath can be identified by Java commands and set :.; % java_home %/lib/DT. jar; % java_home %/lib/tools. jar (to add. indicates the current path)
% Java_home % refers to the previously specified java_home;