JRE and JVM

Difference between JRE and JVM

Page 1 of 1

4 Replies - 3037 Views - Last Post: 07 April 2008 - 01:17 PM Rate Topic: -----

#1 partha_Adt   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-March 08

JRE and JVM

Post icon  Posted 07 April 2008 - 08:49 AM

What is the difference between JRE and JVM.Normally JRE having the features of JVM then why we are using both?JRE is enough right?





"When Love and skill Work Together Expect A Miracle
Is This A Good Question/Topic? 0
  • +

Replies To: JRE and JVM

#2 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8379
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: JRE and JVM

Posted 07 April 2008 - 08:56 AM

View Postpartha_Adt, on 7 Apr, 2008 - 08:49 AM, said:

What is the difference between JRE and JVM.Normally JRE having the features of JVM then why we are using both?JRE is enough right?


I might be completly wrong but:
the JVM is the engine that runs/executes the byte code generated by the JRE

so you can have a JVM on a system and upgrade from JRE 1.5 to 1.7 the JVM does not need to be change.

JVM is your Pentium PC
you can upgrade from XP to Vista you don't have to change your CPU
Was This Post Helpful? 0
  • +
  • -

#3 baavgai   User is online

  • Dreaming Coder
  • member icon


Reputation: 7253
  • View blog
  • Posts: 15,127
  • Joined: 16-October 07

Re: JRE and JVM

Posted 07 April 2008 - 09:57 AM

Three happy acronyms, JRE, JVM, JDK. Starting with the one you didn't ask about, JDK is the Java Development Kit, it contains the tools needed to create Java programs. However, most people don't need to create java programs, just run them. For this, there is the JRE, the Java Runtime Environment, which contains all the stuff needed to run a program created with a matching version of the JDK. Both packages contain a JVM.

The JVM is the Java Virtual Machine. This is an interpreter that's capable of running "compiled" java code. In theory, a JVM hardware agnostic and a program that runs on a Windows JVM will run on an Apple JVM just fine, because the programs are running inside "virtual machine". In some cases, this actually works.
Was This Post Helpful? 0
  • +
  • -

#4 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8379
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: JRE and JVM

Posted 07 April 2008 - 12:20 PM

View Postbaavgai, on 7 Apr, 2008 - 09:57 AM, said:

Three happy acronyms, JRE, JVM, JDK. Starting with the one you didn't ask about, JDK is the Java Development Kit, it contains the tools needed to create Java programs. However, most people don't need to create java programs, just run them. For this, there is the JRE, the Java Runtime Environment, which contains all the stuff needed to run a program created with a matching version of the JDK. Both packages contain a JVM.

The JVM is the Java Virtual Machine. This is an interpreter that's capable of running "compiled" java code. In theory, a JVM hardware agnostic and a program that runs on a Windows JVM will run on an Apple JVM just fine, because the programs are running inside "virtual machine". In some cases, this actually works.


So baavgai,

if I understand well
the JRE are the java.... .class generated by the JDK
Was This Post Helpful? 0
  • +
  • -

#5 baavgai   User is online

  • Dreaming Coder
  • member icon


Reputation: 7253
  • View blog
  • Posts: 15,127
  • Joined: 16-October 07

Re: JRE and JVM

Posted 07 April 2008 - 01:17 PM

The .class files are "pcode" for Java, the "precompiled" file that a JVM will iterpret. The JRE contains a JVM implementation, plus all the .class files you'd expect for a program to run, like java.util.*, etc.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1