The following Steps are followed in execution of a Java Program
What happens at compile time?
Compiler’s main functionality is to convert High-level language to low-level language which is understood by the machine.In C/C++ programming language the compiler directly converts to source code into Machine language code which is dependent on the particular platform, whereas in the case of java it is totally different.
Java has compiler name as javac which converts source code to intermediate code which is known as Java Bytecode. This java bytecode is not platform dependent. E.g if you compile your source code in windows platform by using javac compiler so you can run this code in any another platform like Linux, Mac etc.
How Bytecode is executed?
The file containing bytecode is interpreted by special interpreter known as Java Virtual Machine(JVM)
➤JIT(Just in time)compiler
How Bytecode is executed?
The file containing bytecode is interpreted by special interpreter known as Java Virtual Machine(JVM)
Components of JVM
➤Class Loader
➤Bytecode verifier➤JIT(Just in time)compiler
No comments:
Post a Comment