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



Knute Johnson <nospam@xxxxxxxxxxxxxxxxxxxxxxx> writes:

xcrazy wrote:
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:
....
class swing_app {

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

I don't know how you get it to compile if it is in a file named
sampl.java? The file name and the class name must match.

I think this is only true for public classes. Non public classes can be
included in files with any name. (Not that it's a good idea....)


--
Thomas A. Russ, USC/Information Sciences Institute
.



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)