What is the difference between JVM and JRE?

When I tell people to go to java.com and download the latest version of java I think the get the latest JRE version. But lots of ppl talk about JVM and now I would really like to know what these things are all about?

What is the difference between JRE and JVM? And if something requires JVM 1.5.0 is that the same as JRE 1.5.0 then? or what ???

JVM == Java Virtual Machine (Generic)
JRE == Java Runtime Environment (A distribution of a JVM)
JDK == Java Development Kit (The JVM included in the JRE plus development tools)

It’s just a bunch of semantics. JVM is generic, whereas JRE and JDK are specific distributions. JRE is for consumers and JDK is for developers.

Does that clear things up? :slight_smile:

JVM means Java Virtual Machine. This is the program which interprets and compiles the Java byte code of an Java application into native code.

It’s basically the same in the two downloadable Javas: JRE and JDK.

  • JRE is the “Java Runtime Environment”. It just contains the mentioned JVM (basically). A user who wants to run your Java application needs the JRE. It’s about 12-14 MB in size to download. You could also bundle the JRE with your application, though.
  • JDK is the “Java Developer Kit” which is just needed by developers. It contains the JRE plus compiler, debugger, and more tools for developers. A user normally doesn’t need it.

Don’t miss the Java Tutorial. Together with other interesting books about the JVM and so on they’re available here:
http://java.sun.com/docs/books/
(Those books with a monitor icon can be read online.)

VM == standard terminology in computing industry, invented circa 20 years ago.

JVM == “java” VM == makes sense as an extension to standard terminology

JDK == Sun marketing name that has stuck; really means “java” SDK
J2SDK == “what they tried to change it to, but too many people thouhgt it stupidly unwieldy and refused to drop JDK, so eventually Sun gave in”

JRE == Sun marketing name that has stuck; really means “JVM + standard libraries” (because, unlike Java, most system languages didn’t come with standard libs; VM normally meant just the basic executor, not all the libraries too)