This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 38087
    
  22
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: 14074
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM, JRE and Compiler
 
Similar Threads
java.lang.NoClassDefFoundError
Confusion in JRE, JVM and JDK
JAVA2 1.2 compiler
Collection specific elements not generic problem
Java 2 SE SDK for OS X