Page 1 of 1

Posted: Tue Apr 03, 2001 7:32 pm
by bitSLAP
I can't get my lab to work. It's definately a setup issue, since the solution posted does the same thing:

C:\Programming\CSI1102\Lab08>java HectorTest.java
Exception in thread "main" java.lang.NoClassDefFoundError: HectorTest/java

Does anyone have an idea as to what might be wrong? I've never gotten this before.

Posted: Tue Apr 03, 2001 7:35 pm
by kenada
Trying to directly execute Java source code won't work. After compiling the java source file with javac (e.g., <code>javac Foo.java</code>), type <code>java Foo</code> to execute the bytecode stored in the <code>Foo.class</code> file, which was produced by <code>javac</code>.
<hr/>
Edit: Rewording things to be more clear (I hope ;) ).

Posted: Tue Apr 03, 2001 7:43 pm
by bitSLAP
OH MY GOD I'M STUPID...

I've compiled and run stuff about 294387 times now and somehow I didn't catch that after trying it over and over. Thanks.

Sh*t on me...