Java class Loader

Source: Internet
Author: User

Function: Gets the binary byte stream that describes this class by naming the permission of the class

Each class in the JVM is determined by its class loader and the class itself, and the different classloader have separate namespaces, and the same class is different in different classloader.

Classification: Can be divided into three main categories:

1. Start the class loader (Bootstrap ClassLoader)

Implemented by C + +, is part of the JVM and is used to load class libraries that can be recognized by the JVM into the JVM's memory in Java_home/lib;

2. Extension class loader (extention ClassLoader)

Used to load the class library under the Java_home/lib/ext directory, which can be used directly by the developer;

3. Application class loader (application ClassLoader)

The class library used to load the user classpath (specified by Classpath), which can be used directly by the developer and, by default, if it is not specified by its own class loader;

ClassLoader's Parent delegation Model:

If a classloader receives a class load request, ClassLoader does not load the class itself, but instead delegates the request to the parent class ClassLoader to complete.

Eventually, all class load requests are routed to Bootstrap ClassLoader. Only if the parent loader is unable to complete the load request (as found in the search scope)

Specified class), the child loader will not load itself.

Java class Loader

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.