This should work on any Java 5 or newer platform.
$ jps 3392 Jps 3387 JConsole $ jstack 3387 Attaching to process ID 3387, please wait... Debugger attached successfully. Client compiler detected. JVM version is 1.5.0_16-133 Thread t@59139: (state = BLOCKED) - java.lang.Object.wait(long) @bci=0 (Interpreted frame) - javax.swing.TimerQueue.run() @bci=14, line=236 (Interpreted frame) - java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)
In the case of an OS signal the thread dump is printed to the console window that started the java process. If you use javaw to start the process, the dump is lost.
On Windows, typing ctrl-break in the console window that started the Java
On Unix, the command kill -QUIT
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.