title: java.lang.NoClassDefFoundError when making Java package
body: <p>I'm not exactly a total beginner with Java, but I'm at a loss for understanding what's going on here.  When I try to compile the following code:</p>
  
  <pre><code>package controls;
  
  import java.awt.*;
  import java.awt.event.*;
  import java.util.*;
  import javax.swing.*;
  
  public class RButton  {
      public RButton() {
  
      }
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: RButton (wrong name: controls/RButton)
  </code></pre>
  
  <p>The RButton.java file is located in the directory "project folder\ribbon\controls\".  In the Ribbon folder I've been able to successfully put <code>package ribbon;</code> at the top of my source files there.  I can't understand what I'm doing wrong here.  Any help?</p>
  
  <p><strong>Edit:</strong> The problem lies with the batch file that I use in conjunction with Sublime Text for Java source files.  JCreator has no problem compiling and running.  Thanks for the help.  though!</p>