Bytecode

Java Bytecode Manipulation & JVM Languages

The Java bytecode format (class files) is a stable, documented target. Because the JVM executes bytecode rather than source, any JVM language can compile to it, and runtime libraries can generate or transform classes after compilation. This is what powers proxies, ORMs, mocking frameworks and most modern frameworks' cleverness.

If you need to read or transform class files directly, ASM is the low-level Swiss-army knife with the smallest dependency footprint. If you want to generate classes at runtime with a friendlier API, Byte Buddy raises the level far above raw ASM. For whole programs on the JVM, the alternative-language ecosystem (Kotlin, Groovy, Scala, Clojure) is the practical way to express more with less.

What you'll find here: Low-level class-file reading & rewriting with ASM · Runtime code generation & proxies with Byte Buddy · Understand the class-file & verification model · The JVM language ecosystem compiled to bytecode

Bytecode tools

In-depth guides in this category