In which language are the Java compiler and JVM written?

后端 未结 9 1796
南旧
南旧 2020-11-28 00:28

In which languages are the Java compiler (javac), the virtual machine (JVM) and the java starter written?

9条回答
  •  执笔经年
    2020-11-28 01:18

    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.

提交回复
热议问题