What is the difference between SDK, JDK, OpenJDK, JRE, JVM, java compiler in java platform ?

  • Updated : 19-06-2024 11:44
  • By : Phosphataz
  • Introduction


    Even if you are new in software development, you might have hear about terms like SDK, Compiler especially in java world, there is more. In this post we will take a look at terms used in java world that are necessary to know.


    SDK


    SDK standing for Software Development Kit, also called sometimes devkit is a generic term that is use to group a set of tools or utilities that help developers to build softwares.

    Depending on the platform, sdk might includes : compiler, debugger, Libraries, Documentations.

    Example of sdk : Android SDK, OpenJDK


    JDK


    JDK stands for Java Development Kit, it's the SDK for java platform. JDK contains multiples components such as : JRE (see below), Java Compiler and debugger, Libraries, Documentations.


    OpenJDK


    OpenJDK is the Open Source JDK version of oracle JDK. They are both java development kit.


    JRE


    JRE stand for Java Runtime Environment, it's a tool, part of JDK that serve to execute java programs. If one have a java compiled program, the last piece to run it program is JRE which contains necessary components that enable java programs to run on a system. JRE made java really cross platform.

    JRE components are : JVM(see below), Toolkits for graphic, Libraries.

    JVM

    JVM stands for Java Virtual Machine. It's an interpreter who convert java bytecode into machine code. It's part of JRE and is platform dependent, as it generate machine code depending on the machine on which the JRE is installed.

    In general when java source code is compiled by the compiler, it's procuce a new file containing java bytecode, the bytecode file is given to the JRE and JRE call the JVM to interpret the bytecode into machine code and run the program.


    Javac


    Javac is the java compiler which is part of JDK. It compile the java source code into bytecode.

    To compile a java program

    Type :

    // HelloWorld.java is the file containing the source code.
    javac -jar Helloworld.java
    


    Conclusion


    Thanks for visiting our platform. Here is a picture that resume the post