(→*nix)
|
(Work in Progress)
|
Line 8: | |||
When a java process is running in a command prompt, you can simply press ['''CTRL''']+['''BREAK'''] to have the thread dump printed directly to the console. This text can then be extracted from the console and thrown in a text-editor for easier reading. | When a java process is running in a command prompt, you can simply press ['''CTRL''']+['''BREAK'''] to have the thread dump printed directly to the console. This text can then be extracted from the console and thrown in a text-editor for easier reading. | ||
+ | == Java 6 == | ||
+ | There may be different options for each type of Java installed. The commands listed below are known to work with the Java 7 JDK. | ||
+ | === jstack === | ||
+ | Using 'jstack', which is part of the JDK, you can run: | ||
+ | '''jstack -l process-id#''' | ||
+ | '''jstack -F -l process-id#''' (if the process is hung) | ||
+ | This command will then take a thread dump of the java process specified and dump it to the console. You may want to consider redirecting this output to a file with the ''>'' modifier. | ||
+ | == Java 7 == | ||
+ | There may be different options for each type of Java installed. The commands listed below are known to work with the Java 7 JDK. | ||
+ | === jstack === | ||
+ | Using 'jstack', which is part of the JDK, you can run: | ||
+ | '''jstack -l process-id#''' | ||
+ | '''jstack -F -l process-id#''' (if the process is hung) | ||
+ | This command will then take a thread dump of the java process specified and dump it to the console. You may want to consider redirecting this output to a file with the ''>'' modifier. | ||
= *nix = | = *nix = |