Ask HN: How JVM works? I am developing Similar Virtualization

1 points by Hashex129542 18 hours ago

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

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?

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.

gregjor 17 hours ago

I’d go with the complete new OS option.

  • Hashex129542 16 hours ago

    +1, it's definitely best option.

    That said, we're building consumer-facing apps where long-term stability is critical. Our goal is to build once and run on any platform, across versions. Most consumers are already tied to existing platforms that provide services we can't easily replicate, which makes development of apps in a new OS or In a OS look like environment is a tough sell.

    I must follow same technical mechanism as Java.

    • exabrial 2 hours ago

      Why not just use Java then? There's an unbelievable amount of open source work you can leverage

    • gregjor 13 hours ago

      I joked. You should use Java. Few companies have the resources to duplicate Java and the JVM in a reasonable time. At this point Java and the JVM have three decades and tens of thousands of developers backing them up.