This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is going on here?

 
Unnar Björnsson
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the sudden this simple code doesn�t work!


It worked just a minute ago, now when I compile it I get
"cannot find symbol
symbol : constructor Timer(int,Test3.TimeListener)
location: class Timer
timer = new Timer(20, new TimeListener());"

Cannot find constructor!! It is right there:

Timer(int delay, ActionListener listener)

I provided it with an integer and a class the implements ActionListener.
Anyone have a clue?

[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test3 test = new Test(); //missing a 3?
Test3 test = new Test3();
 
Unnar Björnsson
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This program�s name was initially Test I changed it to Test3 and forgot that little detail. However the error still occurs.
[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it compiles OK for me.
your error message can be reproduced if you remove
implements ActionListener

but, as you say, it's there
??
 
Unnar Björnsson
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out what was causing this error. I had extracted Timer.class(The one from java.util, which does NOT include this particular constructor) from SRC.ZIP and for some reason put it in my working folder. Two Timer classes, I don�t get it why they have to share the same name.
[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic