title: Package does not exists - Java
body: <p>This is a very trivial question, but stack doesn't seem to have very many good answers on it. (see below for the tree structure)</p>
  
  <p>in <code>start.java</code> I am doing: <code>import web.*</code>, but it cant find the package web. All the classes in web are either <code>package web.exceptions;</code> or <code>package web;</code> or even <code>package web.interfaces;</code></p>
  
  <p>And I thought for importing packages you do: <code>import path.to.package.name.*;</code> where star imports all classes of that package, or you could do <code>import path.*;</code> which would import all packages and sub packages and their classes.</p>
  
  <p>What am I missing?</p>
  
  <p>The exact error is:</p>
  
  <pre><code>start.java:1: error: package web does not exist
  </code></pre>
  
  <p><strong>The class in question is:</strong></p>
  
  <pre><code>package src; // right package?
  
  import web.*;
  
  public class Start{
  
      public static void main(String[] args){
          if(args[0].startsWith("--port")){
            String[] argument = args[0].split("=");
            WebServer webServer = new WebServer(argument[1]);
          }
      }
  }
  </code></pre>
  
  <p><strong>Tree Path</strong></p>
  
  <p>I moved <code>Start.java</code> to <code>web/</code> and changed the <code>import web.*;</code> to <code>import server.*;</code> now it doesn't know where server is, or what it is ... </p>
  
  <pre><code>.
  └── src
      ├── MainClass.txt
      └── web
          ├── Start.java
          └── server
              ├── WebServer.java
              ├── exceptions
              │   └── WebServerException.java
              └── interfaces
                  └── WebServerInterface.java
  </code></pre>