Tuesday, April 29, 2008

not finding a class in the same !@#$%$ directory

I'm pointing to a directory. The package declaration at the top is OK by netbeans. I declare a member of another class defined in this directory. The little red complaining exclamation point says "cannot find symbol". If I let it create the symbol it says it needs, it tries to write a file with the exact name as the one it can't find in the same directory. What is the problem here? The documentation says the classpath is the path set up for the project. Why can't it find a class in the same directory where it knows the class ought to be?!!

Here's a post from 2005 on nbusers@netbeans.org. Someone with the same issue. Let's see if the final response is any help....

Doesn't seem to be. It says to check to make sure the package declaration is accurate and matches the file structure, and those two things seem to be OK. So I'm stymied.

  1. Get rid of all the embedded .class files where there are source .java files
  2. Even though the 'add a library' option allows you to add a directory of class files, they won't be seen unless they're in a .jar file, so jar them all up.
  3. As for the source files that it can't see, I'm still working on that.

No comments: