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
基础教程推荐
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Struts2 URL 无法访问 2022-01-01
