Eclipse could not delete error

后端 未结 29 1615
粉色の甜心
粉色の甜心 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 18:49

    Update Spring Boots!

    I had the same issue where my spring tool suite threw this error[Windows 7] whenever I make changes to the JSP or resources(css, js, images). It would allow one time save though to reflect the changes but the second time, STS would throw the error that it could not delete the file that I changed [basically could not move the file to bin folder]. I have to stop the application, do project -> clean for the error to go, make the changes and have to start the application. Process explorer said that javaw is having the handle on bindirectory.

    I tried all suggestions that are listed as answers - Recreated the workspace, checked project references, updated my Spring tools suite, disabling windows search, indexing, etc. But none worked.

    Finally I updated my spring boots from 1.4.0 to 1.5.4 and the error disappeared. So if any of you using Spring Boots facing this issue, check your version and update. You may also need to add spring-boot-devtools to enable hot-swapping with the latest spring boots versions.

    0 讨论(0)
  • 2020-12-30 18:50

    I see this semi-regularly on Windows. I think it's a bug or race in Eclipse, maybe a race with a virus checker which doesn't like a delete immediately followed by a write to the same file that was deleted. The fix I use is to use Project -- Clean from the menu bar.

    @Ash is right in the comments above that you should not have resources in your output folder. To help avoid that, I always change the name of my output folder from "bin" to something more obvious like "eclipse/classes"

    0 讨论(0)
  • 2020-12-30 18:53

    This issue came to me when permission of the project directory are changed. Make sure user has write permission to the Project directory. If there are no permission to write to Project directory then eclipse will fail to delete/create Bin folder.

    To Resolve it, I gave write permission to Project directory.

    Ex: sudo chmod -R 777 /MyProject/code (In my case I used Ubuntu, according to OS make sure you give write permission)

    0 讨论(0)
  • 2020-12-30 18:57

    I followed these steps to get rid of this:

    • Close eclipse
    • Go to task manager-->processes-->java.exe-->end process
    • select javaw.exe-->end process
    • Then go to project location delete it
    • start eclipse and delete the project

    cheers... That's it..

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

    1 - Clean your project by going to Project -> Clean.

    2 - Make sure you check Project -> Build automatically.

    But before that, check the permissions on the src and target folders of your project, eclipse needs to read and write to those folders, then release the permissions for it. Your problem will be solved.

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

    I had to end chromedriver before I could clean my project. There were processes in the task manager that needed to be closed.

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