Bug 3343

Summary: Missing java.lang.Object should produce a more prominent compiler error (1GIT277)
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2001-10-10 22:53:33 EDT
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.
Comment 1 DJ Houghton CLA 2001-10-29 17:11:06 EST
PRODUCT VERSION:
	130

Comment 2 Philipe Mulet CLA 2001-11-22 11:29:00 EST
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.
Comment 3 Dirk Baeumer CLA 2001-11-22 12:07:46 EST
This is actually a good solution for the problem
Comment 4 Kent Johnson CLA 2001-12-17 16:32:59 EST
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"