Jamison Sasser
Jamison Sasser

Reputation: 11

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

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.

Upvotes: 1

Views: 822

Answers (1)

Rafael Winterhalter
Rafael Winterhalter

Reputation: 44032

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

Upvotes: 1

Related Questions