Loading mechanism like "Java"

Source: Internet
Author: User

class Loading:

Class loading mechanism refers to the. class file loaded into the JVM, and the formation of a class object mechanism, then the application can be instantiated and called Class object, the class loading mechanism can dynamically load external classes at run time, remote network downloaded from the class file, in addition to the advantages of the dynamic, but also through the JVM class loading mechanism To achieve the effect of class isolation, such as the classes in the Acclication server that typically have two applications interfering with each other.

The JVM transforms the class loading process into three steps, load, link, initialize, mount, and link completion, the binary bytecode is converted to class object, the initialization process must not be triggered when the class is loaded, but must be executed at the latest before the first active use of the object, its action is to assign a value to the static variable, call <client> () and so on.

The process is as follows:1. Load (load)

The load process is responsible for locating the binary bytecode and loading into the JVM, and the JVM completes the class loading through the class's fully qualified name (Com.luna.HelloWorld) and the class loader (ClassLoader a instance), again The above two elements are also used to identify a loaded class: the fully qualified name of the class +classloader the instance ID. The class name is named in the following way:

For interfaces or non-array classes, the name is the class name, and this type of class is loaded by the ClassLoader

For array-type classes, the name is the base type or L + reference type name, for example: byte[] bytes=new byte[512], the bytes class name is: object[] objects=new object[10],objects

Loading mechanism like "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.