Unveiling the Hidden Layers of Java Class Files Beyond Bytecode
summary
Shows how to read class files with javap -c -b and spot ACC_SYNTHETIC and ACC_BRIDGE entries, explains that compilers emit synthetic and bridge methods (covariant returns) and that JDK 11 introduces NestHost/NestMembers to replace synthetic accessors, contrasts pre-11 synthetic accessors with nestmates, and traces string concatenation moving to invokeDynamic (bootstrap concat factory). Demonstrates a JDK22 compilation bug that uses ~1.1 GB and ~225 s with C2 (fixed in JDK23) and describes the inline hidden class strategy that cuts compile memory to ~6 MB and ~0.3 s.
AI-written summary · about
chapters (16)
- 0:00Introduction and welcome
- 1:28What are Java class files
- 2:55Using javap to inspect class files
- 4:26Why explore class file details
- 5:07Source files vs class files
- 6:34Synthetic methods in Java
- 8:43Bytecode instruction types
- 10:32Synthetic methods in inner classes
- 13:52Nestmates in JDK 11
- 16:31Class file changes in JDK 23
- 21:34String concatenation before InvokeDynamic
- 23:40How InvokeDynamic works
- 26:55InvokeDynamic and string concatenation
- 28:52Benefits of InvokeDynamic
- 30:19Updating Java versions for performance
- 31:02Summary and closing
related talks
53mWell there's your problem! Your engine's missing! A look under Java's hood
43mDeep Dive into the .class File and Even Deeper
46mKotlin, Java 4..18, Code Coverage and their best friend — bytecode: ...
47mJust a Small Class File Change Nest
50mRevealing the magic behind Java annotations
35mJava Source to Byte Code Transformation - The Hidden Story!
55mMaking Java More Dynamic
51mThe Java Class File API
