Java ClassLoader-Pre-order

Source: Internet
Author: User

Pre-order

  A few days ago, a person often in the QQ group asked some Java hot update knowledge. Later, he realized the hot update, but he still encountered various problems. I gave him an answer and looked at the class loader he wrote, and his implementation was probably like this:

(ask me this question netizen, if you see this article, please do not be angry.) Your problems may be met later, I take out to do examples, I hope you don't blame me ha ^_^)

His implementation is simple, this class loader can actually implement the hot update Java class, but such a class loader is completely non-conforming to the classloader mechanism, logical thinking is also problematic. The problem he encountered was that when the class loader object was created, it used the Class A URL to do the argument, and Class A referred to Class B, the Class A was hot-updated, and Class B did not need to have an error when he loaded Class A with such a loader instance. (Here I do not answer, I believe that after reading my knowledge of this point of introduction, will know the reason.) )

See the user on the implementation of the class loader, I think he probably did not understand some of the reason and mechanism of the class loader, and therefore remembered to write some articles about the ClassLoader, to detail the next class loader. Here's a list of articles about this series:

1, the System class loading---Introduces the JDK's own class loader, and the corresponding mechanism, and finally follow the JDK recommended our way to implement our own classloader.

2, Tomcat class loader---with the TOMCAT6 class loader as an example, the class loader is described in detail.

3, Hot Update class loader---Introduce the implementation of the thermal update example.

Related Article

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.