DEV Community

Ajay Raja
Ajay Raja

Posted on

Java_Architecture

Java Development Kit (JDK)

1.It is used to build and develop the java program.
2.It internally contains JRE.
3.It contains the compiler and debugger.
4.It understands bytecode (.class file).
5.Without JDK we can’t build any java program.

Working Process of JDK:
Compilation:
1.The developer writes Java code in a .java file
2.The JDK provides the Java compiler (javac).
3.The compiler converts the source code into bytecode (.class file).
4.This bytecode is then passed to the JRE to execute.

Java Runtime Environment (JRE)

1.JRE is the responsible unit to run the java program.
2.Without JRE we can’t run java program.
3.I mean with only JRE we can run the java program without JDK.
4.It is only used to execute Java programs.

Working Process of JRE
1.JRE receives the compiled bytecode (.class file).
2.It loads the required system libraries and runtime files.
3.It uses the JVM to execute the bytecode.
4.JRE provides the environment and uses JVM to run Java programs smoothly.

JVM (Java Virtual Machine)
1.JVM is a virtual machine that executes Java bytecode.
2.The JVM converts this bytecode into machine code that your system understands.
3.JVM is the main reason why Java is platform-independent.
4.Different operating systems have different JVMs, but the same bytecode can run on all of them.

Working Process of JVM
1.Class Loading--->JVM loads the compiled (.class) file into memory.
2.Bytecode Verification--->It checks the bytecode for security and correctness.
3.Execution---->The Execution Engine converts bytecode into machine code.

JIT (Just-In-Time Compiler)

1.JIT is a part of the JVM.
2.It improves the performance of Java programs.
3.It converts bytecode into machine code at runtime.
4.It makes Java applications run faster.

Top comments (0)