In which language are the Java compiler and JVM written?

后端 未结 9 1743
南旧
南旧 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:09

    Jikes RVM, a self-hosting JVM used extensively for research purposes is written in Java. It's not the one people run on their desktops, but it's way up there on my list of "now let's show off the general power of the language."

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-11-28 01:26

    Actually the Oracle JVM is written in C++, not C.

    Take a look at the HotSpot JVM code here: http://openjdk.java.net/groups/hotspot/

    0 讨论(0)
提交回复
热议问题