Re-building a deleted class file in Eclipse

前端 未结 5 1081
Happy的楠姐
Happy的楠姐 2021-02-09 18:33

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:17

    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

提交回复
热议问题