Starting a Java agent after program start

后端 未结 4 1194
野性不改
野性不改 2020-12-05 03:11

Is it possible to insert a javaagent after virtual machine start from within the same VM?

Lets say for example we have an agent in a jar myagent.jar with the appropr

4条回答
  •  攒了一身酷
    2020-12-05 03:37

    https://web.archive.org/web/20141014195801/http://dhruba.name/2010/02/07/creation-dynamic-loading-and-instrumentation-with-javaagents/ has a great example of how to write an agent as well as how to start one on the fly.

提交回复
热议问题