File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Really novice... Cannot resolve symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Really novice... Cannot resolve symbol" Watch "Really novice... Cannot resolve symbol" New topic
Author

Really novice... Cannot resolve symbol

Emili Calonge
Ranch Hand

Joined: May 17, 2003
Posts: 84
I'm getting this error when comipling a symple tutorial code and I'd like to get some help of you...
The error is this:

applets/declaracio.java [17:1] cannot resolve symbol
symbol : constructor Thread (applets.declaracio,java.lang.String)
location: class java.lang.Thread
animationthread = new Thread(this,"animationthread");
^
1 error
Errors compiling declaracio.

If you want I can post the code but as I said it only starts a thread and displays a text on the browser, really simple but giving me a big headache.
Thanks in advanced.
PD: I'm new to this forums so Hello to all!
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1109

Hi Emili,
Assuming the error message is unclear to you, it is saying that there is no constructor in class "java.lang.Thread" that takes two parameters where the first one is an instance of "applets.delcarcio" and the second one is an instance of "java.lang.String".
Looking at the javadocs for "java.lang.Thread", there is a constructor that takes two parameters where the first is an instance of "java.lang.Runnable" and the second one is an instance of "java.lang.String".
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Thread.html
I think this is the one you meant to use. If that is the case then your "applets.delcarcio" class needs to implement the "Runnable" interface, example:

Hope this helps.
Good Luck,
Avi.
 
 
subject: Really novice... Cannot resolve symbol
 
Threads others viewed
Static Doubly Linked Lists....
static problem.
ButtonGroup in a jMenu
getServletName() method error
Pass by ref- pgm err
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture