It's not a secret anymore!
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
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: 15081

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 8 API documentation
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: 42965
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 ]
I agree. Here's the link:
subject: JVM and JRE
It's not a secret anymore!