title: Can I specify a "base package path" for a directory in Java?
body: <p>If I have a Java package, for example:</p>
  
  <pre><code>package org.foo.bar.stuff;
  </code></pre>
  
  <p>I can store the source <code>.java</code> files in a directory <code>src/org/foo/bar/stuff</code>, given that I add <code>src/</code> to my classpath. In this example the directory contents tree is like this:</p>
  
  <pre><code>`-- src
      `-- org
          `-- foo
              `-- bar
                  `-- stuff
                      |-- ICat.java
                      `-- IMouse.java
  </code></pre>
  
  <p>If I could define a "base" package name, eg. <code>org.foo.bar</code> for a <em>directory</em> like <code>/stuff</code>, the tree could become like this:</p>
  
  <pre><code>`-- src
      `-- stuff  # has defined base "org.foo.bar"
          |-- ICat.java
          `-- IMouse.java
  </code></pre>
  
  <p><strong>Is there technically a way to define a "base" package name, ie. <code>org.foo.bar</code>, for a <em>directory</em> like <code>/stuff</code>, in order to avoid nested directories?</strong></p>