Re: NoClassDefFoundError
- From: Knute Johnson <nospam@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 22:20:55 -0700
Eli Luong wrote:
I was wondering what the reason is behind this. I recently installed
the Java 5.0 SDK. Compiling *.java files seems to work fine, but
whenever I try to run something, it gives me that NoClassDefFoundError.
I've seen a solution is to run it as java -classpath . ClassName, but
that's some strange workaround I don't like. Why is this happening? Do
I have to install the SDK in a directory that contains no spaces? By
default it ended up in Program Files\Java.
Thanks,
- Eli
You shouldn't need a classpath to run a class in the current directory if it has no package. Check to make sure that you don't have a classpath specified in the environment. If you do, it could be that it doesn't have . in it like it should.
--
Knute Johnson
email s/nospam/knute/
.
- References:
- NoClassDefFoundError
- From: Eli Luong
- NoClassDefFoundError
- Prev by Date: NoClassDefFoundError
- Next by Date: Re: TableSorter.java v2.1
- Previous by thread: NoClassDefFoundError
- Next by thread: Re: NoClassDefFoundError
- Index(es):
Relevant Pages
|