JVM Architecture: Overview of JVM and JVM Architecture

JVM Architecture: Overview of JVM and JVM Architecture

JVM Architecture: Overview of JVM and JVM Architecture

JVM Architecture: Overview of JVM and JVM Architecture

Class loader Subsystem

The class loader subsystem is used for loading/reading the .class file and saving the bytecode in the JVM method area. ClassLoader is responsible for loading class files from file system, network or any other source. There is three default class loader used in Java, Bootstrap, Extension, and System or Application class loader. Class loader subsystem is responsible for the following 3 activities.

1. Loading

  • Loading means reading class files and store corresponding binary data in method area.
  • Loading means reading class files and store corresponding binary data in method area.
  • For each class file, JVM will store corresponding info. In the method area.
    1. Fully qualified name of the class
    2. Fully qualified name of the parent class
    3. Methods info.
    4. Variables info.
    5. Constructors info.
    6. Modifiers info.
    7. Constant pool info.
    8. Etc…
  • After loading .class file immediately JVM creates an object for that loaded class on the heap memory of type java.lang.Class.
  •  java.lang.Class object can be used by the programmer to get class level info like methods info. Or variable info, constructors info, etc.. 
  • For every loaded type, only one class object will be created even though we are using class multiple times in our program.

2. Linking

Linking consist of 3 activities…

  • Verify
  • Prepare
  • Resolve

Leave a Reply

Your email address will not be published. Required fields are marked *

*