Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does OpenJDK have a tool similar to jstack (Oracle Java)?

Tags:

java

Jstack is a thread stack analysis tool that comes with jdk. I can use this command to view or export thread stack information in a Java application.

Does OpenJDK have a tool similar to jstack (Oracle Java)?

like image 255
Andrew8460958 Avatar asked Dec 21 '18 06:12

Andrew8460958


2 Answers

Based on the comment from Curtis Yallop.

If you are on CentOs/RedHat like me, and have java but no jstack, you may have installed "java JRE" basically. If you also have no javac (but have java), then install openjdk-devel package and both will now show up.

like image 170
rogerdpack Avatar answered Oct 25 '22 03:10

rogerdpack


Here are the tools listed that are in openjdk:

http://openjdk.java.net/tools/

jstack belongs to the Serviceability tools.

Edit: You can find jstack in the bin folder of the openjdk where all other executables can be found like java and javac.

In my case (mac OS) the path looks like the following: jdk-11.0.1.jdk/Contents/Home/bin/

like image 34
C.Schone Avatar answered Oct 25 '22 04:10

C.Schone