开发者

Starting JVM Tool Interface agents in the VM during live phase

开发者 https://www.devze.com 2022-12-17 18:20 出处:网络
The JVM Tool Interface(JVMTI) specification says that the JVMTI agents can be started in the VM during live phase but they ha开发者_如何学Cvent mentioned how it can be done. Has anyone tried this befo

The JVM Tool Interface(JVMTI) specification says that the JVMTI agents can be started in the VM during live phase but they ha开发者_如何学Cvent mentioned how it can be done. Has anyone tried this before or got any hints on how to do it?


You can use method

   * @param   agent
   *          Path to the JAR file containing the agent.
   *
   * @param   options
   *          The options to provide to the agent's <code>agentmain</code>
   *          method (can be <code>null</code>).

   com.sun.tools.attach.VirtualMachine.loadAgent(String agent, String options)

from ${java.home}/../lib/tools.jar

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号