Using JVMTI to change Java bytecode at a runtime with C++

724 views Asked by At

I would like to know if anyone has had any luck modifying a Java methods bytecode at a run-time with JVMTI. JVMTI has a getter for a methods bytecode, but from what I understand it does not have any support for replacing the buffer. Any information would be awesome, thanks.

1

There are 1 answers

0
Rafael Winterhalter On

You need to register a class file load hook and retransform the classes you want to change.