Environment variable configuration in Java

Source: Internet
Author: User

JAva environment variable Configuration:
(Either of the two methods is acceptable)

Method 1:
Click "my computer"-(right-click) "properties"-"advanced"-"environment variables" to bring up the "environment variables" configuration card for Windows.
In the system variables column, perform the following three operations:
① Create a new "classpath" (if it already exists, edit it directly) and set its value to.; JDK's absolute path value \ Lib
(For example,.; D: \ Program Files \ Java \ jdk1.5.0 _ 04) (if the value contains the original content, separate it with a semicolon ),
Note that the symbol before the path is.; cannot be missed
② Create a new "path" (edit it if it already exists) and set the value to % java_home % \ bin. (If the value contains content, separate it with a semicolon ).

Method 2:
Click "my computer"-(right-click) "properties"-"advanced"-"environment variables" to bring up the "environment variables" configuration card for Windows.
In the system variables column, perform the following three operations:
① Create java_home and set its value to the absolute path of JDK (for example, D: \ Program Files \ Java \ jdk1.5.0 _ 04 ).
② Create a new "classpath" (if it already exists, edit it directly) and set its value to.; % java_home % \ Lib (if the value contains content, separate it with a semicolon ).
Note that the symbol before the path is.; cannot be missed

③ Create a new "path" (if it already exists, edit it directly) with the value % java_home % \ bin. (If the value contains content, separate it with a semicolon ).

Test: Enter javac in the command line window

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.