• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Which happen Intrepreter and compiler??

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic