Configuring the Java Environment

Source: Internet
Author: User

1. Download JDK

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

2, after the download next installation, the final step requires you to install the JRE, can be canceled, because the previous installation has been completed.


3. Configure environment variables: Right-click "My Computer"-"advanced"-"Environment variables"
1) Create a new "java_home" variable in the system variable, the value of the variable is: C:\Program files\java\jdk1.6.0_14 (fill in according to your own installation path)

2) New "classpath" variable, the value of the variable is:.; %java_home%\lib;%java_home%\lib\tools.jar

3) Add variable value in Path variable (existing without new):%java_home%\bin;%java_home%\jre\bin

(Note that the variable values are used ";" Separated

4. "Start"-"Run"-enter "Javac" and "enter", if you can print the usage instructions correctly, the configuration is successful!

Analysis of supplemental environment variables:

Installation path for JAVA_HOME:JDK

Classpath:java load Classpath, only the class is recognized by the Java command in Classpath, and a "." is added before the path. Represents the current path.

Path: The Java,javac command can be recognized by the system under any path.

Configuring the Java Environment

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.