区别:JDK,JRE,JVM,JIT

JDK:java development kit,oracle(现在是sun)的一个产品,不仅包含了jre,还有compiler,debugger等等,相当于eclipse。

JRE:java runtime environment,就是平常电脑没有java要下载的java程序,把我搞死的那个sas就是通过这个。。。这是为了提供一个统一的平台,让所有java的program或application能运行。

上述这两个,JRE是只用来run 程序的,JDK是用来编译开发的,JDK里有JRE里没有的javac的compiler,只要下了jdk就不用下JRE了。

JVM:java virtue machine,这是jre的一个实例,就是经常说的interpretor。According to Wikipedia:

The JVM, which is the instance of the 'JRE' (Java Runtime Environment), comes into action when a Java program is executed. When execution is complete, this instance is garbage collected. JIT is the part of the JVM that is used to speed up the execution time. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.

JIT:just in time,在上边一段有提及,说到这就得说起java program的compilation过程了,上图:

当jvm 做interpretation的时候,发现有部分code是hot spot,于是乎,just-in-time(顾名思义,及时地)发现,然后这段code继续compile到机器码,于是乎,cpu可以干活了,速度显著提高,through this way来优化。(http://nullpointer.debashish.com/primer-difference-between-javac-and-jit

总结一下,上图(http://javapapers.com/core-java/differentiate-jvm-jre-jdk-jit/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值