I’m not sure why I get a java.lang.NoClassDefFoundError runtime error on the following line:
this.startBtn.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
startClicked();
}
});
in an Applet. It compiles fine. How can the jre not find a core awt class? I use the same line in a different applet without issues. What am I not understanding?
Thanks in advance
Take a look at “NoClassDefFoundError in Java Applet on invokeLater()“. Compiling the class that contains your code snippet will produce other class files like
MyClass$1.class. Make sure they’re also deployed.