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. When the installation is complete, right-click "My Computer" and 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 that was selected when the installation was just made d:/java/jdk1.5.0_ 08, this path includes folders such as LIB,BIN,JRE (this variable is best set, because later run Tomcat,eclipse and so on will need to rely on * this variable);
Path enables the system to recognize 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 the class is in Classpath, the Java command is recognized, set to:
.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar (to be added. Represents the current path)
%java_home% is the reference to the previously specified java_home;
6. Start "->;" Run, type "cmd";
7. Type the command "Java-version", "Java", "Javac" a few commands, the screen shows that the environment variable configuration success,
8. All right, finish the call. Let's start with your first Java program.