How To: Java Stack Trace in Linux
February 24th, 2008 by Angsuman ChakrabortyA simple tip for newbies - how to get Java stack trace, the invaluable tool to debug java programs, in Linux:
- Type the Ctrl key followed by \, in short Ctrl \.
I just used it to debug a persistent problem where a server process which automatically fetches data from a third-party site was inexplicably hanging.
All of us who used Ctrl-Break on windows for a stack trace, like myself will find this non-intuitive. It took me some time and googling to figure this out, so I decided to (document) blog it once and for all.
Tags: Headline News, How To, Java Software, Linux, Linux Migration, Open Source Software, Programming, Tech Note | | RSS 2.0 | Trackback this Article | Email this Article










































Add to Technorati Favorites

February 24th, 2008 at 3:50 am
hi there,
I use jps and jstack utilities in the JDK (java 1.5 and above from sun) to do the above trick.
If the java process is a daemon then, the jstack technique will work whereas you won’t be able to do the CTRL + \ trick.
just my 2 cents.
BR,
~A
February 24th, 2008 at 4:35 am
Thanks for sharing.
Take care,
Angsuman