JConsole : Java Glossary

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 (Java Development Kit) 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 Bean) 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.7.0_04\bin\java.exe" -Dcom.sun.management.jmxremote -jar "J:\Program Files\java\jdk1.7.0_04 \demo\jfc\Java2D\Java2Demo.jar"

rem in a separate BAT (Batch) file do the following so you can have both programs running at once.
rem load JConsole to watch Java2Demo
"J:\Program Files\java\jdk1.7.0_04\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 (Application Programming Interface) which could allow you to programmatically access to the same information, although it is unclear you can do that from the same JVM (Java Virtual Machine) itself (i.e. a Java application which monitors its own JVM).

Learning More

Oracle’s 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
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.214]
You are visitor number 12,380.