文档介绍:Monitoring and Management Using JMX
The Java virtual machine (JVM) has built-in instrumentation that enables you to monitor and manage it using JMX.  You can also monitor instrumented applications with JMX.
Setting System Properties for JMX
Enabling the JMX Agent
Local Monitoring and Management
Remote Monitoring and Management
Connecting to the JMX Agent Programmatically
Using Password and Access Files
JMX Management and Monitoring Properties
Setting System Properties
To enable the JMX agent and configure its operation, you must set certain system properties when you start the Java virtual machine (JVM).  You set a system property on the command-line as follows:
java -Dproperty=value ...
You can set any number of system properties in this way. If you do not specify a value, then the property is set with its default value. The full set of JMX management properties is described in Table 1. You may also set system properties in a configuration file, as described in JMX Management and Monitoring Properties.
Note: To run java (the Java VM) from the command line, you must add JRE_HOME/bin to your path, where JRE_HOME is the directory containing the Java Runtime Environment (JRE). Alternatively, you can enter the full path when you type the command.
The following documents describe the syntax and full set of command-line options supported by the Java HotSpot VMs:
Java application launcher for Microsoft Windows
Java application launcher for Solaris Operating Environment
Java application launcher for Linux
Enabling the JMX Agent
To monitor a Java platform with JMX:
Enable the JMX agent (the MBean server) when you start the JVM. You can enable the JMX agent for:
Local monitoring, for a client management application running on the local system.
Remote monitoring, for a client management application running on a remote system.
Monitor the JVM with a JMX-compliant tool such as jconsole. See Using jconsole for more information.
Local Monito