博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jdk和jre和jvm区别_JDK,JRE和JVM之间的区别
阅读量:2534 次
发布时间:2019-05-11

本文共 3626 字,大约阅读时间需要 12 分钟。

jdk和jre和jvm区别

The difference between JDK and JRE and JVM is one of the popular interview questions. You might also be asked to explain JDK vs JRE vs JVM.

JDK与JRE和JVM之间的区别是流行的面试问题之一。 可能还会要求您解释JDK,JRE和JVM。

JDK与JRE和JVM之间的区别 (Difference between JDK and JRE and JVM)

JDK, JRE, and JVM are core concepts of Java programming language. Although they all look similar and as a programmer, we don’t care about these concepts a lot, but they are different and meant for specific purposes. It’s one of the common and this article will explain each one of these and what is the difference between them.

JDK,JRE和JVM是Java编程语言的核心概念。 尽管它们看上去都是相似的,并且作为程序员,但是我们并不太在乎这些概念,但是它们是不同的,并且针对特定目的。 这是常见的 ,本文将解释每个以及它们之间的区别。

JDK (JDK)

Java Development Kit is the core component of Java Environment and provides all the tools, executables and binaries required to compile, debug and execute a Java Program. JDK is a platform-specific software and that’s why we have separate installers for Windows, Mac, and Unix systems. We can say that JDK is the superset of JRE since it contains JRE with Java compiler, debugger, and core classes. The current version of JDK is 11 also known as .

Java Development Kit是Java Environment的核心组件,并提供编译,调试和执行Java程序所需的所有工具,可执行文件和二进制文件。 JDK是特定于平台的软件,因此我们为Windows,Mac和Unix系统提供了单独的安装程序。 可以说JDK是JRE的超集,因为它包含带有Java编译器,调试器和核心类的JRE。 JDK的当前版本为11,也称为 。

虚拟机 (JVM)

JVM is the heart of Java programming language. When we run a program, JVM is responsible for converting Byte code to the machine specific code. JVM is also platform dependent and provides core java functions like memory management, garbage collection, security etc. JVM is customizable and we can use java options to customize it, for example allocating minimum and maximum memory to JVM. JVM is called virtual because it provides an interface that does not depend on the underlying operating system and machine hardware. This independence from hardware and the operating system is what makes java program write-once-run-anywhere.

JVM是Java编程语言的核心。 当我们运行程序时,JVM负责将Byte代码转换为机器特定的代码。 JVM也是平台相关的,并提供诸如内存管理,垃圾回收,安全性等核心Java功能。JVM是可自定义的,我们可以使用java选项对其进行自定义,例如为JVM分配最小和最大内存。 JVM之所以称为虚拟的,是因为它提供的接口不依赖于底层操作系统和机器硬件。 这种与硬件和操作系统的独立性使得Java程序可以在任何地方编写一次写入。

杰瑞 (JRE)

JRE is the implementation of JVM, it provides a platform to execute java programs. JRE consists of JVM and java binaries and other classes to execute any program successfully. JRE doesn’t contain any development tools like java compiler, debugger etc. If you want to execute any java program, you should have JRE installed but we don’t need JDK for running any java program.

JRE是JVM的实现,它提供了执行Java程序的平台。 JRE由JVM和Java二进制文件以及其他类组成,可以成功执行任何程序。 JRE不包含Java编译器,调试器等任何开发工具。如果您想执行任何Java程序,则应该安装JRE,但我们不需要JDK即可运行任何Java程序。

JDK,JRE和JVM (JDK vs JRE vs JVM)

Let’s look at some of the important difference between JDK, JRE, and JVM.

让我们看一下JDK,JRE和JVM之间的一些重要区别。

  1. JDK is for development purpose whereas JRE is for running the java programs.

    JDK用于开发目的,而JRE用于运行Java程序。
  2. JDK and JRE both contains JVM so that we can run our java program.

    JDK和JRE都包含JVM,因此我们可以运行我们的java程序。
  3. JVM is the heart of java programming language and provides platform independence.

    JVM是Java编程语言的核心,并提供平台独立性。

即时编译器(JIT) (Just-in-time Compiler (JIT))

Sometimes we heard this term and being it a part of JVM it confuses us. JIT is part of JVM that optimizes byte code to machine specific language compilation by compiling similar byte codes at the same time, hence reducing overall time taken for the compilation of byte code to machine specific language.

有时我们听到这个术语,并且它成为JVM的一部分使我们感到困惑。 JIT是JVM的一部分,它通过同时编译相似的字节码来优化字节码以进行机器特定语言的编译,从而减少了将字节码编译为机器特定语言所需的总时间。

翻译自:

jdk和jre和jvm区别

转载地址:http://ptlzd.baihongyu.com/

你可能感兴趣的文章
小D课堂 - 零基础入门SpringBoot2.X到实战_第1节零基础快速入门SpringBoot2.0_3、快速创建SpringBoot应用之手工创建web应用...
查看>>
阶段3 3.SpringMVC·_07.SSM整合案例_04.ssm整合之编写SpringMVC框架
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第1节零基础快速入门SpringBoot2.0_5、SpringBoot2.x的依赖默认Maven版本...
查看>>
阶段3 3.SpringMVC·_07.SSM整合案例_08.ssm整合之Spring整合MyBatis框架
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第2节 SpringBoot接口Http协议开发实战_9、SpringBoot基础HTTP其他提交方法请求实战...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第2节 SpringBoot接口Http协议开发实战_12、SpringBoot2.x文件上传实战...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第4节 Springboot2.0单元测试进阶实战和自定义异常处理_19、SpringBoot个性化启动banner设置debug日志...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第4节 Springboot2.0单元测试进阶实战和自定义异常处理_20、SpringBoot2.x配置全局异常实战...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第5节 SpringBoot部署war项目到tomcat9和启动原理讲解_23、SpringBoot2.x启动原理概述...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第4节 Springboot2.0单元测试进阶实战和自定义异常处理_21、SpringBoot2.x配置全局异常返回自定义页面...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第8节 数据库操作之整合Mybaties和事务讲解_32..SpringBoot2.x持久化数据方式介绍...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第8节 数据库操作之整合Mybaties和事务讲解_34、SpringBoot整合Mybatis实操和打印SQL语句...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第8节 数据库操作之整合Mybaties和事务讲解_35、事务介绍和常见的隔离级别,传播行为...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第9节 SpringBoot2.x整合Redis实战_40、Redis工具类封装讲解和实战...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第9节 SpringBoot2.x整合Redis实战_37、分布式缓存Redis介绍...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第10节 SpringBoot整合定时任务和异步任务处理_42、SpringBoot常用定时任务配置实战...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第9节 SpringBoot2.x整合Redis实战_39、SpringBoot2.x整合redis实战讲解...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第14节 高级篇幅之SpringBoot多环境配置_59、SpringBoot多环境配置介绍和项目实战...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第10节 SpringBoot整合定时任务和异步任务处理_41、SpringBoot定时任务schedule讲解...
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第10节 SpringBoot整合定时任务和异步任务处理_43、SpringBoot2.x异步任务实战(核心知识)...
查看>>