Java environment variable setting method

Source: Internet
Author: User

Java environment variable setting method
Configuring the JDK environment variable under Windows XP: (Windows7 similar)
1. Install the JDK, the installation process can customize the installation directory and other information, such as we choose the installation directory for D:\java\jdk1.5.0_08;
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.5.0_08 selected at the time of installation, including the Lib,bin,jre folder (this variable is best set, because later runs Tomcat,eclipse and so on need to depend on * this variable);
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, only the class is in Classpath, the Java command is recognized, set to:
.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar
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. Start your first Java program.

Java environment variable setting method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.