How to create a thread dump?

If some think is hanging in your Java application then it can be helpful to create a thread dump. A thread dump show the execution positions of all threads.


Product: Any
Date: Oct 17, 2008
Keywords:

For the creating of a thread dump there is no uniform solution. It depends on the environment.

  • Under Windows: type ctrl-break in the black Java console. The Java console is the black DOS box that open on starting. A Java console open only if you use java.exe and not if you use javaw.exe.
  • Under Unix: call kill -3 <java_process_id> (e.g. kill -3 5555). This will NOT kill your application. It will only write a stack trace to standard output.
  • With an applet you can open a white Java console. The most browsers have a menu item “Java Console”. In the white Java console you can type the key “v”.
 

© Copyright 1996 - 2012, i-net software; All Rights Reserved.