Eclipse won't delete files

2019-04-15 06:44发布

I've got an ANT project with libs managed by ivy (they are under lib_managed). Eclipse is using the jars to. Probelm is: if I try to update the directory ant refuses to delete it because eclipse holds on to the jars in its classpath. Even if I update (empty) eclipses classpath I can't delete the files. If anyone had the same problem and found a solution I would be thankfull for an answer.

Regards, Jan

标签: eclipse ant
3条回答
Evening l夕情丶
2楼-- · 2019-04-15 07:08

Not a solution, but a workaround. I experience Eclipse keeping locks on files quite often in different contexts. I suggest using Unlocker.

查看更多
干净又极端
3楼-- · 2019-04-15 07:12

I guess this is on Windows. Use the Process Explorer to figure out who is locking the files. Eclipse shouldn't keep a lock; maybe you have the code running in the debugger (hanging in a breakpoint). Use the list of open files and the properties to figure out which Java program is keeping the lock on the files.

If it's really Eclipse, try to upgrade to a newer version of Eclipse or close the project when you need to update the dependencies with ivy.

查看更多
地球回转人心会变
4楼-- · 2019-04-15 07:19

Cleaning the workspace and restarting eclipse may solve the problem. But in real development environment i don't think its a good idea to restart eclipse whenever you need to build a jar.

查看更多
登录 后发表回答