File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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");
//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

Joined: Jul 08, 2003
Posts: 24183

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
Had the same problem. Did the following to solve it.
Hope this helps
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

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:
subject: plz help me out
Similar Threads
Need HELP Temperature Conversion
How to get at frames using HtmlUnit?
StackOverflowError error at Runtime :(
how to access a method from static intializer block
How To increase JToolBar, make JTabbedPanes scrollable