在实时阶段在VM中启动JVM工具接口代理 [英] Starting JVM Tool Interface agents in the VM during live phase

查看:122
本文介绍了在实时阶段在VM中启动JVM工具接口代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JVM工具接口(JVMTI)规范表示可以在实时阶段在VM中启动JVMTI代理,但是他们没有提到如何完成.有人以前尝试过此方法吗,或有任何提示如何做到这一点?

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

推荐答案

您可以使用方法

   * @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)

来自$ {java.home}/../lib/tools.jar

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

这篇关于在实时阶段在VM中启动JVM工具接口代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆