This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 24183
    
  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: 24183
    
  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.
 
Don't get me started about those stupid light bulbs.
 
subject: plz help me out