A Java bytecode toolkit written entirely in TypeScript. Read .class files, lift them to an IR, analyze them, and decompile them back to source — all without a JVM.
Note
We have a public accessible version available at https://javaswan.com.
I also wrote a blog post, would mean the world if you could read it :)
https://shanyu.juneja.net/thoughts/self-improving-decompiler/
FocuSee.Project.2026-03-05.19-16-09.mp4
| Package | Description |
|---|---|
@blkswn/java-asm |
TypeScript port of OW2 ASM. Read, write, and transform raw bytecode. |
@blkswn/java-ir |
Intermediate representation. Lifts stack bytecode into typed expressions and a control flow graph. |
@blkswn/java-analysis |
Analysis framework. Class hierarchy, call graphs, constant folding, optimization passes. |
@blkswn/java-decompiler |
Decompiler. Turns bytecode into readable Java source. |
@blkswn/java-decompiler-ai |
AI cleanup pass. Renames variables, fixes formatting artifacts in decompiled output. |
| App | Description |
|---|---|
similarity-eval |
Benchmark harness. Scores decompiler output against original source using 9 similarity metrics. |
web |
Web UI. Interactive decompiler with Monaco editor. |
java-format-cli |
Java source formatter (Palantir). Used by the eval pipeline. |
decompilers |
Bundled reference decompilers (CFR, Procyon, Vineflower) for benchmarking. |
.class / .jar file
│
▼
java-asm read/write raw bytecode
│
▼
java-ir lift to expressions + control flow graph
│
▼
java-analysis resolve types, optimize, fold constants
│
▼
java-decompiler reconstruct Java source
│
▼
java-decompiler-ai (optional) clean up variable names + formatting
# install
bun install
# build everything
bun run build
# run tests
bun run turbo run testBuild a single package:
turbo run build --filter=@blkswn/java-asmBSD-3-Clause