aspose file tools*
The moose likes Beginning Java and the fly likes JVM, JRE and Compiler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JVM, JRE and Compiler" Watch "JVM, JRE and Compiler" New topic
Author

JVM, JRE and Compiler

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
1 Is JVM and JRE one and same or different ?

2 When we install JDK, does JRE get installed with it or is it separate install ?

3 Compiler gets installed with JDK or JRE ?

4 If JVM is separate from JRE, does it get installed with JDK ?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Somebody asked a very similar question recently: here. See whether that answers your question
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14430
    
  23

Look at it this way:

The JVM (Java Virtual Machine) is the engine of Java - it's the thing that executes your Java bytecode.

The JRE (Java Runtime Environment) is a complete car, including the engine (JVM). To be able to go somewhere, you need more than just the engine - you need a car with an engine in it. The JRE is the car around the JVM: the standard Java library and other things you need to run Java programs.

When you install the JDK, a JRE is also installed - it wouldn't make much sense to have just a Java compiler without any way to run Java programs, and besides that, the Java compiler itself is written in Java so it needs a JRE to run.

The compiler ofcourse comes with the Java Development Kit (not with the JRE).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
 
subject: JVM, JRE and Compiler