Using the MBean Server explorer
From JMXplorer
Contents |
Opening the MBean Server explorer view
Window->Show View->Other->JMXplorer/MBean servers Explorer
Adding a new Mbean server
Right click on the view and click on "add a new MBean server" :
Local monitoring and management
Enabling monitoring on the process
When using Java SE platform < 1.6, you have to set the following system property when you start the Java application.
com.sun.management.jmxremote
For example :
#cd JDK_HOME/demo/jfc/Notepad #java -Dcom.sun.management.jmxremote -jar Notepad.jar
In the Java SE 6 platform, it is no longer necessary to set this system property. Any application that is started on the Java SE 6 platform will support the Attach API, and so will automatically be made available for local monitoring and management when needed.
So you can start your application as usual :
#java -jar Notepad.jar
Select local java process
If you want to be able to select local java processes, you need to have a JDK 1.6 installed and configured in eclipse. It will not work if you only have a JRE.
Any application that is started on the Java SE 6 platform will support the Attach API, and so will automatically be made available for local monitoring and management when needed.
Remote Monitoring and Management
To enable monitoring and management from remote systems, you must set the following system property when you start the Java VM.
com.sun.management.jmxremote.port=portNum
Remote URL is as follows:
service:jmx:rmi:///jndi/rmi://<server>:<port>/jmxrmi


