Use the following code to find out where the class loader will load. The following code worked for me in an empty project .
public class Test {
public static void main(String[] args)
{
URLClassLoader loader = (URLClassLoader) Test.class.getClassLoader();
System.out.println(Arrays.toString(loader.getURLs()));
System.out.println(loader.getResource("foo/Test.class"));
}
}
Make sure there are no errors in the workspace.
See if the file exists in the view Navigator.
Try cleaning the project once.
source
share