File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 36514
    
  16
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: 36514
    
  16
Try the Java™ Virtual Machine Specification. It can vary from implementation to implementation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM internal working principle
 
Similar Threads
JIT vs HotSpot
Interpreter
Is JDK same for all platforms(windows,unix,mac) or is it different for different operating systems.
JIT compiler
What is Java Interpreter or Compiler?