|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Compare JDK vs JRE vs JVM" |
| 4 | +author: gaurav |
| 5 | +categories: [ Java, Core Java ] |
| 6 | +featured: false |
| 7 | +toc: true |
| 8 | +description: "In this article, we will see the comparison between JDK, JRE and JVM." |
| 9 | +--- |
| 10 | + |
| 11 | +In this article, we will see the comparison between JDK, JRE and JVM. |
| 12 | + |
| 13 | +## Introduction |
| 14 | + |
| 15 | +While talking about the Java programming language we usually hear the terminologies like JDK, JRE and JVM. |
| 16 | + |
| 17 | +To understand the difference between these terminologies, let's see some use case. |
| 18 | + |
| 19 | +The Java programming language will be used by two types of users. The first ones are Developers , who develop the software's in Java and the second ones are the end-users, who use these software various purposes. |
| 20 | + |
| 21 | +## JVM |
| 22 | + |
| 23 | +JVM stands for Java Virtual Machine. |
| 24 | + |
| 25 | +It is a virtual machine which executes Java bytecode. |
| 26 | + |
| 27 | +All JVMs can understand the bytecode and convert it to respective executable instructions. This makes Java a platform-independent language. |
| 28 | + |
| 29 | +## JRE |
| 30 | + |
| 31 | +JRE stands for Java Runtime Environment. |
| 32 | + |
| 33 | +The Java programming language will be used by two types of users. Developers and end-users. JRE can be used by end-users to run the applications. |
| 34 | + |
| 35 | +The end-users does not need to develop or compile the software, they can directly run it using the JRE. |
| 36 | + |
| 37 | +JRE contains some set of libraries and JVM. |
| 38 | + |
| 39 | +## JDK |
| 40 | + |
| 41 | +JDK stands for Java Development Kit. |
| 42 | + |
| 43 | +The Java programming language will be used by two types of users. Developers and end-users. JDK can be used by developers to develop and run the the applications. |
| 44 | + |
| 45 | +The developer needs to to write a java program, he need to compile it, debug it. Once it is written and compiled successfully, He can try running it. All this can be done with JDK i.e Java Development Kit |
| 46 | + |
| 47 | +JDK contains the `javac` Java Compiler, debugging tools, JRE and JVM. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +Let's see the following diagram to understand the JDK vs JRE vs JVM |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
0 commit comments