0% found this document useful (0 votes)
6 views1 page

Why Do We Install JDK Instead of Just JRE

The JDK (Java Development Kit) is preferred over the JRE (Java Runtime Environment) because it includes the JRE, which allows for running Java applications, along with additional tools necessary for development such as the Java compiler. Since Java 11, standalone JRE installers are no longer provided, making the JDK the primary distribution for both development and production environments. Therefore, for any development work, the JDK is essential as it enables compiling and running Java code, which the JRE alone cannot do.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Why Do We Install JDK Instead of Just JRE

The JDK (Java Development Kit) is preferred over the JRE (Java Runtime Environment) because it includes the JRE, which allows for running Java applications, along with additional tools necessary for development such as the Java compiler. Since Java 11, standalone JRE installers are no longer provided, making the JDK the primary distribution for both development and production environments. Therefore, for any development work, the JDK is essential as it enables compiling and running Java code, which the JRE alone cannot do.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Why do we install JDK instead of just JRE?

✅ JDK (Java Development Kit) vs. JRE (Java Runtime Environment):

Component Purpose
JRE Lets you run Java applications (contains the JVM + runtime libraries).
Lets you develop and run Java applications (includes the JRE + compiler (javac) + build tools
JDK
like jar, javadoc, etc.).

🔸 Why JDK is enough (and JRE is not needed separately):

1. JDK includes the JRE:


o When you install the JDK, it already comes bundled with the JRE (including the JVM and core
libraries).
o So you don’t need to install JRE separately — it’s already part of the JDK.
2. Modern Java (since Java 11+) does not have a separate JRE installer:
o Oracle and OpenJDK stopped distributing standalone JREs.
o Java is now distributed primarily via JDKs, especially for development and production
environments.
3. For development, you need the compiler (javac):
o If you’re writing Java code, compiling it, or running tools like Maven or Gradle — you need the
JDK.
o The JRE alone can't compile .java files.

Summary

Use Case What to Install


Run Java apps only (end-user) JRE (but bundled inside JDK)
Develop Java apps (compile/run) ✅ JDK
Modern systems (Java 11+) ✅ JDK (JRE not shipped separately)

You might also like