请问HN:JVM是如何工作的?我正在开发类似的虚拟化技术。

1作者: Hashex1295427 个月前原帖
我的公司被指派开发一个通用虚拟机,类似于JVM,用于运行我们自己的自定义字节码和脚本。我了解JVM的内部工作原理,但我不明白以下几点: 1. 在macOS上,如何识别一个入口的 `.class` 文件作为一个独特的应用程序,并且拥有独立的文档图标? 2. 类文件是如何与Java运行时环境进行通信的? 附言:起初我考虑开发一个全新的操作系统环境,也就是说虚拟机将字节码视为文档,并且会有自己的文档、应用程序库以及安装/卸载系统。
查看原文
My company has been assigned the task of developing a general-purpose virtual machine, similar to the JVM, to run our own custom bytecode and scripts. I understand how the JVM works internally, but I don’t understand<p>How a entry `.class` file is recognized as a unique application on macOS and having separate doc icon? How the class files communicates Java Runtime Environment?<p>PS: First I thought to develop a complete new OS like environment, means the VM considers the byte code as document &amp; it&#x27;ll have own doc, application gallery, install&#x2F;uninstall system.