When I imported a new project I could not build it because of “Resource already exists on disk” errors like this.
The simple fix was to remove the directory, typically classes, which contained the file it was complaining about and then refreshing. Removing just the file and then refreshing did not work.
However when I would do an ant build later and then refresh my project I would get the same error.
The better solution is to tell Eclipse not to copy the files it is complaining about to the output folder.
- Go to Project Properties.
- Select Java Compiler -> Building.
- In the Filtered resources box add the files you don’t want copied.
- Rebuild project.
Here is a screenshot showing how I added “*.properties, *.xslt” to the Filtered resources to fix this problem.
This post is awesome! Thanks so much. This has been bugging the heck out of me for about 10 months now. I’ve been looking all around the internet and the typical proposed solution is to just delete the contents of the bin directory, which is a temporary workaround, not a fix to the problem.
Thanks Marty! It had been bothering me for awhile too. 🙂
wah!!! you really helped me…thx a looottttt!!!
Thank you ! I