• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM and JRE

 
Ranch Hand
Posts: 264
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

What is the difference in JVM and JRE.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
good diagram:
http://java.sun.com/j2se/1.5.0/docs/
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 79056
375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JRE = JVM + some standard JAVA class libraries [which are used to implement API]
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic