问题描述
Java 编译器 (javac
)、虚拟机 (JVM) 和 java
starter 是用哪些语言编写的?
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
编写的,尽管不一定如此 - 在您的机器上运行的 JVM 是一个平台-dependent 可执行,因此 可以 最初是用任何语言编写的.例如,最初的 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 是用哪种语言编写的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!