Java / JVM
VM(Java Virtual Machine) acts as a run-time engine to run Java applications. JVM is the one that actually calls the main method present in a Java class. JVM is a part of JRE(Java Runtime Environment).
JVM enables a computer to run Java programs as well as programs written in other languages and compiled to Java bytecode.
The class loader performs the below 3 activities in the mentioned order:
Loading: finds and imports the binary data for a type.
Linking: performs verification, preparation, and optionally resolution.
- Verification: ensures the correctness of the imported type.
- Preparation: allocates memory for class variables and initializing the memory to default values.
- Resolution: transforms symbolic references from the type into direct references.
Initialization: invokes Java code that initializes class variables to their proper starting values.
Bottom up approach is considered for tuning when application is running in PROD environment where no immediate code change is possible.
- Top down approach.
- Bottom up approach.