File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes IllegalThreadStateException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "IllegalThreadStateException " Watch "IllegalThreadStateException " New topic


basha khan
Ranch Hand

Joined: Jan 26, 2002
Posts: 516
why and where IllegalThreadStateException is occuring?.
Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
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

Joined: Jan 26, 2002
Posts: 516
thank u rashid.Quote was fine enough :roll:
Ghulam Rashid
Ranch Hand

Joined: Jan 14, 2002
Posts: 278
Hi Rashid
Your Posting was really helpful for me, too.
(JCP, BEA Certified WLS Developer)
I agree. Here's the link:
subject: IllegalThreadStateException
It's not a secret anymore!