Q:

Eclipse: to src/ or not to src/

I have two projects I created in Eclipse, one of which creates new classes in a src/ subdirectory, while the other creates them in the project root directory. (New classes are being created with Eclipse's File->New->Class menu item.)
What did I configure in these projects that makes them act differently?
How can I fix the project without a src/ sub-directory so it has one?

A:

Check your Java project's Build Path property page. The Source tab indicates the root(s) of the source packages, and setting the project root itself as a Source Folder is perfectly valid. The wizard is just picking the first/default Source Folder.

