How do I get the current stack trace in Java, like how in .NET you can do Environment.StackTrace
?
BTW, Thread.dumpStack()
is not what I want - I want to get the stack trace back, not print it out.
转载于:https://stackoverflow.com/questions/1069066/get-current-stack-trace-in-java