Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When JRE is a subset of JDK, why do we have to download JRE separately in a PC?

Tags:

java

When the JDK already includes JRE for the execution of code, why do I have to download JRE separately to execute my java code is the doubt that's bothering me

like image 632
Manoj Keerthy Avatar asked Jul 23 '15 16:07

Manoj Keerthy


2 Answers

As far as I remember this depends on your OS, browser and JDK version.

Eg. if you're using a 64-bit OS and installed a 64-bit JDK, but are using a 32-bit browser, then you might have to install a 32-bit JRE if you need Java support in the browser.

Otherwise a separate JRE installation should not be required, since the JDK installation also installs the JRE.

like image 61
Puce Avatar answered Oct 11 '22 01:10

Puce


JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on.

JDK: It is a group of utilities one needs to develop programs in Java including JRE, and the compilers and tools (like JavaDoc, and Java Debugger) to convert the source code into bytecode.

Refer: http://javarevisited.blogspot.de/2011/12/jre-jvm-jdk-jit-in-java-programming.html

Similar, post is there on below link as well.

What is the difference between JDK and JRE?

like image 21
Pratiyush Kumar Singh Avatar answered Oct 11 '22 02:10

Pratiyush Kumar Singh