Community
Participate
Working Groups
From the news group: Jon Skeet <skeet@pobox.com> wrote: > I've just added a new class to my project (by adding it to the file > system then refreshing the directory from local), and it's come up with > a bizarre compilation error: > > "This compilation unit indirectly references the missing type > java.lang.Object (typically some required class file is referencing a > type outside the classpath)" > > Rebuilding all doesn't help, and the error cursor is stuck on line one > of the source file. > > I'm pretty sure the code itself is okay, and when playing with > refactoring I think I saw this error before (but dismissed it as user > error at the time). > > Any advice? Clearly java.lang.Object is known about, otherwise *nothing* > would compile... I've found the problem. My installation was messed up, almost certainly due to my user error. (It's somewhat surprising that a rebuild all didn't mark all classes as problematic though.) IMO the error missing java.lang.Object should be more prominent in the UI. It is not enough to mark one file. This gives the impression that only that file has errors. NOTES: PM (8/26/2001 10:15:18 PM) When Object is not found, the compiler aborts from a full build avoiding unnecessary error reporting. This usually indicates a classpath issue, and if indicating invalid classpath entries (markers) then we can improve the user perception.
PRODUCT VERSION: 130
We should probably refuse to build anything and remove all other java problems on this one project, this way the classpath problem would stand out.
This is actually a good solution for the problem
Now we remove all problems associated with the project except for the class path error, and add an error on the project: "The project was not built since its classpath is incomplete, fix the classpath then rebuild it"