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:
package controls;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
public class RButton {
public RButton() {
}
}
I get the following error:
java.lang.NoClassDefFoundError: RButton (wrong name: controls/RButton)
The RButton.java file is located in the directory "project folder\ribbon\controls\". In the Ribbon folder I've been able to successfully put package ribbon;
at the top of my source files there. I can't understand what I'm doing wrong here. Any help?
Edit: 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!