Tuesday, December 10, 2019

Look for fundamental - ClassLoader

https://www.oracle.com/technical-resources/articles/javase/classloaders.html

http://www2.sys-con.com/itsg/virtualcd/java/archives/0808/chaudhri/index.html


- Compile .java file -> .class file in bytecode
- How JVM can know where is this .class and execute it? -> ClassLoader's help

a ClassLoader locates the bytecodes for a Java class -> reads the bytecodes -> creates an instance of the java.lang.Class class. 
Makes the class available to the JVM for execution.

- The use case is Hot deployment. Use a custom ClassLoader to re-load class into a running application.

-verbose:class VM argument to list loaded classes.












Gudluk

No comments:

Post a Comment