Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Unable to build the project

Tags:

eclipse

The project was not built due to "Resource already exists on disk: ''.". Fix the problem, then try refreshing this project and building it since it may be inconsistent

I am getting above error whenever I am trying to build the project. Earlier the project was running fine, but all of sudden it stopped running and giving this error.

Eclipse version: Eclipse Java EE IDE for Web Developers. Helios Service Release 1 JRE: jdk1.5.0_22

like image 291
Anshuman Sharma Avatar asked Aug 09 '11 07:08

Anshuman Sharma


4 Answers

  1. Try refreshing the project, clean and rebuild.
  2. Right click on the error, click "Quick Fix" if this is enabled.
  3. Right click on the error, click "Properties" for the details. Try to delete the resource in question from outside eclipse, refresh, clean and build.
like image 79
Nivas Avatar answered Nov 05 '22 02:11

Nivas


  1. Exit Eclipse.
  2. Delete all the java class files (These files located in /bin or like that).
  3. Open Eclipse and wait a minute. The project will be rebuilt by Eclipse(auto).
like image 40
saneryee Avatar answered Nov 05 '22 03:11

saneryee


I had to go to ST_SAMI\web\WEB-INF\classes and delete EVERYTHING under the directory in question. Refreshed and cleaned project and all was well again.

Version: Helios Release (Also J2EE release for web developers)
Build id: 20100617-1415

like image 22
n4rzul Avatar answered Nov 05 '22 02:11

n4rzul


Project right click --> Build Path --> Configure Build Path and you have seen Project source paths.And attention please,

If you have more than one source, you should probably encountered this problem. You should examine each source.

Source click --> edit --> next --> and you seen exclusion patterns and inclusion patterns.

For example, your directory path

source
  |
  \------ExDir
  |
  \------IncDir

You must select for inclusion only IncDir and select for Exclusion only ExcDir

  • If you select for exclusion source Directory you encounter this problem.
like image 38
iceberg Avatar answered Nov 05 '22 03:11

iceberg