Jar packages and dynamic link libraries

Source: Internet
Author: User

1 jar package closer to dynamic link library

Java at compile time, although the import of other jar package, but it does not copy the other jar in the source code into its own class file, it just uses the name in the jar package.

At the time of execution, both your own and dependent jar packages are loaded into the JVM, and the link is completed before execution, which is more like a dynamic-link library.

2 JVM Find jar Package

Various class loader go to the specified directory to find the jar package.

Bootstrap class loader go to Jre/lib directory,

Extention class loader go to Jre/lib/ext directory,

Application class loader to classpath the specified directory. Manually specify the classpath at the time of execution,

Java-classpath [Some path to the jar, for Example-classpath C:\\java\\myclasses.jar] MyProgram

3 classpath in Eclipse, which is the use of third-party libraries

Jar packages and dynamic link libraries

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.