wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes plz help me out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "plz help me out" Watch "plz help me out" New topic
Author

plz help me out

Prashanth Bhanu
Ranch Hand

Joined: Sep 25, 2003
Posts: 110
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

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.


[Jess in Action][AskingGoodQuestions]
Yan Lee
Ranch Hand

Joined: Sep 15, 2003
Posts: 94
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

"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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: plz help me out