Java编译器和JVM用哪种语言编写? [英] In which language are the Java compiler and JVM written?
问题描述
哪些语言是Java 编译器( javac
),虚拟机(JVM)和 java
首先写的?
In which languages are the Java compiler (javac
), the virtual machine (JVM) and the java
starter written?
推荐答案
这个问题的准确措辞有点误导:它不是 JVM或编译器因为多个JVM供应商(jrockit是一个,IBM另一个)和多个编译器在那里。
The precise phrasing of the question is slightly misleading: it is not "the JVM" or "the compiler" as there are multiple JVM vendors (jrockit is one, IBM another) and multiple compilers out there.
-
Sun JVM 用
C $ c $编写c>,虽然不一定是这种情况 - 在您的机器上运行的JVM是平台相关的可执行文件,因此 最初可以用任何语言编写。例如,原始IBM JVM是用 Smalltalk
The Sun JVM is written in
C
, although this need not be the case - the JVM as it runs on your machine is a platform-dependent executable and hence could have been originally written in any language. For example, the original IBM JVM was written in Smalltalk
Java库( java.lang
, java.util
等,通常称为 Java API )本身是用Java编写的,尽管标记为 native
将以 C
或 C ++
编写。
The Java libraries (java.lang
, java.util
etc, often referred to as the Java API) are themselves written in Java, although methods marked as native
will have been written in C
or C++
.
我相信Sun提供的Java编译器也是用Java编写的。 (虽然再次有多个编译器)
I believe that the Java compiler provided by Sun is also written in Java. (Although again, there are multiple compilers out there)
这篇关于Java编译器和JVM用哪种语言编写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!