Home >Java >javaTutorial >What is the role of jstack in java
Explanation
1. jstack is the stack tracing tool that comes with the Java virtual machine. jstack is used to output Java stack information for a given java process ID, corefile or remote debugging service. 2. You can use the Jstack tool to generate a thread snapshot for the current moment of the Java virtual machine.
Function
When the thread stops, you can see the call stack of each thread through jstack, and you can know what the unresponsive thread is doing in the background and what resources it is waiting for.
Example
Determine the process number of the currently executing task through jps.
jonny@~$ jps 597 1370 JConsole 1362 AppMain 1421 Jps 1361 Launcher
1. As a representative of static object-oriented programming language, Java language implements object-oriented theory and allows programmers to perform complex programming with an elegant way of thinking.
2.Java has the characteristics of simplicity, object-oriented, distributed, security, platform independence and portability, and dynamic nature.
3. Use Java to write desktop applications, Web applications, distributed systems and embedded system applications, etc.
The above is the detailed content of What is the role of jstack in java. For more information, please follow other related articles on the PHP Chinese website!