I am running a java program from inside IntelliJ IDEA (an IDE) on a Mac. The program spawns 2 threads.
I have installed htop and I am trying to see the process along with the spawned threads (they are assigned specific names from the code).
The problem is that although I can find the pid (which I have printed from the java program), the individual threads are not displayed.
I have enabled thread views in htop, by pressing F2 to enter htop setup menu and chose "Display option" under "Setup" column, and toggle on "Tree view" and "Show custom thread names" options.
I.e. when doing htop -p $pid it shows only an entry for the IntelliJ process. How is this possible?
Update:
When running the program from the command line with java -jar the threads are not visible either