ClassLoader Features

Class loader (ClassLoader) is what?

The class loading stage "to get through the fully qualified name of a class description of such a binary byte stream" This action on the outside of the Java virtual machine to achieve, to allow the application to decide how to get the required categories. To achieve this module the operation code "class loader" .

effect

  • Functional testing
    of each loader, has its own independent class name space. Comparison of two classes whether "equal" on the premise that they are loaded by the same class loader makes sense that ClassLoader if different, the two classes must be unequal. This makes loading different versions of the same module in a jar in the JVM to become a reality, based on the reflection function, we can also be very easy to test different versions of the modules.
  • Code encryption
    to obfuscate the class file compression, native encryption and decryption process, etc.
  • OSGi
    is a dynamic model is tantamount, in the implementation of the eclipse plugin is based on OSGi thought, and the main application is the eclipse plug-in, it can be understood as eclipse plug-in is OSGi application model.
  • Hot deployment
    without stopping the service, dynamically replace the destination file. ClassLoader dynamic loading jar package

Guess you like

Origin www.cnblogs.com/itplay/p/12200783.html