What the hell is classpath java?

Source: Internet
Author: User

CLASSPATH, the current JDK (1.5 later) does not require this environment variable. The original JDK itself cannot find the Tools.jar in the Jdk\lib directory, so this environment variable needs to be configured.

Role: the Java Virtual machine (JVM) loads the classes used by the application with the class loader, and specifically which classes are loaded according to the needs of the time. The CLASSPATH environment variable tells the class loader where to look for classes provided by third parties and user-defined classes. Alternatively, you can use the JVM command-line parameter-classpath to specify the classpath for your application, and the classpath specified in-classpath overrides the value specified in the CLASSPATH environment variable.

The WEB app under Tomcat has two presets for classpath:web-inf/classes and Web-inf/lib startup projects, and the project loads the data in both directories. This is the specification of the war package. To change the classpath of the preset, there is no similar configuration found in the Tomcat configuration file, so you can achieve your classloader.

This makes it easy to understand the configuration of the Classpath in Web. xml

What the hell is classpath java?

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.