• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't trace which thread isn't dying

 
Raymond Ong
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How come after all threads have died, I still have javaw.exe running? I'm debugging using eclipse.

Thanks
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had this problem when I was starting threads that ran in background. When I shut down the main application those threads kept the JVM running. I could only kill it from the OS. The trick was to set them to be daemon threads. Look at the definition of daemon in the Thread API doc. The language is awkward, but it says any threads that are not daemon will keep the JVM running, but threads that are daemon will not keep the JVM from killing them and shutting down. Let me know if that helps!
 
Raymond Ong
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks man! Will check the docs and try to post what I find out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!