aspose file tools
The moose likes Threads and Synchronization and the fly likes error in thread class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "error in thread class" Watch "error in thread class" New topic
Author

error in thread class

mu gaandimara
Greenhorn

Joined: Aug 04, 2009
Posts: 10


Why the above code shows error ???/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
You should never call a thread's "run" method; "start" will cause the new thread to be started and run.


Android appsImageJ pluginsJava web charts
Maruthi Janardhan
Greenhorn

Joined: Aug 04, 2009
Posts: 16
What error? Can you be specific? What I can see is that you are implementing Thread class. You should be extending Thread class. Otherwise there is nothing wrong with the code.


-MJ
www.leviossa.com
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 16695
    
  19

Maruthi Janardhan wrote:What error? Can you be specific? What I can see is that you are implementing Thread class. You should be extending Thread class. Otherwise there is nothing wrong with the code.


Isn't this enough to cause a compile error?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Maruthi Janardhan
Greenhorn

Joined: Aug 04, 2009
Posts: 16
Henry Wong wrote:
Isn't this enough to cause a compile error?

Henry

True, but I thought rebeus is seeing some thing else. Was there a post on the forum to get help on a compiler error!!!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: error in thread class
 
Similar Threads
code for isAlive()
Please Help - Using an Array from another class
Doubt in synchronized thread program
Thread class
thread