Thread Dump
Can somebody tell me how i can cause a running java program doing a thread
dump (like the Photograph Button in Idea)? I want to to that from within a
program. I know i can press Ctrl-Brak under Windows, but for that i have to
have a Window.
Since the IntelliJ guys are doing exactly this when pressing the photograph
button out of the run-window, i thought you could reveal to me that secret.
thank you
-claude
Please sign in to leave a comment.
On 2004/02/05 13:19, Claude Leuchter wrote:
I believe they use native code for that. Under windows the native code
is probably contained in breakgen.dll in your idea/bin directory. I
guess linux and osx will have something similar...
Bas
photograph
secret.
>
Indeed, we are using native code for this. Another thing about this is that
you need a console instead of the window
to dump threads. If you have a console (which is the case of java.exe
opposed to javaw.exe) then GenerateConsoleCtrlBreak will do the thing.
Above said applies to windows only, in linux everything is more simple -
just send a signal to correct process.
As for MacOSX I'm not sure if the VM actually supports this (Sun specific)
feature.
Regards,
Eugene.