title: javac "cannot find symbol" error with command line
body: <p>I have two classes Owning and OwningAccessor. The files are in the same directory.</p>
  
  <pre><code>public class Owning {
      String _name = "";
      public void printBanner()
      {
      }
      public void printOwning(double amount)
      {
          printBanner();
  
          //print details
          System.out.println("name:" + _name);
          System.out.println("amount:" + amount);
      }
  }
  
  
  public class OwningAccessor {
      public void access()
      {
          Owning o = new Owning();
          o.printOwning(500);
      }
  }
  </code></pre>
  
  <p>When I tried to compile <code>OwningAccessor</code> with <code>javac -cp . OwningAccessor.java</code>, I got compilation error. </p>
  
  <pre><code>symbol  : class Owning
  location: class smcho.OwningAccessor
          Owning o = new Owning();
          ^
  OwningAccessor.java:6: cannot find symbol
  symbol  : class Owning
  location: class smcho.OwningAccessor
          Owning o = new Owning();
                     ^
  </code></pre>
  
  <p>What's wrong with this? The code compiles fine under eclipse IDE.</p>