To configure JDK environment variables under Windows XP:
1. Install the JDK, the installation process can customize the installation directory and other information, such as our choice of installation directory for d:/java/jdk1.5.0_08;
2. after the installation is complete, right click on "My Computer", click "Properties";
3. Select the "Advanced" tab and click "Environment variable".
4. in "System Variables", set 3 properties, Java_home,path,classpath (regardless of the case), if already exist click "Edit", does not exist then click "New";
5.Java_home indicates the JDK installation path, which is the path d:/java/jdk1.5.0_08 selected at the time of installation, including Lib,bin,jre folders under this path (this variable is best set, because after running Tomcat, Eclipse and so on are required by * this variable);
Path enables the system to identify Java commands under any path, set to:
%java_home%/bin;%java_home%/jre/bin
Classpath is the Java load class (class or Lib) path, and only classes in Classpath can be recognized by Java commands, set to:
.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar (to be added. Represents the current path)
%java_home% is a reference to the java_home specified above;
6."Start the->;" Run ", type" cmd ";
7. Type the command "Java-version", "Java", "Javac" several commands, appear screen, indicating the success of environment variable configuration;
8. All right, finish the call. Let's start with your first Java program.