Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: Gordon Beaton <not@xxxxxxxxx>
- Date: 30 Sep 2005 17:35:39 +0200
On 30 Sep 2005 07:57:53 -0700, thickface wrote:
> I used both with class and without class. I got the same following
> message.
*Without* is the right one. java wants the name of the class, not the
name of the class file.
> Exception in thread "main" java.lang.NoClassDefFoundError:
> HelloWorldApp(/class)
>
> I was able to compile and run in the Linux machine at the University.
> So, seems like problem is in my laptop envirionment.
If you're in the same directory as the class file, try it like this:
java -cp . HelloWorldApp
(I'm assuming you've correctly compiled with javac prior to this)
/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
.
- Follow-Ups:
- Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: thickface
- Re: Exception in thread "main" java.lang.NoClassDefFoundError
- References:
- Exception in thread "main" java.lang.NoClassDefFoundError
- From: thickface
- Re: Exception in thread "main" java.lang.NoClassDefFoundError
- From: thickface
- Exception in thread "main" java.lang.NoClassDefFoundError
- Prev by Date: Re: Why no SSCCEs?
- 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
|
|