Dark Horse programmer--java Environment variables path and CLASSPATH

Source: Internet
Author: User

The role of 1.path

Path is used to specify the full path of the Java executable file, but you can execute the Java file even if you do not set the path of the JDK in path, but you must write down the full path, such as D:\Program Files\java\jdk1.6.0_10\bin\javac Test.java, if you set the environment variable path, such as: Path=d:\program Files\java\jdk1.6.0_10\bin, when the Java command is executed, the operating system will automatically go to the path to find the executable program, greatly convenient to write.

The role of 2.classpath

Classpath is used to specify where class files are being tried in the program, and when a class is introduced, the Java compiler will go to the path specified by Classpath. Classpath in the "." Represents the current path. In addition, you can set temporary Classpath:set classpath= ....

Dark Horse programmer--java Environment variables path and CLASSPATH

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.