| 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
|
|
|