JVM (Java Virtual Machine) ArchitectureJVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent). What is JVMIt is:
What it doesThe JVM performs following operation:
JVM provides definitions for the:
JVM ArchitectureLet's understand the internal architecture of JVM. It contains classloader, memory area, execution engine etc. 1) ClassloaderClassloader is a subsystem of JVM which is used to load class files. Whenever we run the java program, it is loaded first by the classloader. There are three built-in classloaders in Java.
Output: sun.misc.Launcher$AppClassLoader@4e0e2f2a null These are the internal classloaders provided by Java. If you want to create your own classloader, you need to extend the ClassLoader class. 2) Class(Method) AreaClass(Method) Area stores per-class structures such as the runtime constant pool, field and method data, the code for methods. 3) HeapIt is the runtime data area in which objects are allocated. 4) StackJava Stack stores frames. It holds local variables and partial results, and plays a part in method invocation and return. Each thread has a private JVM stack, created at the same time as thread. A new frame is created each time a method is invoked. A frame is destroyed when its method invocation completes. 5) Program Counter RegisterPC (program counter) register contains the address of the Java virtual machine instruction currently being executed. 6) Native Method StackIt contains all the native methods used in the application. 7) Execution EngineIt contains:
8) Java Native InterfaceJava Native Interface (JNI) is a framework which provides an interface to communicate with another application written in another language like C, C++, Assembly etc. Java uses JNI framework to send output to the Console or interact with OS libraries. Next TopicVariable Datatype |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India