File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Which happen Intrepreter and compiler??    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Which happen Intrepreter and compiler??    " Watch "Which happen Intrepreter and compiler??    " New topic
Author

Which happen Intrepreter and compiler??

Dhineshkumar raj
Greenhorn

Joined: Aug 06, 2007
Posts: 28
What is the life cycle of JVM ??

As we know the following,
Java is both compiler and Interpreter
Java is a just-in time compiler.

javac classname.java

// using this command am compiling my code. It means JVM converts the normal Unicode(.java file) into bytecode(.class file) right??

Now when will the interpreter takes its turn ?? Before making the .class file or after making .class ??

Regards
Dhinesh
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
Originally posted by Dhineshkumar raj:
javac classname.java

. . . It means JVM converts the normal Unicode(.java file) into bytecode(.class file) right??

Now when will the interpreter takes its turn ?? Before making the .class file or after making .class ??

Regards
Dhinesh
Yes, javac converts an ASCII or Unicode plain text file to bytecode.
The interpreter is called "java" and it takes its turn when you write "java classname". If there is frequently-used code the JIT compiler may compile that from bytecode into machine code to optimise performance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which happen Intrepreter and compiler??