Flagon compiles desktop Java bytecode into browser-native WebAssembly GC and JavaScript using TeaVM, reimplementing LWJGL 2 & 3, OpenGL, OpenAL, OPFS filesystem persistence, and socket networking over browser APIs.
Try the demos and the Java playground at flagon-nu.vercel.app. The playground compiles with javac and TeaVM in the browser; build it with make playground. The docs are on the same site.
Current target is Minecraft 1.8.9, currently loads singleplayer worlds in Chromium and Firefox.
Important
Flagon is not affiliated with or endorsed by Mojang Studios or Microsoft. It does not distribute Minecraft or any proprietary third-party content. Users must independently supply their own JAR files and assets, and are responsible for ensuring they have the necessary rights to use them. Flagon is not intended to facilitate software piracy or copyright infringement.
Future:
- Speed up startup and optimize bundle size
- Native modded minecraft(packaged into bundle, FabricMC)
- Equal functionality across 1.8.9, 1.12.x, 1.20.x, and modern versions
- Flagon CLI on Homebrew/MacPorts
- 3.0: Vulkan, OpenGL ES, freetype, shaderc, spvc, stb, assimp support
- WebGPU(WGSL) option
- Native C->Executable backend
Requires JDK 25+ and Bun.
make setup # Install dependencies
make bundles # Compile and output bundles
make dev # Start dev server at http://127.0.0.1:5273To test a standalone JAR without setup, drop it into vendor/ and run make app (see Packaging).
Note
Networking (make serve): host static build with the WSS-to-TCP bridge (see Socket proxy).
make test # JVM unit tests
make browser # Playwright tests (Chromium & Firefox on both backends)
make check # Full CI run| Project | Target Input | Graphics Pipeline | Sockets & Filesystem | License |
|---|---|---|---|---|
| Flagon | Unmodified JAR | Reimplemented on WebGL2 (LWJGL 2 & 3) | OPFS persistence + Proxied TCP | MIT |
| TeaVM | Source / Bytecode | None (core classlib only) | In-memory only | Apache 2.0 |
| CheerpJ | Unmodified JAR | JVM virtualization (no desktop LWJGL) | Emulated virtual FS | Proprietary |
| Eaglercraft | Forked 1.8/1.12 Source | Custom WebGL port (Minecraft only) | IndexedDB / Local | Contested |
Licensed under MIT.
