Java package structure versus folder structure
<p>All Java projects I have seen use a folder structure that follows the package structure. This results I large number of folders that do not contain any files. </p>

<p>So for example packages start with <code>com.mydomain.mysystem.myutility</code>. This would result in a folders <code>src\com</code>, <code>src\com\mydomain</code>, <code>src\com\mydomain\mysystem</code> that do not contain any files. Most likely the <code>myutility</code> will also only contain only folders. </p>

<p>Most likely there will also be a project folder that contains the name <code>myutility</code> so the complete folder path could be <code>myutility\src\main\java\com\mydomain\mysystem\myutility\otherfolder</code></p>

<p>This practice is very common but it makes we wonder how useful it is. What is benefit compared to the situation where these extra folders are not created? Using for example <code>myutility\src\main\java\otherfolder</code></p>

<p>It seems to be just as valid but it saves everybody the extra navigation steps. I can compile Java source files with both approaches just fine. </p>

<p>In a project typically all source is in <code>com\mydomain\mysystem</code>. What is the benefit of putting those 'empty' folders in all projects?</p>

<p>Just to be clear, I am not questioning the usefulness of package structure. Also Maven is clear.</p>

<p>The question is why we use the empty folders that are typically the same throughout the repository for an organisation.  </p>