JConsole : Java Glossary

go to home page J words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 Roedy Green, Canadian Mind Products
JConsole
A tool from Sun to let you monitor Java programs while they are running, a part of a suite of tools called JVisualVM. It is available in JDK 1.6.0_07+, It will tell information about performance and resource management, especialy memory and garbage collection. It is designed to work remotely attaching to the app via an MBean (Managed Beans) server. There is nothing to download. Everything you need comes bundled in the JDK. You invoke it to monitor a locally-running Java app like this:
rem demonstrate JConsole

rem load the sample progrom to monitor: Java2Demo, enabling monitoring with com.sun.management.jmxremote property
rem The following should be all on one line:
"J:\Program Files\java\jdk1.6.0_17\bin\java.exe" -Dcom.sun.management.jmxremote -jar "J:\Program Files\java\jdk1.6.0_17\demo\jfc\Java2D\Java2Demo.jar"

rem in a separate BAT file do the following so you can have both programs running at once.
rem load JConsole to watch Java2Demo
"J:\Program Files\java\jdk1.6.0_17\bin\jconsole.exe"

If that does not work, add these system properties to the command line as well:
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=9999
Pick an unused socket to use for communication.

JVisualVM includes an API which could allow you to programmatically access to the same information, although it is unclear you can do that from the same JVM itself (i.e. a Java application which monitors its own JVM).

Learning More

Sun’s JDK Technote Guide on JVisualVM : available:

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/jconsole.html J:\mindprod\jgloss\jconsole.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.107]
You are visitor number 8,268.