The dynamic loading of Java classes mainly involves the following aspects:
1. New classloading. The disadvantage is that the status of the class instance cannot be saved. 2. JVM ti. The underlying implementation of Java instrument is jvmti. It can be dynamically loaded after the JVM is started: classes can be modified, instrument is more suitable for monitoring and controlling the behavior of virtual machines (without changing the class, changing the class behavior and doing AOP at the JVM bottom layer ). 3. JDK proxy, cglib ---> encapsulates ASM (Java bytecode control framework. ASM is a Java bytecode generation architecture that can dynamically generate stub or other proxies in binary format, or before the class is loaded into the memory by the Java Virtual Machine, dynamically modify the class) ---- dynamic bytecode Generation 4, hotswap (jdk7)