Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: Gordon Beaton <not@xxxxxxxxx>
- Date: 30 Sep 2005 18:02:14 +0200
On 30 Sep 2005 08:53:06 -0700, thickface wrote:
> Thanks. That works!
> I would really appreciate it if you would explain why this happens and
> how I prevent this from happening again.
Java searches a "classpath" to find the classes it needs. It's either
specified on the command line with -cp, or in an environment variable
CLASSPATH.
Apparently the current directory (".") wasn't mentioned.
More information is here:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html
http://java.sun.com/j2se/1.5.0/docs/tooldocs/findingclasses.html
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.
- References:
- Exception in thread "main" java.lang.NoClassDefFoundError
- From: thickface
- Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: thickface
- Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: Gordon Beaton
- Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: thickface
- Exception in thread "main" java.lang.NoClassDefFoundError
- Prev by Date: Re: Exception in thread "main" java.lang.NoClassDefFoundError
- Next by Date: Re: How often does a Java Web Start application update itself?
- Previous by thread: Re: Exception in thread "main" java.lang.NoClassDefFoundError
- Next by thread: Re: Exception in thread "main" java.lang.NoClassDefFoundError
- Index(es):
Relevant Pages
|