Original articles, reproduced please indicate the source.
This is my 2011-9-4 record, now put it on the blog.
Configure the JDK environment variables under Windows XP :
1. Install the JDK, the installation process can customize the installation directory and other information, such as we choose to install directory D:\Java\jdk1.7.0
2. after the installation is complete, right-click on "My Computer" and click "Properties";
3. Select the "Advanced" tab and click on "Environment variables";
4. in "System variables", set 3 properties,Java_home,path,classpath ( case does not matter ), if already exist then click "Edit", do not exist then click "New";
5.java_home indicates the JDK installation path, which is the path D:\Java\jdk1.7.0that was selected at the time of installation, including Libunder this path, bin,JRE , and so on (this variable is best set, because you will need to rely on this variable to run Tomcat,Eclipse , etc.);
Path allows the system to identify Java commands under any path, set to:
%java_home%\bin;%java_home%\jre\bin
CLASSPATH is the Java load class or Lib path, and only the class is in CLASSPATH ,Java command to be recognized, set to:
.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar (the most front red dot . ) Represents the current path )
%java_home% is referring to the previously specified java_home;
6."Start"->;" Run, type "cmd";
7. Type the command "java-version", "java", "javac" Several commands, appear screen, indicating that the environment variable configuration is successful;
8. OK, finish the call. Let's start with your first Java program.
Java environment variable configuration method