I Put a Full JVM Inside a Browser Tab. It "Works". Technically. Eventually.
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
JavaBox is a proof-of-concept project that runs a full JVM inside a browser tab with zero server involvement. The stack layers OpenJDK 21 on Alpine Linux inside QEMU, compiled to a 227MB WebAssembly blob served via a Cloudflare Worker. To avoid 12-minute JVM cold-start times per compile, the author built a persistent JVM daemon called CompileServer that stays alive across QEMU snapshots, reducing compile+run time to ~35 seconds after a ~20-second boot. The total time from page load to 'Hello World' is about 55 seconds. Potential use cases include interactive Java documentation and shareable code snippets with no backend costs. The project demonstrates what modern browsers can do with WebAssembly, SharedArrayBuffer, and container snapshot technology.
Table of contents
The Stack That Should Not ExistThe Problem With Doing This The Obvious WayCompileServer, or How I Learned to Stop Spawning and Love the DaemonThe NumbersWhat We’re Thinking About Using It ForHow To Try ItWhat I Learned2 Comments
Sort: