Week 39 — What is the difference between JRE and JDK
Question of the Week #39
What is the difference between JRE and JDK
14 Replies
JDK(Java Development Kit) is used to develop Java applications.JRE(Java Runtime Environment) is the implementation of JVM(Java Virtual Machine) and it is specially designed to execute Java programs
I only know this much, ;-; beginner
Submission from livekiller.
JRE = Java Runtime Enviroment
JDK = Java Development Kit
Whilst JRE is used for running java applications on your machine, JDK can also be used for developing.
Submission from laur.gg
JDK stands for Java Development Kit, and is composed of the JRE (Java Runtime Environment), the Java compiler (javac) and other tools needed for development of Java applications. JRE, on the other hand, is the execution environment for Java Applications, against which is executed every JAR or Java-based binary executable application.
Submission from dazatovarj
JRE stands for Java Runtime Enviornment and allows users to run Java programs. JDK stands for Java Development Kit and allows users to create Java programs.
Submission from that.zero
"JAVA DEVELOPMENT KIT
(JDK)" is primarily used by developers to create Java applications, while the "JAVA RUNTIME ENVIRONMENT (JRE)" is used by end-users to execute those applications. The JDK includes the JRE, so when you install the JDK, you also get the JRE along with development tools.
In Summary we can say that JDK contains Java compiler(i.e.,javac) along with java libraries whereas JRE contains runtime environment for java based applications and also contains . It also includes *JAVA VIRTUAL MACHINE (JVM) ", which is responsible for the running of Java bytecode.End users who want to run the java applications on their machines require JRE.
Submission from satyaswaminadhyedida
It is a software package that you can use to develop Java-based applications. Java Runtime Environment is a plug-in needed to run java programs. You need the Java Development Kit to develop Java applications. JRE is smaller than JDK, so it requires less Disk space.
Submission from mustafa_ugur
JDK or Java Development Kit is a devlopment feature in java that helps you make java programs such kits have numerous feature's like compilers , de-buggers ,etc.
JRE (Java Runtime Environment) on the other hand is an implementation of Java Virtual Machine is specifically designed to execute the code written by the user
Submission from antimony1769
The Java runtime environment (JRE) is a software that lets you run jar files for example if you play minecraft you’re using the JRE because minecraft uses Java and too run Java applications you need the JRE. The JDK on the other hand is a software that lets you write code in Java this can be done using the help of IDE’s like IntelliJ, eclipse. The JDK includes the JRE so after you write some code you can run it without having to separately download the JRE
Submission from gameboyv
The JRE is the Java runtime environment. This is what people would use for a normal install of Java if they aren’t planning on developing anything. It also has a different version number than the JDK. JDK stands for Java development kit and it is used when you plan on writing Java code. There are also multiple different vendors for the JDK, one being openJDK.
Submission from becauseisaid
JRE: which is the environment for Java program to run. JDK: which is for Java development purpose. It provides tools, executables and binaries required to compile, debug and execute a Java program.
Submission from air_supply95
The JDK contains debugging and more tools for development and also the JRE itself.
JRE alone only contains the JVM and library classes. It is a part of JDK
Submission from bhavraj
The java runtime environment just lets you run java code, but the java development kit lets you compile java, uncompile java, along with other features for devs to use to write java programs.
Submission from mochatitan
The terms JRE (Java Runtime Environment) and JDK (Java Development Kit) are commonly used in the Java programming world. Here's a breakdown of the differences between the two:
Definition:
JRE (Java Runtime Environment): It is an environment in which Java bytecode can be executed. It provides the necessary libraries, Java Virtual Machine (JVM), and other components to run applets and applications written in Java.
JDK (Java Development Kit): It is a superset of the JRE and contains everything that the JRE has, plus tools for developing, debugging, and monitoring Java applications and applets.
Components:
JRE:
Java Virtual Machine (JVM)
Core libraries
Additional libraries to support various functionalities
JDK:
All the components of the JRE
Java compiler (javac)
Debugger (jdb)
JavaDoc tool (javadoc)
Other development tools
Usage:
JRE: It's mainly for users who just want to run Java applications. If you only need to execute a Java program, you'd typically only need the JRE.
JDK: It's for Java developers. If you're planning to develop, compile, or debug Java applications, you'd need the JDK.
Installation:
When you install the JDK, the JRE is also installed because the JDK requires the JRE to run. However, you can install the JRE independently without the JDK.
Deployment:
JRE: It's often distributed with standalone Java applications to ensure that they run consistently regardless of the configuration of the host system.
JDK: It's typically installed on development machines to provide the necessary tools for Java developers.
In summary, if you're a Java developer or planning to do any Java development, you'll need the JDK. If you're just looking to run a Java application, the JRE should suffice.
⭐ Submission from ledmaster22_
A JRE (Java Runtime Environment) contains all necessary components for running Java applications. Once a JRE is installed, Java applications can be run using the
java
or javaw
commands.
On the other hand, a JDK (Java Development Environment) also contains what is required for developing Java applications, for example the Java compiler (javac
). Everything included in the JRE is also included in the JDK. Some modules like java.compiler
are only available in JDKs.
For example, assume the following Hello World application:
Assuming, this is saved to a file called HelloWorld.java
, it can be compiled to a file HelloWorld.class
using the command javac HelloWorld.java
.
This only works with a JDK.
Once the application has been compiled, it can be run using the command java HelloWorld
. For doing this, a JRE is sufficient.
If a JDK is installed, it's possible to skip the step of explicitly compiling applications containing of a single source file and just run java HelloWorld.java
. This will compile and run the application but it will not create a HelloWorld.class
file.⭐ Submission from dan1st