A common misconception is that you can install jstack alone via apt . There is no jstack package. The only official way is to install the JDK. However, if disk space is a concern, consider:

If jstack is not recognized, you can add the JDK's bin directory to your system's PATH:

[updated] - Install Jstack On Ubuntu

A common misconception is that you can install jstack alone via apt . There is no jstack package. The only official way is to install the JDK. However, if disk space is a concern, consider:

If jstack is not recognized, you can add the JDK's bin directory to your system's PATH: install jstack on ubuntu