jdk vs jre

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Delaney martin
    Senior Member
    • Jun 2022
    • 101

    jdk vs jre

    What is jdk, jre & jvm? What is the difference between them?
  • Ryaan J.
    Senior Member
    • Apr 2022
    • 102

    #2
    JVM: The JVM, short for Java Virtual Machine, is the central engine driving the Java programming language. When executing a Java program, the JVM translates bytecode into machine-specific instructions. Notably, the JVM's behavior is contingent upon the underlying platform, rendering it platform-dependent. It offers essential functionalities within the realm of Java, encompassing memory management, garbage collection, security, and more.

    The JVM's behavior can be tailored by utilizing Java options, facilitating customizations like memory allocation parameters—defining both minimum and maximum memory limits. The term "virtual" in JVM signifies its capacity to provide an interface that remains detached from the intricacies of the underlying hardware and operating system. This abstraction from hardware and OS particulars imparts the unique quality of "write once, run anywhere" to Java programs.

    JDK: JDK stands for Java Development Kit. It functions as a software development environment for crafting Java applications and applets. It possesses a tangible existence, encompassing the Java Runtime Environment (JRE) and an array of development tools.

    The JDK serves as an instantiation of one of the Java Platforms introduced by Oracle Corporation, which could be any of the following:
    • Java Platform, Standard Edition
    • Java Platform, Enterprise Edition
    • Java Platform, Micro Edition
    Contained within the JDK is a dedicated Java Virtual Machine (JVM) along with supplementary resources like an interpreter/loader (Java), a compiler (javac), an archiver (jar), and a documentation generator (Javadoc). These components collectively facilitate the comprehensive development of Java applications.

    JRE: The Java Runtime Environment (JRE) embodies the embodiment of the Java Virtual Machine (JVM), establishing a platform for the execution of Java programs.

    Within the JRE framework, one encounters the JVM, Java binaries, and an assortment of classes indispensable for the successful execution of any given program.

    The JRE does not encompass developmental tools like the Java compiler, debugger, or JShell. If the sole objective is the execution of Java programs, opting for the JRE installation suffices. The Java Development Kit (JDK) becomes unnecessary as there's no demand for developing or compiling Java source code.

    With this foundational grasp of JDK, JVM, and JRE, let's delve into their differences:

    1) The JDK serves as a toolkit for software development, while the JRE functions as a bundled software package enabling the execution of Java programs. On the other hand, the JVM provides an environment specifically designed for the execution of bytecode.

    2) Within the JDK, you'll find various tools catering to development, debugging, and more. Contrarily, the JRE houses class libraries and ancillary files, excluding software development tools. Meanwhile, the JVM solely focuses on bytecode execution and doesn't encompass any software development functionalities.

    3) The JDK is bundled with an installer, whereas the JRE exclusively encompasses the environment needed for executing source code. Meanwhile, the JVM is packaged within both the JDK and JRE software.

    Comment

    Working...
    X