Fix 'Build Path' Error or Missing File in Eclipse Project

(0 votes, average 0 out of 5)

Sometimes the Eclipse IDE will refuse to build a project - citing a missing resource or file or just a generic "build path" error. If the resource is not missing but in the folder where it should be, the build path may just need to be refreshed. If you encounter a build error when trying to run a project, try these steps to resolve it:

  • Make all files in the project read-write. To do so, go to the Eclipse workspace in the file manager (e.g. Windows Explorer, Finder, or Nautilus), right-click on the project root folder and go to Properties. If the Read-only box is checked, uncheck it and click OK. When prompted for which files to change, select Apply changes to this folder, subfolders, and files
  • Back in Eclipse, right-click on the project and go to Build Path - Configure Build Path. Look through all of the folders on the build path and see if any of them seem incorrect. For example, if Excluded is set to "**" and it shouldn't be. If necessary, remove and add any of these entries again, or simply add the entire src folder of the project. Once done, click OK
  • To make sure these changes are used, clean the project by going to Project - Clean... and let it run.

Once these steps are done, try running the project again to see if it works. It may be necessary to edit the build path a few times, so just repeat the 2nd and 3rd bullets. 

Partner Links:
 
Related Articles

» Copy or Backup Files Faster in Windows 7 or Vista Using Window's Robocopy

In all versions of Windows 7 there is a little known but easy to use utility bundled in called Robocopy.  Why would you want to use Robocopy over just dragging and dropping or copying and pasting files and folders over manually? Here are some reasons why you might want to add Robocopy to your toolbox of useful utilities:Robocopy is MUCH faster at copying a large number of files from one location to another compared to the built in Windows copy.Robocopy can intelligently "Backup" (Mirror) a...

» Make an ISO file from Folders or CDROM drive in Linux

If you want to create an ISO image of a CD/DVD or a folder and its contents for archive purposes, copies, easy mounting, burning out, and other purposes, Linux comes with two quick and easy to use command line utilities to make this happen dd and mkisofs.First you will need to open a terminal ("CTRL + ALT + T" in Ubuntu) and type in the following commands for the operation you want to accomplish. CD/DVD Drive:Type: sudo umount /dev/cdrom to unmount your CDRom drive from the...

» Java - Reading and writing a properties file

A properties file in Java can be very useful when you start to notice that there are many locations in your code where you are either hard coding values, many constants, or using enums. Instead of including these values directly in your code, you can refactor them out to a properties file to separate responsibilities. Instead of potentially specifying values throughout many classes or programs, all values can be condensed into one or more properties files as need.An example of a properties file...