sudo nano /etc/environment

To install on Ubuntu, you must install a Java Development Kit (JDK) . By default, Ubuntu often comes with only the Java Runtime Environment (JRE), which does not include diagnostic tools like jstack . 1. Identify Your Java Version

If you are on a server without a GUI, you can save space with the headless version: sudo apt install openjdk- 17 -jdk-headless Use code with caution. Copied to clipboard 3. Verify the Installation

jstack 2345