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.