Follow this process to enable MBean discovery in a stand-alone Java application.


Instrument your code as specified in Model MBean Naming and Descriptor Data, or use Spring framework instrumented JAR files.


Start the application with the system property.

For example,

java -"MyApplicationName" com.sample.MyApp

The application name is set as the name of the discovered resource. For example, when using the code in step , the application name is set as MyApplicationName.