• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between JRE and JVM

 
kiran mahavir
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Javaranch,
Please let me know the difference between JVM and JRE ans what are their roles.
Thanking in advance
Kiran
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM (Java Virtual Machine) is actually a set of specifications that Sun puts out for makers of browsers and embedded chips etc. to follow when creating their JVMs for their products. When you run an applet or servlet it is running in a JVM.
The JRE (Java Runtime Environment) is the equivalent of a JVM but for running applications outside of a browser (like from the DOS prompt). It contains the Java Foundation Classes for the release of Java that it implements.
A JIT (Just In Time Compiler) is a tool to increase the performance of Java Applications. If the "interpreting" of the code is slowing things down, then you can use a JIT to actually compile the JAVA code on the fly to a machine
specific version, which speeds things up.
Check out http://www.javaranch.com/ubb/Forum1/HTML/000791.html
 
kiran mahavir
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for the reply cindy. Can you u let me know then what is a java plugin and why it is used for?
thanx in advance
kiran
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, when SUN released Java 2, the browser vendors like Netscape and Microsoft needed time to get the new stuff incorporated into their JVMs (that still hasn't happened). So Sun provided the plug-ins as a method for programmers to be able to use the newest stuff right away. You download the file, and it re-directs the browsers to use that version of java instead.
The plug-ins are available from Sun at:
http://java.sun.com/products/plugin/index.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic