Why is java a compilation and interpretation language when jit also compiles bytecode?

I read that if a java source code is compiled into 'bytecode', then JIT is compiled into 'machine code' That is, the source code is first compiled into a platform independent platform, and then compiled into a machine specific code again So why is it called interpretation and compilation language? Explain where it happened?

Solution

There is a misunderstanding here

Under normal circumstances, the java compiler (javac) compiles java code into bytecodes and the Java interpreter (Java) interprets these bytecodes (line by line), converts them into machine language and executes them

The JIT (just in time) compiler has a somewhat different concept The JVM maintains the number of times a function is executed If the limit is exceeded, JIT will appear Java code is directly compiled into machine language, which is used to perform this function here

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>