This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes JVM and JRE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JVM and JRE" Watch "JVM and JRE" New topic


Jitendra Kumar

Joined: Oct 24, 2005
Posts: 14
Recently I was asked about the differences between JRE and JVM in an interview. All this while I thought I was pretty much aware of it, but I didn't had a proper technical answer to it.

Any technical and important differences that any one can share ??
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114

So what did you answer yourself?

The JVM and the JRE are two different things. You could compare it to a car. The JVM is the engine that interprets and executes Java bytecode.

But like with a car, if you want to go somewhere, you need more than just an engine. You also need a chassis, wheels, a steering wheel, etc.

The JVM is the engine and the JRE is the complete car - the engine plus all the things around it that you need to run Java programs.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Jitendra Kumar

Joined: Oct 24, 2005
Posts: 14
Dear Jesper,

i also answered almost what you answered. Your analogy was good, but i was looking for some technical differences. What is chassis, steering etc in JRE ? I have read both JVM and JRE being used synonimously at a lot of places.

What do other members think about this.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41599
Most important amongst the extra bits of the JRE are probably the class libraries. Smaller ones would be the Java Web Start and Java Plugin components:

[ August 04, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
jQuery in Action, 2nd edition
subject: JVM and JRE