Patching Third-Party Library Bytecode at Runtime
summary
The talk covers runtime patching of third-party Java libraries by hooking the classloader using a javaagent and manipulating JVM bytecode with Javassist. It explains the motivation (when forking or modifying source is impossible), shows how to install a classloader hook via javaagent, compares high-level bytecode-manipulation libraries, and presents four concrete patching techniques implemented with Javassist, plus notes on reliability and testing of patched classes.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 7:47Library patching problem
- 17:29Java Agent and bytecode
- 27:07Class patching methods
- 37:00Testing and deployment
- 40:56Reliability and usability
- 42:22Conclusion and Q&A
related talks
39mThe Java Agent: Modifying Bytecode at Runtime to Protect Against Log4J
55mLiving in the Matrix with Bytecode Manipulation
55mMaking Java more dynamic
55mMaking Java More Dynamic
51mThe Craft of Metaprogramming on JVM
45mMaking Java more dynamic
30mWriting Java agents for fun and not so much profit
53mHacking Java
