Search code examples
javaeclipse.class-file

How can I clean up my eclipse project after deleting a .java whose .class file still seems to be somewhere?


So, I deleted a couple of .java files from within eclipse because I didn't need them anymore. However for some reason another class still uses them and compiles without a problem. When I go to the declaration of the constructor of one of the deleted classes a .class file opens of that class even though I thought they got deleted by eclipse when I deleted their .java files.

I have tried to clean the project and I tried to find the .class file using the system file explorer in the folders that are listed in

project > properties > resource > linked resources. However I couldn't find them.

Now, since I deleted those files/classes there should be a compile time error wherever they are used but everything compiles without an error, even using the code that should've gotten deleted. A colleague that recently joined the project does receive compile time errors, since he doesn't have those class files. And I want to get them too, so I can fix the code where the classes were used. Of course he could show me the lines of code that are affected but if this happens again he would probably be affected as well as he would have the class files by then.


Solution

  • I found the problem. Someone built a .jar file I didn't know of which contained a lot of old code. I found it by right clicking the constructor and selecting

    references>project