![]() Previous |
![]() Next |
J2SE 5.0 and later versions of the JVM use JMXRMI (JMX over RMI). To configure the connection, the following system flags are used:
-Dcom.sun.management.jmxremote.port
-Dcom.sun.management.jmxremote.authenticate
-Dcom.sun.management.jmxremote.ssl
The following examples demonstrate how to use these system flags during JVM startup.
Example 1
$JDK/bin/java -Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=7091
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false java_application
The above set of properties start the JVM without any authentication.
Example 2
$JDK/bin/java -Dcom.sun.management.jmxremote.port=7099
-Dcom.sun.management.jmxremote.ssl=false java_application
In this example, the user must provide a user name and password to open a console for the application. The user name and password should match the user name and password configured in the file $JDK\jre\lib\management\jmxremote.password
.
For more information about the system properties, see http://java.sun.com/javase/7/docs/technotes/guides/management/agent.html#gdfvv
.