• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plz help me out

 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code i written is
import java.awt.*;
public class FrameWindow{
public static void main(String arg[]){
Frame m = new Frame("Malla");
m.setVisible(true);
m.setSize(100,100);
//java.awt.Dimension dim = m.getSize();
System.out.println("Dimension "+m.getSize());
}
}
It compiles but when i execute it gives out the error saying
"Exception in Thread "main" java.lang.NoClassDefFoundError: FrameWindow
If u have the solution plz let me know how to sort it
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This just means that Java can't find the FrameWindow.class file. If you've set the CLASSPATH environment variable, you've probably forgot to include the "." (dot) entry, which stands for the current directory. When you're just starting out, it's best to not set the CLASSPATH explicitly at all.
 
Yan Lee
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
Had the same problem. Did the following to solve it.

http://www.java-fundas.blogspot.com/
Hope this helps
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"p",
Surprised this was of any help to you, as the information about needing to set CLASSPATH, and what to set it to, are wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic