Skip to main content

Command Palette

Search for a command to run...

Java Architecture

Published
•1 min read•View as Markdown
S

I am a tech enthusiast and a learner

In C, the compiler converts the program into an executable file.

In JAVA unlike C, the compiler(javac) converts our program(.java file) into byte code(.class file) that is sort of in an intermediate state, after that JVM interprets that byte code into executable machine code(depending on OS).

JAVA is a platform-independent language because the bytecode is created that is independent of the OS, but JVM is platform dependent as it converts the bytecode into machine code according to the OS it is installed.

JDK --> JRE + development tools + compiler

JRE -->JVM + library classes

JVM --> Interpreter + JIT(just in time)= saves time by not interpreting the same code again and again.

{JAVA SOURCE CODE} ---->[JDK]-----> {BYTE CODE} -----> [JVM]<-[JRE]------>{HARDWARE}

JRE is only used to run Java programs.

RUNTIME:

[CLASS LOADER] ---> [BYTE CODE VERIFIER]-----> [INTERPRETER]---->[RUNTIME]---->[HARDWARE]