Change the Source Code Directory in Eclipse

For some reasons, an Eclipse project can change. When the src/ directory is not any more the source code directory, or if you are building another type of project, you have to change the source code directory. How to do that ?
Simply :

  1. Make a refresh of the project (just to be sure every directories are know by Eclipse)
  2. Right click on the project : Properties > Java Built Path. Then go to the “Source” tab.
  3. There, you can add/remove folder of the project, and define them as the source directory.

change_src_folder