Explain JDK and JRE

Learn: Here we will learn about JDK and JRE and what are the core concepts of JDK and JRE and what the difference between JDK and JRE is? By Preeti Jain Last updated : January 02, 2024

JDK (Java Development Kit)

  • JDK stands for Java Development Kit.
  • JDK provides an environment or platform to develop or Run java applications
    For Example: If I am a developer, so I need JDK by which I can develop (JDK provides a platform to write java code) or run java applications (How application is working?).
  • JDK = JRE (JVM + Libraries) + Development Tools (It means JDK is a combination of JRE and Development Tools).
  • In JDK Development tools like Compiler, debugger etc.
  • In JDK Development tools like Compiler, debugger etc. In JDK (Develop program (Sample.java) → Compile program (Sample.class) → Executes (Display Welcome Java).
  • JDK is a 3 step process
    • Write java code.
    • Compile java code.
    • Execute java code.

JRE (Java Runtime Environment)

  • JRE stands for Java Runtime Environment.
  • JRE provides an environment or platform to run java applications. It provides Runtime Environment. Here we are talking about executing java applications (i.e. provide facility to run developed java application).
  • JRE contains sets of libraries and JVM use those libraries at Runtime.
    For Example: If I am a Client or buyer of the java application so I need JRE by which I can run (JRE provides a platform to Run) java application I don't need to develop or write java application.
  • JRE = JRE (JVM + Libraries). It means JRE is a combination of JVM and Libraries).
  • JRE is a part of JDK but not vice versa.
  • In JRE (Compiled program (Sample.class) → Executes (Display Welcome Java).
  • JRE is a 1 step process: 1) Execute Compiled Code.
  • JRE physically exists in the system (i.e. No virtual kind of machine or no abstract in nature).
  • To run any java code JRE is minimum required.

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.