A
A
Arkady Vinogradov2021-01-30 01:36:26
JVM
Arkady Vinogradov, 2021-01-30 01:36:26

JVM interprets bytecode into machine code?

60148da26ceae145804544.png
After the bytecode is in the jvm, does the jvm interpret the code into machine code, or does it just compile? What is happening directly in the JVM please tell me

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Orkhan Hasanli, 2021-01-30
@usov-dmitriy

Hello!
Whether the JVM will compile or interpret the bytecode depends on the platform.
Read here, this resource - Link
Here, a similar question - https://qna.habr.com/q/897579?e=10433021#comment_2...
Summing up, depending on the execution environment, the bytecode can be:
- compiled beforehand and executed as native code (similar to most C++ compilers)
- compiled (JIT) and executed
- interpreted
- directly executed by a supported processor (bytecode is a native instruction set of some processors)

D
Developer, 2021-01-30
@samodum

JVM translates bytecode into machine code directly for the platform on which it is executed: Windows, Mac, Linux. This can be either an interpreter or a JIT compiler, depending on the implementation on a particular platform.
https://www.freecodecamp.org/news/jvm-tutorial-jav...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question