j2me.js - a multi-threaded Java VM in JavaScript
summary
A Java VM implemented in pure JavaScript called j2me.js loads real JARs (parses ZIPs, fixes trailing-zero quirk from PDF.js), reuses Sun’s open‑sourced Java libraries because KVM lacks a usable license, and compiles bytecode to JS rather than only interpreting. Early runs are 100× slower until hot paths become native JS shims; compilation uses emscripten/asm.js ideas and an iframe eval workaround for CSP. Threads run by yielding from a VM exception loop so multithreading via VM‑yield and synchronous I/O are emulated; demos (Asteroids) run but need polish.
AI-written summary · about








