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

1 Hashex129542 3 6/28/2025, 1:49:48 AM
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.

Comments (3)

gregjor · 5h ago
I’d go with the complete new OS option.
Hashex129542 · 4h 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.

gregjor · 2h 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.