How can a JVM be written in Java(如何用 Java 编写 JVM)
问题描述
我正在简要阅读 Maxine 这是一个用 Java 编写的开源 JVM 实现.这对我来说听起来很循环.如果java需要虚拟机来运行,那么虚拟机本身如何用Java编写(VM代码不会需要在其中运行的VM,等等?).
I was briefly reading about Maxine which is an open source JVM implementation that written in Java. This sounds circular to me. If java requires a virtual machine to run in, how can the virtual machine itself be written in Java (won't the VM code require a VM in which to run, and so on?).
编辑:好的,所以我发现我忽略了 Java 不必在 VM 中运行的事实.那么如何解释如何用 LISP 编写 LISP 编译器呢?还是应该完全是一个新问题?
Edit: Ok, so I see I overlooked the fact that Java doesn't have to run in a VM. How then does one explain how a LISP compiler can be written in LISP? Or should this be a new question altogether?
推荐答案
您一开始就认为 Java 需要虚拟机是不正确的.查看项目 GCJ:GNU 编译器用于 Java 编程语言.
Your assumption that Java requires a virtual machine is incorrect to begin with. Check out the project GCJ: The GNU Compiler for the Java Programming Language.
这篇关于如何用 Java 编写 JVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何用 Java 编写 JVM


- C++ 和 Java 进程之间的共享内存 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01