Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I MUST BE STUPID

 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how comes this doesn't work ??
DrawStrategy.java
compiles fine

Base.java

produces an error on compile: cannot resolve symbol DrawStrategy
(files are in the same directory)
I MUST BE STUPID not to see my mistake
[This message has been edited by Dave Van Even (edited October 17, 2001).]
 
Wilfried LAURENT
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Being in the same directory is to my opinion not enough. Do they belong to the same package?
W.
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I put them in the same package, I get the same result
Dave
 
Wilfried LAURENT
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you use an IDE or do it "by hand"?
Where is the .class file generated? Check that if you compile them separetely, the directory where your outputs are generated has to be in your classpath.
W.
[This message has been edited by Wilfried LAURENT (edited October 17, 2001).]
[This message has been edited by Wilfried LAURENT (edited October 17, 2001).]
 
shilpa kulkarni
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It compiles and runs fine for me, output is -
Dit is strategy
"Dit is strategy"
I have just put all classes in one folder, no package.
I put them in seperate files, so i have 4 java files and 4 class files.
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgot to put . in my classpath
thanks for helping out!

Dave
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave, Dave, Dave,
You KNOW that there is no such thing as a STUPID question (Cindy slowly shakes head). We have ALL overlooked little things that hang us up.
I personally take objection to you calling someone stupid that is smart enough to figure out his own mistake - and I think that you owe him an apology .
 
Margaret Tan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YEAH to Cindy!!! Gosh, plenty of nice people here in JavaRanch huh?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and I'd finish up with "Hands up anyone who hasn't made this mistake"

Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic