• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalThreadStateException  RSS feed

 
Urs Waefler
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

This is my code:



I do not understand java.lang.IllegalThreadStateException? How should I correct my code?

Regards, Urs
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the rest of the Exception stack trace? That information is generated to help you understand the cause, don't throw it away.

Bill
 
Urs Waefler
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like that:

Exception in thread "main" java.lang.IllegalThreadStateException
at java.lang.Thread.start(Unknown Source)
at Banking.main(Banking.java:93)

How can I correct this issue?
 
Raaghu Kannan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are starting the same thread twice

Once in Clerk Constructor
Once in your main method.

Remove one of them , better to remove from Constructor.

Thanks and Regards
Raaghu.K
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!