JDK-8044135 : Add API to start JMX agent from attach framework
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-05-28
  • Updated: 2017-05-17
  • Resolved: 2014-06-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40Fixed 9 b19Fixed
Related Reports
Relates :  
Description
To be able to remove management-api.jar (see JDK-8043939) we should introduce an API to accomplish the same thing.

The proposed API is:

    /**
     * Starts the JMX management agent in the target virtual machine.
     *
     * <p> The configuration properties are the same as those specified on
     * the command line when starting the JMX management agent. In the same
     * way as on the command line, you need to specify at least the
     * {@code com.sun.management.jmxremote.port} property.
     *
     * <p> See the online documentation for "Monitoring and Management Using
     * JMX Technology" for further details.
     *
     * <p> This method replaces the previous method of loading the
     * {@code management-api.jar} agent to start the management agent.
     *
     * @param agentProperties
     * A Properties object containing the configuration properties
     * for the agent.
     *
     * @throws IOException
     * If an I/O error occurs
     *
     * @since 1.9
     */
    public abstract void startManagementAgent(Properties agentProperties) throws IOException;

    /**
     * Starts the local JMX management agent in the target virtual machine.
     *
     * <p> See the online documentation for "Monitoring and Management Using
     * JMX Technology" for further details.
     *
     * <p> This method replaces the previous method of loading the
     * {@code management-api.jar} agent to start the management agent.
     *
     * @throws IOException
     * If an I/O error occurs
     *
     * @since 1.9
     */
    public abstract void startLocalManagementAgent() throws IOException;