This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes current thread not owner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "current thread not owner" Watch "current thread not owner" New topic
Author

current thread not owner

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
Hi i have created on small application and want to use threading the small application prints the current thread busy (jboss server) which need to be printed after every few interval and should never end printing

Code :



ERROR :



Jigar Naik


Ramesh Shankar
Greenhorn

Joined: Jun 13, 2005
Posts: 4
t.wait() should come inside a synchronized block
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
I have replaced t.wait with t.sleep(1000);

at Console :

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
Can anybody tell me what modification should i do in the following progame to keep the System.out.println line executing again and again agter the interval of 1000 ms ???

Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638



apigee, a better way to API!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Moving to threads forum...


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: current thread not owner