Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM Implementing JRE

Tags:

java

jvm

  1. JVM is an implementation of JRE. So every device which has JVM will contain JRE right?

  2. JDK contains Set of classes and Libraries which support Development. Does JRE contains the Same. If so why they need the same since we already have our code converted to byte code?

Please correct me if I am wrong

like image 262
Java Beginner Avatar asked Mar 28 '13 02:03

Java Beginner


People also ask

How does JRE work with JVM?

Role of the JRE in Java programming language JVMs are available for multiple operating systems, and the JRE generates a single copy of your Java code that runs on all types of JVMs. In this way, the JRE facilitates platform independence for Java applications. You can write them once and run them anywhere.

What is the implementation of JVM?

An implementation: JVM implementation is known as JRE (Java Runtime Environment) i.e. it creates a corresponding environment for the execution of code by implementing the specifications which are defined in JVM. JRE consists of java binaries and other classes to execute the program.

Can JVM work without JRE?

You can't run Java program without JVM. JVM is responsible in running a Java program, but the only file that can be executed by JVM is Java bytecode, a compiled Java source code.

Is JVM and JRE same?

JRE identifies all the helpful class libraries needed for execution, while JVM is a subclass of JRE that decodes the bytecode into machine language and other minor tasks. JVM and JRE do not participate in development processes like debugging and compiling; JDK is used for them.


1 Answers

You have number 1 a little backward. The Java Runtime Environment (JRE) contains a Java Virtual Machine (JVM), along with the standard java libraries and other things which allow Java byte-code programs to run.

The JDK Java Development Kit is like a superset of the JRE. It has all the things a JRE has, but adds things like a compiler and debugger to allow you to not only run Java byte-code, but create it from Java source files.

like image 161
Collin Avatar answered Oct 25 '22 09:10

Collin