Reputation: 2022
I have 3 java projects in eclipse (A, B, C), where C is a required project for both A and B. Each time I start eclipse, I get the error
Project 'A' is missing required Java project: 'C'
Project 'B' is missing required Java project: 'C'
When I remove project C from the build path of A or B, and add it again, the error disappears. The errors ... cannot be resolved to a type
only appear when I remove project C from the build path, and F3-ing to source files in project C from project A or B works, implying that it does find the correct source files.
My .classpath file looks like this:
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JCIFS"/>
<classpathentry combineaccessrules="false" kind="src" path="/C"/>
<classpathentry kind="output" path="bin"/>
</classpath>
My eclipse version is Galileo, plug-ins: Subclipse, CDT (so no Maven). Build automatically is checked.
Anybody know how I can avoid re-adding the project every time I start eclipse?
Upvotes: 8
Views: 15896
Reputation: 8595
I just had this too, and I think it was because of a resource filter. I was trying to hide .class files from the open resource dialogue. To fix this problem, I removed my resource filter and cleaned the projects - now it seems to be behaving well.
Upvotes: 0
Reputation: 2556
I've seen this too, and on several occasions though with no clear pattern. I believe it is a bug in Eclipse.
Sometime closing & re-opening project A fixes it. Sometimes I have to delete & re-install Eclipse to fix it.
Upvotes: 2
Reputation: 328830
This error typically happens if the project is closed. But you would get the error as soon as you close C - that is, long before you restart Eclipse.
It's quite hard to say what could cause this. Mabye it's an old bug but I don't remember anything specifically in 3.5 / Galileo.
Try these things:
Upvotes: 0
Reputation: 7926
Try this:
Upvotes: 7
Reputation: 2666
This looks like a windows path names problem. Why do yo name your projects A, B, C and dont give them proper names isntead?
<classpathentry combineaccessrules="false" kind="src" path="/C"/>
I would bet that /C is interpreted errornously as a drive letter, hence your problems.
Upvotes: -1