我有一个关于 JVM 的非常基本的问题:它是编译器还是解释器?
I have a very basic question about JVM: is it a compiler or an interpreter?
如果是解释器,那么JVM内部存在的JIT编译器呢?
如果两者都不是,那么 JVM 到底是什么?(我不想要将字节码转换为机器特定代码等的JVM的基本定义.)
If it is an interpreter, then what about JIT compiler that exist inside the JVM?
If neither, then what exactly is the JVM? (I dont want the basic definition of jVM of converting byte code to machine specific code etc.)
首先,让我们对以下术语有一个清晰的认识
First, let's have a clear idea of the following terms
Javac
是 Java Compiler -- 将你的 Java 代码编译成 Bytecode
Javac
is Java Compiler -- Compiles your Java code into Bytecode
JVM
是 Java 虚拟机 -- 运行/解释/翻译字节码为 本机机器码
JVM
is Java Virtual Machine -- Runs/ Interprets/ translates Bytecode into Native Machine Code
JIT
是即时编译器——在本地执行之前将给定的字节码指令序列编译为 runtime 的机器码.它的主要目的是对性能进行大量优化.
JIT
is Just In Time Compiler -- Compiles the given bytecode instruction sequence to machine code at runtime before executing it natively. It's main purpose is to do heavy optimizations in performance.
现在,让我们为您的问题寻找答案.
1)JVM:它是编译器还是解释器?
-- Ans:解释器
2)JVM中存在的JIT编译器呢?
-- Ans:如果你完整阅读了这个回复,你可能现在就知道了
2)what about JIT compiler that exist inside the JVM?
-- Ans: If you read this reply completly, you probably know it now
3)JVM到底是什么?
-- Ans:
.class
文件加载到RAM中.class
file into the RAM希望这对您有所帮助..
Hope this helped you..
这篇关于JVM 是编译器还是解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!