user195563
user195563

Reputation:

daemon threads in java

i ran jconsole, i see some live threads count and daemon threads count .... i run no other java app/classes .... i could see the list of live threads but not daemon thread .... is there a way to know what is the list of deamon threads ?

Upvotes: 2

Views: 1182

Answers (2)

Fedearne
Fedearne

Reputation: 7358

The daemon are included in live threads.

Both in the counter and list.

I don't think jconsole has an option to show only daemon threads.

Must of the "built-in" if not all but the "main" thread are daemon threads.

Upvotes: 2

ankon
ankon

Reputation: 4215

You can create a thread dump (using the jstack tool), which will show for each thread whether it is a daemon or not.

Instead of using jstack on the command line, you can also trigger a thread dump using visualvm (http://visualvm.dev.java.net), and look at the threads over time.

Upvotes: 4

Related Questions