File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setDaemon

 
saravanan ragunathan
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


when i run this code it generates IllegalThreadStateException in runtime
how can i rectify this
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the documentation? Because the answer is right there.
 
Santosh Kumar Nayak
Ranch Hand
Posts: 141
Eclipse IDE IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setDaemon() has to be specified before the execution of the thread.start() method.

While the thread is executing specifying the thread as daemon is not allowed.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic