摘要
Java动态类加载机制是Java虚拟机(JVM)的一个重要特征。它实现了在程序执行的过程中动态地加载所需要的类文件,并且这种动态行为是可以人为控制的。这使得Java语言平台具有在运行期间安装软件组件的能力。通过对Java类加载器的原码进行分析,阐述了Java动态类加载机制的原理和过程,并通过一个客户端服务器(C/S)模式下动态地更新客户端软件功能的例子,说明了Java动态类加载机制的实际应用。
The dynamic class loading mechanism is an important feature of Java virtual machine. The class loading mechanism can be used to load the class file dynamically when the program is running. Furthermore, the process can be manipulated by users, so it makes Java language capable of installing the software at runtime. The principle about Java class loading mechanism was narrated by analyzing the JDK's class loader source code, and an example was given that the program could upgrade the client software automatically in client/server model.
出处
《计算机工程与设计》
CSCD
2004年第3期432-435,441,共5页
Computer Engineering and Design