I have the following setup in my project:
com.foo
- Main
com.foo.util
- StringUtil
In Main I import the StringUtil using
package com.foo;
import com.foo.util.StringUtil;
And use it just as you would use it;
StringUtil string = new StringUtil();
Yet, eclipse keeps telling me that StringUtil cannot be resolved to a type – how can this be?
I already tried refreshing the project, reimporting it as a new project, clicked through the build paths but everything seems to be set up correctly.
But still, eclipse doesn’t recognize the class and won’t compile my project.
Turns out it was due to some messed up eclipse installation.
Wiping the project, checkout it again and reimport it in a restarted eclipse solved every issue.