JVM

JVM

October 1, 2023 | permanent

#

tags :

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java .

The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

wikipedia

Just-in-time Compiler (JIT) #

  • Sometimes you will find JIT alongside JVM, JDK, and JRE in textbooks. *JIT is part of the JVM that

optimizes the process of converting byte code to machine-specific language*.

  • It compiles similar byte codes at the same time and reduces the overall time taken for the compilation of byte code to machine-specific language.

Written in #

  • The very first Java compiler was developed by Sun Microsystems and was written in C using some libraries from C++.
  • Today, the Java compiler is written in Java.
  • While the JRE is written in C.
  • We can imagine how the Java compiler was written in Java like this: The Java compiler is written as a Java program and then compiled with the Java compiler written in C(the first Java compiler). Thus we can use the newly compiled Java compiler(written in Java) to compile Java programs.


Links to this note

Go to random page

Previous Next