Forums Register Login

Thread Dumps

+Pie Number of slices to send: Send
Does anyone know how to create thread dumps from a java program? This program will call another program that creates some threads and attempt to do a thread dump except I'm not sure how to do it.

Any help would be appreciated.

Thanks,
Srini
+Pie Number of slices to send: Send
To see the stack: Thread.dumpStack()

However it prints the current stack trace. Thus it should be called from the code you want to see the stack trace.
[ May 23, 2004: Message edited by: Jose Botella ]
+Pie Number of slices to send: Send
there is no way you can do that programmatically. In windows, activate console that Java app is running and hit Ctrl+Break. That will get Threads dumped to the screen. Very convienent for deadlock debugging.
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 618 times.
Similar Threads
Suggestions & Advices from Certified Java GURUS
Mock tests and SCJP Dumps
Which three jsp:setProperty attributes must be used to
ThreadDumps
how to get Thread dumps
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:42:50.