Community
Participate
Working Groups
Eclipse shows error markers, and complains that 'Order cannot be resolved to a type'. The import statement for 'Order' is also marked as an error 'the import package.name.Order' cannot be resolved. Commenting out the import line, and using quick-fix to insert the same import results in the identical import statement, with the identical error message. This looks like a UI bug, as Ant + IBMJDK1.4.2 [it's a WebSphere 6 project] has no trouble compiling the code. [Neither does Idea 6, NetBeans 5 or JDeveloper; using either the Sun or IBM compilers]
Can you attach a sample project that doesn't compile?
Created attachment 46370 [details] Screen shot showing bad code markers The editor shows errors for the quick fix added import statement
I don't know how to trim things down to a simple test case. Other developers here have noticed this bug, and corrected it by wiping out Eclipse specific files and folders [eliminating the project and workspace] and then re-importing the project. The code in the screen shot has invalid doc comments - this is part of an ongoing 'discussion' I've been having with other developers :-/ The same error markers are displayed when the project is opended with Eclipse 3.1
I suspect that either your Java project build path is incorrect or the build state corrupt. Use Project > Clean... to clean all projects and then rebuild everything.
Maybe this is a bug in the compiler, but we definitly need a reproducible example.
Seems to be a dup of bug 150749. Steps to reproduce are required for further investigation. *** This bug has been marked as a duplicate of 150749 ***