What is the difference between JRE,JVM and JDK?
If you are a Java developer, it is very often that you think about understanding the JRE,JVM and JDK. Once if you understand these things, it would be quite easy for you to visualize things in logical manner. Also look at the picture below, that will clear
all your questions about the JRE,JVM and JDK. This article explains about the each term and will make you understand perfectly. Hope this helps. If you are happy to receive our future updates on Java, please subscribe here.
JDK (Java Development Kit)
Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc… Compiler converts java code into byte
code. Java application launcher opens a JRE, loads the class, and invokes its main method.
You need JDK, if at all you want to write your own programs, and to compile the m. For running java programs, JRE is sufficient. JRE is targeted for execution of Java files i.e. JRE = JVM + Java Packages
Classes(like util, math, lang, awt,swing etc)+runtime libraries. JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file.
JRE (Java Runtime Environment)
Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided
in JRE. If you want to run any java program, you need to have JRE installed in the system
The Java
Virtual Machine provides a platform-independent way of executing code; programmers can concentrate on writing software, without having to be concerned with how or where it will run. But, note that JVM
itself not a platform independent. It only helps Java to be executed on the platform-independent way. When JVM has to interpret the byte codes to machine language, then it has to use some native or operating system specific language to interact with the system.
One has to be very clear on platform independent concept. Even there are many JVMs written on Java, however hey too have little bit of code specific to the operating systems.
If u just want to run applets (ex: Online Yahoo games or puzzles), JRE needs to be installed on the machine.
JVM (Java Virtual Machine)
As we all aware when we compile a Java file, output is not an ‘exe’ but it’s a ‘.class’ file. ‘.class’ file consists of Java byte codes which are understandable by JVM. Java Virtual Machine interprets the
byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… JVM is platform dependent.
The JVM is called “virtual” because it provides a machine interface that does not depend on the underlying operating system and machine hardware architecture. This independence from hardware and operating system is a cornerstone of
the write-once run-anywhere value of Java programs.
There are different JVM implementations are there. These may differ in things like performance, reliability, speed, etc. These implementations will differ in those areas where Java specification doesn’t mention how to implement the features, like how the garbage
collection process works is JVM dependent, Java spec doesn’t define any specific way to do this.
- See more at: http://www.javabeat.net/what-is-the-difference-between-jrejvm-and-jdk/#sthash.Q8bQwkue.dpuf
What is the difference between JRE,JVM and JDK?的更多相关文章
- 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 ...
- J2EE,J2SE,J2ME,JDK,SDK,JRE,JVM区别
转自:http://www.metsky.com/archives/547.html 一.J2EE.J2SE.J2ME区别 J2EE——全称Java 2 Enterprise Edition,是Jav ...
- JDK,JRE,JVM区别与联系(ZZ)
http://www.cnblogs.com/hencehong/p/3252166.html 我们开发的实际情况是:我们利用JDK(调用JAVA API)开发了属于我们自己的JAVA程序后,通过JD ...
- JDK,JRE,JVM区别与联系-理解与概括
我们利用JDK(调用JAVA API)开发了属于我们自己的JAVA程序后,通过JDK中的编译程序(javac)将我们的文本java文件编译成JAVA字节码,在JRE上运行这些JAVA字节码,JVM解析 ...
- JDK,JRE,JVM区别与联系
JDK : Java Development ToolKit(Java开发工具包).JDK是整个JAVA的核心,包括了Java运行环境(Java Runtime Envirnment),一堆Java工 ...
- 对JDK,JRE,JVM的理解
JAVA用到现在还是分不太清楚JDK,JRE,JVM这三者的区别与联系,一直都是模模糊糊的.所以今天整理下此中的关系. 简单说明:我们编写的.java文件经过JDK(JDK的bin目录下javac.e ...
- 对于jdk jre jvm的简单认识
1:名词解释 jdk:java develop kit:java开发工具包 jre:java runtime environment :java开发运行时环境 jvm:java virtua m ...
- jdk jre jvm 关系
很多朋友可能跟我一样,已经使用JAVA开发很久了,可是对JDK,JRE,JVM这三者的联系与区别,一直都是模模糊糊的. 今天特写此文,来整理下三者的关系. JDK : Java Development ...
- JDK JRE JVM
使用java很久,但是一直不清楚JDK,JRE,JVM直接的关系,今天特地梳理一下. JDK:Java Development ToolKit(Java开发工具包),JDK是整个JAVA的核心,包括J ...
随机推荐
- APEC计划指引我们前进:云计算服务将上升
APEC纲领指引我们前进:云计算服务业必将兴起 这是APEC领导人的合影: 这次APEC会议通过了<北京纲领>和<亚太伙伴关系声明>,进一步明白了亚太地区经济合作的发展方向.目 ...
- Java里的日期和时间学习
Date date = new Date();//yyyy-mm-dd hh:mm:ss[.fffffffff] SimpleDateFormat sdf = new SimpleDateFormat ...
- PAT 1002 Hello World for U (20)
Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. ...
- SharePoint 2013 "通知我"简单的功能
简单的功能 "通知我"内部列表或文档库中的主要项目.加入/删除/修改等操作,用户的E- mail通知设定功能:设置列表或文档库通知的能力,有可能设置通知为一个单一的项目.这是Sha ...
- 用SignalR做类似QQ登录的应用
原文:用SignalR做类似QQ登录的应用 首先通过NuGet下载signalr包 在工程下新建一个类,继承Hub public class DemoHub:Hub { public class Us ...
- Windows Azure入门教学系列 (五):使用Queue Storage
本文是Windows Azure入门教学的第五篇文章. 本文将会介绍如何使用Queue Storage.Queue Storage提供给我们一个云端的队列.我们可以用Queue Storage来进行进 ...
- Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary lo
mysql> show slave status\G *************************** 1. row *************************** ...
- 性能测试之LoardRunner 检查点
概述 1.检查点概念 2.实例 以下是详细介绍 检查点:首先来看一下VuGen确定脚本运行成功的判断条件.在录制编写脚本后,通常就会进行回放,如果回放通过没有错误,就认为脚本是正确的.究竟VuGen怎 ...
- android优化原理
时间换时间: 数据的异步载入 分批载入. 开机加速. 时间换空间: 分页. 空间换时间: everything.exe 音乐 图库 在开机启动后, sd卡被挂载 生成数据库. 空间换空间: 8G内存 ...
- .atitit.web 推送实现解决方式集合(3)----dwr3 Reverse Ajax
.atitit.web 推送实现解决方式集合(3)----dwr3 Reverse Ajax 1. 原理实现 1 2. Page 添加配置.添加回调函数dwr.engine.setActiveRev ...