aspose file tools*
The moose likes Beginning Java 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 » Beginning Java
Bookmark "JVM and JRE" Watch "JVM and JRE" New topic
Author

JVM and JRE

Pawanpreet Singh
Ranch Hand

Joined: Jun 12, 2005
Posts: 264

Hi All,

What is the difference in JVM and JRE.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

The JVM (Java Virtual Machine) is essentially just the program java.exe, without the Java runtime libraries. You can't really do anything with the JVM by itself; you need a JRE, a Java Runtime Environment, which includes all the classes in the standard Java API.


[Jess in Action][AskingGoodQuestions]
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
good diagram:
http://java.sun.com/j2se/1.5.0/docs/


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14347
    
  22

The JVM (Java Virtual Machine) is just the motor. But if you want to travel somewhere, you need more than just the motor - you'll need a complete car. The JRE (Java Runtime Environment) is the car - it's the motor, with everything around it that you need to be able to use it.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
An Sush
Ranch Hand

Joined: Jan 17, 2007
Posts: 47
JVM is required for running Java programs and applications (like applets).
JRE is a level higher than JVM and it supports developement of Java code. You can run Java program(.class file) in JVM but cant compile (.java file). using JRE you can compile java (.java) and run(.class) it as well
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39834
    
  28
Originally posted by An Sush:
JVM is required for running Java programs and applications (like applets).
JRE is a level higher than JVM and it supports developement of Java code. You can run Java program(.class file) in JVM but cant compile (.java file). using JRE you can compile java (.java) and run(.class) it as well


I am afraid you are mistaken.

The JRE contains a JVM, so does the JDK. Both will run Java bytecode files.

The JDK contains compiling tools, libraray classes (the API) etc., as well, so you can create new bytecode files with the JDK.
ragha naidu
Greenhorn

Joined: Mar 23, 2008
Posts: 1
JRE = JVM + some standard JAVA class libraries [which are used to implement API]


with regards<br />ragha naidu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM and JRE