Re-building a deleted class file in Eclipse

前端 未结 5 1582
走了就别回头了
走了就别回头了 2021-02-09 19:06

I accidentally deleted a .class (Java bytecode) file in my project (on the filesystem, not using Eclipse itself). Easy to fix, right? Just re-build it. But that doesn\'t work! E

5条回答
  •  别那么骄傲
    2021-02-09 19:23

    Do a complete clean

    1) Find and delete the .eclipse folder (you may back them up first)

    2) Delete related .class files

    3) If there are any .svn folders, delete them either manually or via your svn client

    4) Do not use auto build for this, but manually select only the broken project and do a clean (in case there are dependencies)

    If that fails, probably a good idea to package your source codes and re-import as a new project. That can avoid wasting time on a probable IDE bug

提交回复
热议问题