What is the difference between the JRE and JVM? [duplicate]

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.

JRE is the box and JVM is the content of the box.

In simple words JRE = JVM + rt.jar

where rt.jar contains lang, util, awt, swing, math etc. libraries or compiled .class files used to
run our program.

Learn more about difference between JVM and JRECLICK HERE

Leave a Comment