Starting a Java agent after program start

后端 未结 4 1207
野性不改
野性不改 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:35

    You should be able to do it in Java 6, see the package documentation chapter "Starting Agents After VM Startup"

    edit: Maybe it was possible in Java 5 already and just the javadocs didn't mention it that explicitly

提交回复
热议问题