请问HN:JVM是如何工作的?我正在开发类似的虚拟化技术。
我的公司被分配了开发一个通用虚拟机的任务,类似于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 & it'll have own doc, application gallery, install/uninstall system.