NoClassDefFoundError
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Humberto_Leon
Posted On:   Saturday, May 11, 2002 09:06 AM

When I issue the DOS command, java buttonDir, to try to run a java program, I get the error message, "Exception in thread "Main" Java.Lang.NoClassDefFoundError: buttonDir. I would like to know why and the way to solve it. The source code of the program is the following: import java.awt.*; import java.applet.Applet; public class buttonDir extends Applet { public void init() { setLayout(new BorderLayout()); add("North", new Button("North")); add("South", new Button("South")); add("East", new Button("East")); add("West", new Button("West")); add("Center", new Button(&q   More>>

When I issue the DOS command, java buttonDir, to try to run a java program, I get the error message, "Exception in thread "Main" Java.Lang.NoClassDefFoundError: buttonDir. I would like to know why and the way to solve it. The source code of the program is the following:

			
import java.awt.*;
import java.applet.Applet;

public class buttonDir extends Applet {
public void init() {
setLayout(new BorderLayout());
add("North", new Button("North"));
add("South", new Button("South"));
add("East", new Button("East"));
add("West", new Button("West"));
add("Center", new Button("Center"));
}
}

   <<Less

Re: NoClassDefFoundError

Posted By:   Bozidar_Dangubic  
Posted On:   Monday, May 13, 2002 05:50 AM

buttonDir class is not in the classpath. that is the source of your problem. put this class in the classpath and everything will work just fine.
About | Sitemap | Contact