Difference Between JRE and JVM



What is JDK

JDK stands for Java Development Kit.It is software package or tool kit developed by sun microsystems for creating java programs. JDK=JRE+ java compiler and other useful directories.

What Is JRE

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. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries. If you want to run any java program, you need to have JRE installed in the system. This is the procedure of compiling and running java program.

What is JVM

After our java program is compiled it is converted to byte code i.e. when we compile our source code file with .java extension, it is converted to .class file(byte code).Java virtual machine(JVM) converts this byte code into machine language. A byte code is sequence of special symbols that can be understood by JVM.To run a java program on our computer we just need to have JVM installed in it.

Note:JRE is the container JVM is the content.

Most important feature Of JVM

With JVM installed on a machine we can easily convert the byte code into machine code. This feature is responsible for making java platform independent and is considered as one of the most important features of java. It also makes java superior from other technologies.

Related Topics:




sir , what is the difference jit and jvm ,is there any similarity between jre and jvm

JRE is the container and JVM is the content.JRE provides environment to JVM so that it can run on any platform.