<small id='XV9Vz'></small><noframes id='XV9Vz'>

      <tfoot id='XV9Vz'></tfoot>

      • <bdo id='XV9Vz'></bdo><ul id='XV9Vz'></ul>

      <i id='XV9Vz'><tr id='XV9Vz'><dt id='XV9Vz'><q id='XV9Vz'><span id='XV9Vz'><b id='XV9Vz'><form id='XV9Vz'><ins id='XV9Vz'></ins><ul id='XV9Vz'></ul><sub id='XV9Vz'></sub></form><legend id='XV9Vz'></legend><bdo id='XV9Vz'><pre id='XV9Vz'><center id='XV9Vz'></center></pre></bdo></b><th id='XV9Vz'></th></span></q></dt></tr></i><div id='XV9Vz'><tfoot id='XV9Vz'></tfoot><dl id='XV9Vz'><fieldset id='XV9Vz'></fieldset></dl></div>
      <legend id='XV9Vz'><style id='XV9Vz'><dir id='XV9Vz'><q id='XV9Vz'></q></dir></style></legend>
    1. 如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?

      时间:2023-08-25
    2. <small id='L4O0B'></small><noframes id='L4O0B'>

        <tbody id='L4O0B'></tbody>

          <legend id='L4O0B'><style id='L4O0B'><dir id='L4O0B'><q id='L4O0B'></q></dir></style></legend>
          <tfoot id='L4O0B'></tfoot>

            <bdo id='L4O0B'></bdo><ul id='L4O0B'></ul>

          • <i id='L4O0B'><tr id='L4O0B'><dt id='L4O0B'><q id='L4O0B'><span id='L4O0B'><b id='L4O0B'><form id='L4O0B'><ins id='L4O0B'></ins><ul id='L4O0B'></ul><sub id='L4O0B'></sub></form><legend id='L4O0B'></legend><bdo id='L4O0B'><pre id='L4O0B'><center id='L4O0B'></center></pre></bdo></b><th id='L4O0B'></th></span></q></dt></tr></i><div id='L4O0B'><tfoot id='L4O0B'></tfoot><dl id='L4O0B'><fieldset id='L4O0B'></fieldset></dl></div>
                本文介绍了如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我希望在不停止应用程序的情况下分析 Java 应用程序.我可以在应用程序运行时以某种方式添加 Javaagent 吗?

                I wish to profile a Java application without stopping the application. Can I add a Javaagent somehow while the application is running?

                推荐答案

                根据java.lang.instrument 包.

                虚拟机启动后启动代理

                一个实现可能会提供一种机制来在某个时候启动代理虚拟机启动后.这关于如何启动的详细信息是特定于实现的,但通常应用程序已经开始了,它的主要方法有已经被调用了.在这种情况下一个实现支持VM 启动后代理的启动开始以下适用:

                An implementation may provide a mechanism to start agents sometime after the the VM has started. The details as to how this is initiated are implementation specific but typically the application has already started and its main method has already been invoked. In cases where an implementation supports the starting of agents after the VM has started the following applies:

                1.agent JAR的manifest必须包含属性代理级.这个的价值属性是代理的名称上课.
                2.代理类必须实现一个公共静态agentmain方法.
                3.系统类加载器(ClassLoader.getSystemClassLoader)必须支持添加代理的机制JAR 文件到系统类路径.

                1.The manifest of the agent JAR must contain the attribute Agent-Class. The value of this attribute is the name of the agent class.
                2. The agent class must implement a public static agentmain method.
                3. The system class loader ( ClassLoader.getSystemClassLoader) must support a mechanism to add an agent JAR file to the system class path.

                但我从未尝试过 :-|

                这篇关于如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件) 下一篇:ClassCastException 因为类加载器?

                相关文章

                  <bdo id='IbK50'></bdo><ul id='IbK50'></ul>
                <tfoot id='IbK50'></tfoot>

                  1. <legend id='IbK50'><style id='IbK50'><dir id='IbK50'><q id='IbK50'></q></dir></style></legend>
                    <i id='IbK50'><tr id='IbK50'><dt id='IbK50'><q id='IbK50'><span id='IbK50'><b id='IbK50'><form id='IbK50'><ins id='IbK50'></ins><ul id='IbK50'></ul><sub id='IbK50'></sub></form><legend id='IbK50'></legend><bdo id='IbK50'><pre id='IbK50'><center id='IbK50'></center></pre></bdo></b><th id='IbK50'></th></span></q></dt></tr></i><div id='IbK50'><tfoot id='IbK50'></tfoot><dl id='IbK50'><fieldset id='IbK50'></fieldset></dl></div>

                  2. <small id='IbK50'></small><noframes id='IbK50'>