What is the use of JVM if JIT is performing bytecode conversion to machine instructions

后端 未结 4 1201
一个人的身影
一个人的身影 2020-12-23 17:19

I am really struggling to understand the following thing

Previously I know:

When a Java program is compiled .class file will be generated. In th

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-23 17:47

    The Java Virtual Machine (JVM) provides the entire environment for running a Java program. It integrates with the Operating System, loads classes, and runs programs. The Just-In-Time compiler (JIT) is just a small piece that can be disabled (-Xint) but when enabled, provides a useful improvement in performance. There have been implementations of the JVM that didn't include a JIT, and implementations that worked by pre-compiling Java to machine code just the same as traditional languages, such as C or C++.

提交回复
热议问题