How Java JDK environment variables are configured

Source: Internet
Author: User
Here I will install the jdk1.4.2_09 directly under the C disk, namely c:j2sdk1.4.2_09

The following is a detailed configuration:

1.java_home

Java_home is pointing to the installation path of the JDK

In this path you should be able to find bin, Lib and other directories

If my setting should be for java_home=c:j2sdk1.4.2_09;

2.PATH

Path is set up to point to the JDK Bin directory

The various compile execution commands are delegated in the bin directory

If my setting should be for path=c:j2sdk1.4.2_09bin; C:j2sdk1.4.2_09jrebin;

It needs to be explained that the system itself has the PATH environment variable, as long as the c:j2sdk1.4.2_09bin; C:j2sdk1.4.2_09jrebin, directly to the back can be used in the middle of ";" Separated

3.CLASSPATH

Classpath sets the path of the class and is most important

If my settings should be for classpath=.; C:j2sdk1.4.2_09lib; C:j2sdk1.4.2_09libtools.jar;

The front plus "." and ";", meaning to first find in the current directory


The above configuration is done under the c:j2sdk1.4.2_09 of my JDK installation directory

You can modify it according to the actual installation directory.

Configuration method:

Right-click My Computer--> properties and select the Advanced tab in the System Properties options panel that pops up.

Click on the "Environment variables" button, pop-up "Environment variables" panel, in the user variable or system variables in the appropriate configuration can be

Note: User variables are valid only for users who are currently logged on to this computer, and system variables are valid for all users who log on to this computer, and you can configure them according to their preferences in the appropriate variable environment.

After all environment variables are configured, the Java or JAVAC commands are executed directly in the command window, and the corresponding information appears, indicating that the configuration was successful

</

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.