When putting my classes in a package the code breaks
<p>I have some java classes that work fine until I put them in a package (which they really should be in) and I can't work out why.</p>

<p>Class Board</p>

<pre><code>import javax.swing.JPanel;

public class Board extends JPanel {
    public Board() {
    }

    public static void main(String[] args) {
    }
}
</code></pre>

<p>Class Skeleton</p>

<pre><code>import javax.swing.JFrame;

public class Skeleton extends JFrame {

    public Skeleton() {
        add(new Board());
        setTitle("Skeleton");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(300, 280);
        setLocationRelativeTo(null);
        setVisible(true);
        setResizable(false);
    }
    public static void main(String[] args) {
        new Skeleton();
    }
}
</code></pre>

<p>And all this works fine until I put </p>

<p><code>package skeleton;</code></p>

<p>at the top of each one.</p>

<p>upon doing so I get </p>

<pre><code>skeleton.java:9: error: cannot find symbol
        add(new Board());
                ^
  symbol:   class Board
  location: class Skeleton
1 error
Error: Could not find or load main class skeleton.Skeleton
</code></pre>

<p>Its probably something simple that i have overlooked but I can't seem to find out what is wrong with it.</p>

<p>Edit</p>

<p>Both the classes are in a file called skeleton and skeleton is always spelled correctly.</p>

<p>Im am running javac on both Board.java and Skeleton.java and java on skeleton.Skeleton</p>

<p>EDIT 2</p>

<p>I fixed the</p>

<pre><code>skeleton.java:9: error: cannot find symbol
            add(new Board());
                    ^
      symbol:   class Board
      location: class Skeleton
</code></pre>

<p>error, I forgot I was passing each file to javac individually, but the</p>

<pre><code>Error: Could not find or load main class skeleton.Skeleton
</code></pre>

<p>still persists.</p>
