Configuring Java Environment variables

Source: Internet
Author: User

First, download the latest version of the JDK. You can go to http://java.sun.com/javase/downloads/index.jsp to download the latest version of JDK1.6. I installed "C:\Program files\java\jdk1.6.0_10" (Take this as an example).

Second, after the installation of the configuration. Right click on "My Computer", open "Properties", select "Advanced" Inside "environment variable". The system variable needs to be set to three properties in the newly opened interface. The path attribute exists on a computer that does not have a JDK installed.

  1) in the "User variable" click on "New", then the variable name is written "Java_home", the variable value is written on the installation path just now "c:\program files\java\jdk1.6.0_10 ".

  2) Locate the path in the system variable and click Edit. The meaning of path is that the system can recognize Java commands under any path. Add variable Value "; c:\program files\java\jdk1.6.0_10 \ Bin c:\program files\java\jdk1.6.0_10 \ Jre\bin ". (Note: The red part is based on its own installation address; The front number cannot be less)  

3) In the system variable, click "New", then the variable name "Classpath", the meaning of the variable is the Java load class (Bin or lib) path, only the class in Classpath, the Java command can be recognized. The value is "c:\program files\java\jdk1.6.0_10 \lib\dt.jar; c:\program files\java\jdk1.6.0_10 \ Lib\tools.jar "(Note: The red part is based on your installation address).  

Third, verify whether the installation is successful. Click "Start", "Run", enter "cmd", enter the command line interface, into "java-version", if the installation is successful, The system displays the Java version "1.6.0_10" ..... (different version numbers are different)

Configuring Java Environment variables

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.