i-Lab Guide To: JDK 5.0 Tools

 

The following tables lists development tools provided in v5 of the Sun Java Development Kit. Some of these tools are only provided in the Linux/Solaris versions of the JDK. In addition some of the remaining tools will not function correctly on Windows if the temporary directory is on a FAT32 file system (or for versions prior to Windows 2000).

 

Tool/Usage

Description

O/S

Where

extcheck <jar file>

 

All

JDK

hat

Heap Analysis Tool

Linux/Solaris

Web

jconsole

Graphical JMX client for monitoring memory, thread and class activity of a local or remote VM (that is JMX enabled). Also allows inspection of JMX MBeans

All

JDK

jar <jar file> <files...>

Produces a Java ARchive from a set of files

All

JDK

jinfo [<pid> | <exe> <core>]

Lists details of a running or crashed VM

Linux/Solaris

JDK

jmap [<pid> | <exe> <core>]

Lists memory usage of a running or crashed VM's libraries. -heap shows heap stats, -histo shows class memory histogram

Linux/Solaris

JDK

 

 

 

 

jps

Lists process IDs of running java processes

All

JDK

jstat <category> <pid>

Prints detailed JVM statistics in the selected category for a running VM. Categories:

  • -class
  • -compiler
  • -gc
  • -gccapacity
  • -gccause
  • -gcnew
  • -gcnewcapacity
  • -gcold
  • -gcoldcapacity
  • -gcutil
  • -printcompilation

All

JDK

 

 

 

 

jstack [<pid> | <exe> <core>]

Prints stack traces for each thread of a running or crashed VM. -m option also shows native stack trace.

Similar to pressing CTRL \ (or CTRL BREAK on Windows) in a running app's input window.

Linux/Solaris

JDK

 

 

 

 

visualgc

Prints

Linux/Solaris

Web

 

 

 

 

 

© 2006 i-Lab Limited