开发者

eclipse errors when calling methods of imported abstract classes or interfaces from different project

I've just downloaded a large project from source control which includes multuple projects-as I've done before without trouble. Usually the class depencies are already defined and I can import the packages into eclipse without difficulty.

This time I seem to have difficulty with communication between projects. All my errors seem to be due to classes extending/implementing abstract classes or interfaces. If class A in one project extends or implements another class or interface from another project I end up getting exceptions when class A tries to call or override inherited methods. I've checked the build path and it seems correct, and I'm able to import the abstract class and interfaces, just no开发者_运维技巧t use methods from them. The issues only occur when the interface or class being implemented exists in a different package then the class implementing it.

I've tried refreshing the packages, cleaning and rebuilding, and doing a rebuild from the ant scripts, none of these changes seemed to help. Can anyone suggest what may be wrong?

Incidentally when I checked out everything from source control I think I may have gotten some of the eclipse metadata which had been checked in by mistake; which may explain how eclipse got in an inconsistent state.

Thanks!


If you are compiling fine but getting ClassNotFoundExceptions at runtime, you need to make sure what's visible in the Classpath tab of your Run Configurations matches your Project's build path.

This will ensure you are running with the same classpath you are building with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜