[thelist] Java Question

klute soundres9 at yahoo.com
Thu Nov 18 16:50:47 CST 2004


each .java file must have at one public class (whose
name should match the file name minus the extention).
so just declare your class as "public class Hello" and
you should be fine

james
---
http://www.devbistro.com

--- Tom Dell'Aringa <pixelmech at yahoo.com> wrote:

> It's been quite some time since I did any java (and
> I was always only a beginner). Anyway, just
> doing a hello world thing but getting an error. I
> have the jdk1.3.1_03 installed. 
> 
> My little program is:
> 
> class Hello
> {  
>    public static void main(String args[])
>    {
>       System.out.println("Hello World");
>    }
> }
> 
> Compiles just fine. However when I run it (java
> Hello) I get:
> 
> Exception in thread "main"
> java.lang.NoClassDefFoundError: hello
> 
> Searching on the net says this happens when you have
> a lowercase filename/class but I don't have
> that - both the filename and the class name are
> "Hello". Any ideas?
> 
> Tom
> 
> =====
> 
> http://www.pixelmech.com/
> 
> Look, it's not in my nature to be mysterious. But I
> can't talk about it and I can't talk about why.
> 
> -- 
> 
> * * Please support the community that supports you. 
> * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip
> Harvester 
> and archives of thelist go to:
> http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 



		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



More information about the thelist mailing list