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 ...
随机推荐
- js注册检测 用户名、密码、手机号、邮箱
请输入电话号码:<input name="" type="text" id="telphone" value="" ...
- rowid结构浅析
select rowid from dual AAAAB0AABAAAAOhAAA rowid结构如下: 对象号 文件号 块号 行号 XXXXXX XXX XXXXXX X ...
- sort uniq妙用
cat a b | sort | uniq > c # c是a和b的并集 cat a b | sort | uniq -d > c # c是a和b的交集 cat a b b | s ...
- wxWidgets帮助文档(1)
IMPLEMENT_APP IMPLEMENT_APP(className) 这是在应用程序中使用类的实现文件的应用程序类wxWidgets动态建筑.你用这个代替Old form: MyApp myA ...
- ARMv8 Linux内核head.S源码分析
ARMv8Linux内核head.S主要工作内容: 1. 从el2特权级退回到el1 2. 确认处理器类型 3. 计算内核镜像的起始物理地址及物理地址与虚拟地址之间的偏移 4. 验证设备树的地址是否有 ...
- Xcode4.6 自制iOS可用的 Framework
First of all:新建一个空白project. File->New->Project 然后新建两个文件 File->New->File 如图 然后选择targets ...
- EasyUI - pagination 分页组件
总页数是手动填写,后续进行更改……………… 效果: html代码: <!--使用标签创建--> <%--<div id="pp" class="e ...
- Delphi中拖动无边框窗口的5种方法
1.MouseMove事件中加入: // ReleaseCapture;// Perform(WM_SYSCOMMAND, $F017 , 0); 2.MouseDown事件中加入: // POSTM ...
- WordPress的用户系统总结
原文发表自我的个人主页,欢迎大家訪问~转载请保留本段,或注明原文链接:http://www.hainter.com/wordpress-user-module keyword:WordPress,用户 ...
- S3C6410 纯粹的裸机启动,自己写的SD BOOT启动
这几天晚上一直折腾S3C6410的裸机SD卡启动,不大想使用UBOOT,我是搞硬件的,对底层非常感兴趣,不喜欢已经写好的,因此自己一直在尝试,其实很早之前就试过SD卡启动,也就是ARM11上电后会把S ...