Exception in thread "main" java.lang.NoClassDefFoundError: sampl



Hi, I know this is a common error, but this occurs only in some of my
programs.
I run java on windows XP SP2, jdk1.5
My sampl.java file is like this:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class swing_app {
public static void main(String[] args) {
JDesktopPane desktop = new JDesktopPane();
desktop.add(desktop,BorderLayout.CENTER);
JInternalFrame internalFrame = new
JInternalFrame("Internal
Frame",true,true,true,true);
internalFrame.setBounds(50,50,200,100);
desktop.add(internalFrame,new Integer(1));
}

}

It compiles giving me a "sampl.class" file but when i type this
java sampl

I get this error: - Exception in thread "main"
java.lang.NoClassDefFoundError: sampl

I don't get this error in a simple "Hello world" program.....
This is how i've set my paths:

Path=c:\j2sdkee1.3.1\bin;%SystemRoot%\system32;%SystemRoot%;
%SystemRoot
%\system32\WBEM;%SYSTEMROOT%\system32\WBEMC:
\PROGRA~1\COMMON~1\AUTODE~1;.;C:\Java\jdk1.5.0_09\bin;c:\Java
\jdk1.5.0_09\lib;

CLASSPATH= .;C:\Java\jdk1.5.0_09\lib;C:\Java\jdk1.5.0_09\bin;C:
\j2sdkee1.3.1\bin;

Please help!!

.



Relevant Pages

  • Re: "The page cannot be displayed"
    ... > the problem to SP2. ... > Sun Java may solve the problem as corruption with MS Java may give ... Go to the Windows Update Site (Start/All Programs/Windows Update/Personalize ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: SP2 and Javascript problem
    ... > This is a well known problem that happens with the installation of SP2. ... > You can test whether Java is working on your machine at the following ... > Sun also offers an automatic download and install of the 1.4 Java plug-in ... > Allow active content to run in files on My Computer - Windows XP Service ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Links wont open in IE
    ... > One of the links I tried is the play online button at ... > Windows Update history it said that the Windows Service Pack 2 ... The Popcap games like Bejeweled require Java. ... For the SP2 issue, look at the System applet in Control Panel. ...
    (microsoft.public.windowsxp.general)
  • Re: Exception in thread "main" java.lang.NoClassDefFoundError: sampl
    ... Thomas A. Russ wrote: ... I run java on windows XP SP2, ...
    (comp.lang.java.gui)
  • Re: XP SP2 and Java
    ... Microsoft is not required to ship Sun's Java Virtual Machine with Windows. ... Will the XP SP2 come with Sun's Java? ...
    (microsoft.public.windowsxp.general)