Forums Register Login

JVM internal working principle

+Pie Number of slices to send: Send
Dear All

The JVM Contains both JIT(Just In Time Compiler) and Java interpreter.

1) What is the differrence between the JIT(Just In Time Compiler) and Java interpreter, since both converts BYTECODE into native machine code

2)What is the need of both compiler and interpereter in JVM.

3)please tell me the process of convertion of byte code to native .

4)It should convert first to the Assembly language and then to machinecode right
+Pie Number of slices to send: Send
 

santhosh.R gowda wrote:Dear All

The JVM Contains both JIT(Just In Time Compiler) and Java interpreter.

1) What is the differrence between the JIT(Just In Time Compiler) and Java interpreter, since both converts BYTECODE into native machine code

They are parts of the same program. The JIT bit repeats the compilation from bytecode to native for parts of code which appear to be used frequently, so as to improve performance.


2)What is the need of both compiler and interpereter in JVM.

The compiler can validate the code and check it for many errors. That validation need not be repeated, otherwise execution would be very slow.


3)please tell me the process of convertion of byte code to native .

The compiler takes bytecode and coverts it into native code. Or, put differently, you will have to search


4)It should convert first to the Assembly language and then to machinecode right

No, bytecode is very similar to assembler already.
+Pie Number of slices to send: Send
 

No, bytecode is very similar to assembler already.


How bytecode is similar to assembler how its is going to differentiate btewen the processor architecture.Please give me the link to know in detail of the working principle
+Pie Number of slices to send: Send
Try the Java™ Virtual Machine Specification. It can vary from implementation to implementation.
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3776 times.
Similar Threads
JIT vs HotSpot
What is Java Interpreter or Compiler?
Interpreter
Is JDK same for all platforms(windows,unix,mac) or is it different for different operating systems.
JIT compiler
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:44:18.