Difference between JDK, JRE and JVM
With Java programming language, the three terms i.e. JDK, JRE and JVM will always be there to understand the difference between them. If you area Java developer, it is very important to know about these core concepts of Java language. Once, if you understand these things, then it would be quite easy for you to visualize things in logical manner.
So let’s begin to understand each term one by one in order to know the actual role of the three concepts.
JDK (Java Development Kit)
JDK is abbreviation of Java Development kit which is the core component of Java environment. It is a kit that is the combination of developing tools to develop Java programs and JRE (Java Runtime Environment) to run the programs.
- The developing tools includes compiler (javac.exe), Java application launcher (java.exe), Applet-viewer, etc.
- Compiler converts Java programs into byte code.
- Java application launcher opens JRE, loads the class, and invokes its main method.
- JRE is used to run the Java programs.
JDK is necessary for writing and compiling the Java program. But for running Java program, JRE is sufficient. As JRE is targeted for execution of Java files i.e. JRE = JVM + Java Packages Classes (such as util, lang, math, awt, swing, etc.) + Runtime libraries.
JDK is mainly targeted for Java development, i.e. you can create Java file (with the help of Java packages), compile a Java file, and run a Java file (with the help of JRE).
JDK is platform specific software and that is why we have separate installers for Windows, Mac and UNIX systems. We can say that JDK is superset of JRE since it contains JRE with Java compiler, debugger and core classes. Current version of JDK is 1.7 also known as Java 7.

JRE (Java Runtime Environment)
JRE is the abbreviation of Java Runtime Environment that is used to provide the runtime environment to the Java programs. JRE is smaller than JDK, so it needs less disk space and it is so because JRE does not contains and development tools such as compiler, debugger, etc.
JRE contains JVM, set of class libraries, and other supporting files. Actually, JRE is the implementation of JVM, as JVM runs the program by using class libraries and other files provided in JRE. If you only want to run any Java program, you should have JRE installed in the system, but we don’t need JDK to run any Java program.
JVM (Java Virtual Machine)
JVM is the abbreviation of Java Virtual Machine which is considered as the heart of Java programming language. It is also an abstract machine. It is a specification that provides the runtime environment in which Java byte code can be executed.
JVM (Virtual)
A Java program execution uses both, compilation and interpretation. Java programs are compiled into machine language, but it is a machine language for a computer that is, virtual and doesn’t really exists. This so-called “virtual” computer is known as the Java virtual machine.
OR
The JVM is called as “virtual”, because the machine interface that does not depend on the underlying operating system and machine hardware architecture. This independence from hardware and operating system is a corner-stone of “Write Once Run Anywhere (WORA)” value of Java program.
The machine language for the JVM (Java Virtual Machine) is called the Java byte code.”
As we all know that, when a Java file is compiled, output is not an “.exe” file but it’s a “.class” file, and .class file consists of Java byte code which is understandable by JVM. It interprets the byte code into machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, security, memory management, etc. JVM is also customizable and we use Java option to customize it, for example minimum or maximum memory to JVM.
The JVM is written for each platform supported by Java included in the Java Runtime Environment (JRE). The Oracle JVM is written in the C programming language. There are many JVM implementations developed by different organizations. They may somewhat differ in performance, reliability, speed and so on. They can too differ in implementation especially in those features where Java specification does not mention implementation details of the feature. Garbage collection is the nice example which is left on vendor’s choice and Java specification does not provide any implementation details.
JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.”
JDK vs JRE vs JVM

JIT (Just in Time Compiler)
JIT is the name of the compiler that is a part of JVM. It is an advance compiler which is used by JVM to optimize byte code into machine specific language by compiling similar byte code at same time and thus reduces the overall execution time. It also performs other optimizations such as in-lining function.

Relations between JDK, JRE, and JVM
Thank you for your patience
Difference between JDK, JRE and JVM的更多相关文章
- java学习之Java中JDK,JRE和JVM之间的关系(转载)
最近要重新抓一下java,大量扫技术文档,保存下来供自己查阅.以下转载自http://www.cnblogs.com/xiaofeixiang/p/4085159.html 初学JAVA很容易被其中的 ...
- Java中JDK,JRE和JVM之间的关系
初学JAVA很容易被其中的很多概念弄的傻傻分不清楚,首先从概念上理解一下吧,JDK(Java Development Kit)简单理解就是Java开发工具包,JRE(Java Runtime Envi ...
- Java基础知识 ——JDK,JRE和JVM
1.开发简单的Java程序过程: 名词解释: JDK:JDK是 Java 语言的软件开发工具包,主要用于移动设备.嵌入式设备上的java应用程序.JDK是整个java开发的核心,它包含了JAVA的运行 ...
- Java中JDK,JRE和JVM之间的关系-(转载)
初学JAVA很容易被其中的很多概念弄的傻傻分不清楚,首先从概念上理解一下吧,JDK(Java Development Kit)简单理解就是Java开发工具包,JRE(Java Runtime Envi ...
- JAVA语言的跨平台性和JDK,JRE与JVM
Java虚拟机--JVM ~JVM:java虚拟机简称JVM是运行所有java程序的假想计算机,是java程序的运行环境,是java最具有吸引力的特性之一,我们编写的java代码,都运行在JVM之上 ...
- 【java】JDK、JRE、JVM的关系
目录结构: contents structure [-] 什么是JDK,JRE,JVM 安装JDK的时候为什么有两个jre 专用JRE 共用JRE 共用JRE和专用JRE的对比 java的跨平台特性 ...
- Java Virtual Machine (JVM), Difference JDK, JRE & JVM – Core Java
By Chaitanya Singh | Filed Under: Learn Java Java is a high level programming language. A program wr ...
- JDK,JRE,JVM,三者的区别于联系?
万事开头难,从基础抓起! 下载JDK官网:http://www.oracle.com/technetwork/java/javase/downloads/index.html JDK:Java Dev ...
- java环境变量以及jdk、jre、jvm
一.jdk,jre,jvm的了解:jdk全称java development kit即java开发工具包,是整个java的核心,包含了java运行环境jre.java工具包和java的基础类库: jr ...
随机推荐
- 初学者接金币游戏C#+unity
- 电商设计V1(一):软件工程设计
软件工程设计的方式方法 多视图法: 全面分析软件方方面面的问题 尽早地发现和排除项目风险与不确定因素 从不同角度去展现要设计的软件系统 为项目进行不同的干系人提供指导: 逻辑架构描述系统功能,并指导系 ...
- 原生JS实现动画函数的封装
封装了一个JS方法,支持元素的基本动画:宽.高.透明度...等,也支持链式动画和同时运动. 获取元素的属性的函数并进行了兼容性处理: function getStyle(obj, attr) { if ...
- CODING 敏捷看板全新上线,助力研发管理可视化升级
在服务企业研发团队的过程中,我们发现不少团队碰到了类似的问题: 团队成员声称完成了自己的大部分任务,但团队实际交付的需求却寥寥无几? 由于某些问题导致工序一直处于等待状态,怎么识别和处理这些延迟? 成 ...
- Springboot 错误处理机制
SpringBoot默认的错误处理机制 即我们常见的白色的ErrorPage页面 浏览器发送的请求头: 如果是其他的请求方式,比如客户端,则相应一个json数据: 原理:是通过 ErrorMvcAut ...
- 什么是spring框架?spring特点与好处,使用spring框架的好处是什么?
转载:https://blog.csdn.net/hht006158/article/details/80181207. Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Ja ...
- C++之结构体特点
C++的结构体和C语言的结构体有什么不同 C++的结构体其实就是类的一种,只不过类成员默认访问权限是private,结构体默认访问权限是public. C语言的结构体是不能有函数的,而C++可以有. ...
- 搭建私人的云笔记_使用webdav服务
搭建私人的云笔记_使用webdav服务 转载注明来源: 本文链接 来自osnosn的博客,写于 2019-10-10. 手机上有很多云笔记app,大多支持云存储.可是把笔记放在别人的服务器上,总觉得不 ...
- Docker + WordPress搭建个人博客
WordPress是目前非常受欢迎的开源博客系统,今天使用Docker + WordPress搭建个人博客,整个过程非常丝滑. 搭博客先要准备域名和服务器,昨天在阿里云买了个.top的域名花了5块钱( ...
- 文字转语音?我只用十行Python代码就搞定了!
详细使用教程 1.没安装Python的小伙伴需要先安装一下 2.win+r输入cmd打开命令行,输入:pip install baidu-aip,如下安装百度AI的模块. 3.新建文本文档,copy如 ...