Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalThreadStateException

 
basha khan
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why and where IllegalThreadStateException is occuring?.
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you try to restart a dead thread through calling again that object's start() method, it will throw this exception though you can call start() of a thread twice or thrice but when if it is not a dead one...
and also
when setDaemon() method is called after a thread is started out IlegalThreadStateException will then also be thrown.
Sir W. Brogden defines about this exception somewhere as:
The docs for IllegalThreadStateException say:
"indicate that a thread is not in an apprpriate state for the requested operation."
hope it helps.
Rashid Ali
[ January 26, 2002: Message edited by: Rashid Ali ]
 
basha khan
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank u rashid.Quote was fine enough :roll:
 
Ghulam Rashid
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rashid
Your Posting was really helpful for me, too.
Regds
Rashid
(JCP, BEA Certified WLS Developer)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic