Troubleshooting Tools on Windows for Java SE 6

Monitoring Tools
Debugging Tools
Scripting Tools

Monitoring Tools

Java VisualVM

Java¬ô VisualVM is a new monitoring and profiling tool for troubleshooting Java applications. It incorporates various technologies, including jvmstat and JMX, as well as CPU and memory profiling, to provide one easy-to-use integrated visualization tool. Developers can rapidly create their own extensions using a public API, and may share them with the community on a central repository.

  • Display local and remote Java applications.
  • Display application configuration and runtime environment.
  • Monitor application memory consumption and runtime behavior.
  • Monitor application threads.
  • Profile application performance or analyze memory allocation. (Local applications only.)
  • Create and display thread dumps.
  • Create and browse heap dumps.
  • Analyze core dumps.
  • Analyze applications offline.
  • Get additional plugins contributed by the community.
  • Write and share your own plugins.


Launch a GUI to monitor and manage Java applications and Java VMs on a local or remote machine.

  • Connection to Java process, host, or JMX agent.
  • Graphical overview of CPU usage, heap memory, threads, classes.
  • Summary of key data, for example, uptime, compilation time, objects pending finalization, and more.
  • Memory statistics, including garbage collection.
  • Request garbage collection.
  • Thread statistics.
  • Deadlock detection.
  • Class statistics.
  • Tree structure of all platform and application MBeans.
  • Set the value of an MBean attribute.
  • Invoke operation on an MBean, for example, perform a heap dump.
  • Subscribe to notification for an MBean.
  • Information about the virtual machine, the compiler, the operating system.
  • Pass flags to VM on which JConsole is running.


(Not currently available on Windows 98 or Windows ME platforms.)

List instrumented Java virtual machines.


(Not currently available on Windows 98 or Windows ME platforms.)

Display performance statistics for an instrumented Java VM:

  • Behavior of the class loader
  • Behavior of the HotSpot Just-in-Time compiler, totals and by method
  • Behavior of the GC heap
  • Behavior and sizes of the generation areas


(Not currently available on Windows 98 or Windows ME platforms.)

  • Monitor for creation and termination of instrumented HotSpot Java VMs.
  • Provide an interface for remote monitoring tools to attach to Java VMs.

Debugging Tools

HPROF profiler

Writes class profiling information to a file or a socket, in ASCII or binary.

  • Heap allocation profiling.
  • Heap dump.
  • CPU usage - for threads, methods.
  • Monitor contention profiling.

To invoke the HPROF tool: java -agentlib:hprof ToBeProfiledClass

To print the complete list of options: java -agentlib:hprof=help


Launch a simple interactive command-line debugger.

  • Display Java objects and primitive values.
  • List currently running threads.
  • Dump the current thread stack.
  • Set breakpoints.
  • Step through execution.
  • Examine exceptions.


Parse a binary heap dump, launch a web browser, and present standard queries.

  • Execute standard queries, for example, classes, objects, class instances, reference chains from object rootset, reachable objects, and more.
  • Turn on or off object allocation tracking.
  • Turn on or off object reference tracking.
  • Specify objects to exclude from "reachable objects" query.
  • Pass flags to the Java VM on which jhat is running.
  • Develop custom queries with buit-in Object Query Language.
  • Compare objects in two dumps.


Only the following subset of the functions for the jinfo tool are available on Windows:

  • Dynamically set, unset, or change the value of certain Java VM flags for a process.


Only the following subset of the functions for the jmap tool are available on Windows:

  • Dump the Java heap (all objects or only live objects) of a process in binary format to a file.
  • Print a histogram (all objects or only live objects) of a process.


Only the following subset of the functions for the jstack tool are available on Windows:

  • Print stack traces of threads for a process
  • Print information about concurrent locks for a process

Scripting Tools


  • Command-line script shell: Evaluate or execute a script in interactive or batch mode.
  • Pass flag to the VM.
  • Set Java system properties.