Most tutorials teach you what to write. This series explores how the JVM actually runs it.
This second chapter dives deep into the .class file, leaving the source code behind. We'll follow the journey of a simple literal — from a token to a structured entry in the constant_pool, and finally onto the operand stack via a specific bytecode instruction.
In this article, you'll explore:
- The structure and purpose of the Run-Time Constant Pool.
- How the JVM uses different instructions (
ldc,bipush,iconst) to load constants efficiently. - The internal representation of primitive types (e.g., why
booleanis treated as anint). - The mechanics of String Interning and the evolution of string concatenation with
invokedynamic.
This isn't another high-level overview. It's a deep dive into the arcane machinery of Java SE 25, built directly on the Java Virtual Machine Specification.
Read the full article: https://eldritch.codes/en/tome/tome-02-jvm-runtime/chapter-01
Part of the "Eldritch Codes" series — a comprehensive guide to Java SE 25, explored through the lens of the JVM and the original specs.
Top comments (0)