Eclipse could not delete error

后端 未结 29 1619
粉色の甜心
粉色の甜心 2020-12-30 18:25

I\'m working on a project with Eclipse and by now everything was fine, but last time I\'ve tried building it, it returned the error,

\"The project was

相关标签:
29条回答
  • 2020-12-30 19:01

    I had a similar problem with windows XP/Vista. In my case the total length of the file was more then 255 characters long.

    /abcd/abcd/abcd/abcd..../abcd

    The only solution I found was to rename the directories to make it shorter then 255 characters.

    /a/a/a/a/a/a/a.../a

    After that you can delete it. It is a restriction in the windows API. The file system can manage more then 255 characters but not the explorer which uses the windows api.

    0 讨论(0)
  • 2020-12-30 19:01

    This just happened to me. I had User Access Control (UAC) turned off when it happened (windows vista 32 bit). I turned UAC back on, rebooted vista and then the error went away. Counter intuitive that with UAC turned off, delete of the bin/net directory fails, but with UAC back on it works. Go figure.

    0 讨论(0)
  • 2020-12-30 19:01

    I fixed this by disabling windows search indexing. I seem to remember quite a while ago I tried to search my project folder using windows file explorer. I guess windows has kept it's search index up-to-date since then by scanning the folder and is now bumping heads with eclipse clean.

    To disable:

    1. Control Panel
    2. Administrative Tools
    3. Services
    4. Find "windows search"
    5. Disable it

    Since windows search is broken, I don't use it anyway. I use agent ransack for searching.

    0 讨论(0)
  • 2020-12-30 19:04

    I have this problem semi-regularly, particularly when deploying to Tomcat or such like, under Windows 7. It also happens to me with the command line version of maven as well, so it's not just Eclipse that has this problem.

    The root cause is that something is holding onto a file handle. Most of the problems went away when I disabled windows search/indexing on my PC, but the problems sometimes still occur.

    To track down what is going on, you need to download Process Explorer (one of the most useful programs that I have ever come across). This allows you to see exactly what is running on your PC, the files it has open, the performance of the processes, how much cpu it's running, the amount of IO it's doing etc. When you have a file that can't be deleted, you can Find->Find Handle or DLL, and enter part of the name, and it gives you who has it open. You don't always catch it in time, but often enough to know the culprit.

    enter image description here

    0 讨论(0)
  • 2020-12-30 19:04

    I just had this problem and it was TGitCache.exe locking the bin folder. If you use TortoiseGit, just kill the TGitCache.exe process and you should be all set.

    0 讨论(0)
  • 2020-12-30 19:04

    Just hit myself with same problem: could not clean / rebuild Eclipse project, because my classes output folder could not be deleted.

    I closed Eclipse and tried to delete the folder. Windows complained it is used by other application.

    Being on Windows, I run resmon.exe from Windows / Search bar. Then going in CPU tab / Associated Handles I search for that folder path and I found handle for it from OUTLOOK. I sent a mail with a file from that path and it seems OUTLOOK kept it. After deleting the handle entry, everything worked again.

    0 讨论(0)
提交回复
热议问题