Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need both JDK and JRE?

Tags:

java

eclipse

I used to have JRE 7 before, and now I installed JDK 8 and deleted my JRE 7 folder. I'm using Eclipse Kepler, and I added JDK 1.8 to my installed JRE's. Can I delete the JRE 1.8 folder as it's taking up space in my computer? Will it cause any problems?

like image 471
Chris Daniel Avatar asked Oct 07 '15 09:10

Chris Daniel


People also ask

Is JRE and JDK both required?

The JDK includes the JRE, so you do not have to download both separately. If you need the JRE on a server and do not want the ability to run RIAs, download the Java SE Server JRE.

Can JDK be installed without JRE?

And no, you don't need to create your own JRE. Just install the OpenJDK on the client machines and make sure you add the $JAVA_HOME/bin to the system path, just as you had to do with old JREs.

Do I need JDK or JRE for Java?

It is capable of creating and compiling programs. Usually, if you only care about running Java programs on computer you will only install the JRE. It's all you need. On the other hand, if you are planning to do some Java programming, you need to install the JDK instead.

Is JDK included in JRE?

Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (Java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), and other tools needed in Java development.


2 Answers

JRE is a part of JDK.

No need to have JRE when you have JDK. If you open JDK folder and see, you'll have JRE folder inside it which is the same of JRE folder initially you have.

like image 60
Suresh Atta Avatar answered Sep 19 '22 13:09

Suresh Atta


As all have said that JDK includes JRE, that is perfectly right.

But let me add more on it to fulfill an industrial Structure.

While an employee works on some project, they need JDK for they need to write code as well as compile it. But after the development process completes, the software is ready to deliver and the client's machine will have to choose whether JDK is needed or the JRE.

I would recommend to install JRE on clients' machines because clients don't have to compile the code. Clients always goes straight forward to execute it.

So, make sure to install JRE on clients' machines, not JDK. It will give the advantage of Memory - Utilization too.

Thanks.

like image 40
Vishal Gajera Avatar answered Sep 20 '22 13:09

Vishal Gajera