Java class loading process

Source: Internet
Author: User

The parents delegation model is used in Java to implement the load pattern of a class. The parental delegation model requires that, in addition to the top-level startup ClassLoader, the rest of the ClassLoader should have their own parent ClassLoader, where the parent-child relationship is not implemented with inheritance, but instead uses a combination to take advantage of the parents loader.

Parent delegation Model work process: If a class loader receives a request for a class load, it first does not attempt to load the class itself, but instead delegates the request to the parent class loader, which is the case for each level of the ClassLoader, so all load requests should eventually be routed to the top-level startup class loader. The child loader does not load itself until the parent loader feedback that it is unable to complete the load request (its search scope does not find the desired class). The model is as follows:

Java class loading process

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.