This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes JVM internal working principle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JVM internal working principle" Watch "JVM internal working principle" New topic
Author

JVM internal working principle

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
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


Creativity is nothing but Breaking Rules
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37941
    
  22
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.
santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
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
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37941
    
  22
Try the Java™ Virtual Machine Specification. It can vary from implementation to implementation.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JVM internal working principle
 
Similar Threads
Interpreter
JIT compiler
Is JDK same for all platforms(windows,unix,mac) or is it different for different operating systems.
What is Java Interpreter or Compiler?
JIT vs HotSpot