Home

Other contributors have said "What is the difference between JVM and JRE?" is the same question as "What is the difference between the JVM and JRE?". If you believe that these are not asking the same thing and should be answered differently, click here.

What is the difference between the JVM and JRE?

Answer:

JRE includes (JVM ) java virtual machine and some other library files. That runs a java application.

JVM - understand the corresponding byte code of a java class and make it ready for run.

Another Answer:

The Java Runtime Environment (JRE) is an implementation of the JVM (Java Virtual Machine) that actually executes our java programs.


The Java Virtual Machine (JVM) is created, like a separate program, whenever a java program is executed. The JVM essentially runs between the computer and the java program. Java is designed so that any java program can run on any machine. This is because the JVM will interpret the Operating System independent java code and execute the commands needed for the particular Operating System you are trying to run the program on at the time.

Java Program --- Execute some command ---> JVM --- Translate the command for this computer ---> Computer


Answer

Java Virtual Machine (JVM)

A Java Virtual Machine (JVM) is a set of computer software programs and data structures that use a virtual machine model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture. As of 2006, there are an estimated four billion JVM-enabled devices worldwide.

JRE (Java Runtime Environment)

Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system

Related questions
Related answers:
Can you answer these?