To get a list of threads and their full states using the terminal, you can use the command below:
jstack -l <PID>
Which <PID>
is the id of process running on your computer. To get the process id of your java process you can simply run the jps
command.
Also, you can analyze your thread dump that produced by jstack in TDAs (Thread Dump Analyzer) such fastthread or spotify thread analyzer tool.