• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between Java interpreterand JVM  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DO JVM and Java Interpreter mean the same thing or is the Java Interpreter a part of JVM. If it is a part, what are the different functions that a JVM does ? ) e.g. it provides the java runtime environment, it provides the Java Interpreter etc)
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, we've had a lot of questions like this lately. Spring semester programming classes?
Anyhow, the JVM executes the byte code the compiler put into classes. If you put the classes into jars, the JVM reads those to find the classes. It is the heart of the runtime environment, but not the whole thing. There are other DLLs and jars and stuff making up the environment.
But is it an interpreter? Yes, firstly and mostly it is. It interprets byte code. Some JVMs do much more however. If they see some code is being executed many many times they can choose to compile the code to machine code. Then they stop interpreting and manage machine code subroutines. So they can blur the line between interpreter and, um, something else.
Hope that helps!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!