install Jstack on centos

3.5k Views Asked by At

my centos Server is running the Spring boot application. I am trying to take threaddump of java process. But I cannot find jstack utility on the server. I figured out someone just installed the jre and did not install jdk, that may be the reason why jstack is missing.

Can you please let me know how can I install jstack on this server? is there any pre-install checks ? or does it involve any downtime ?

1

There are 1 best solutions below

0
On

You can have several java installations on the same OS by using jdk install from tar file option. You may manually install jdk to a single parent directory by making use of the .tar.gz jdk installation option. This option will enable you to download a the .tar.gz file into a new directory, then untar the downloaded file and answer some license agreement. you will see the you will find jstack in the bin directory in the directory the of the jdk you have just installed. You may need to use the full file path of this jstack file when using.