My java woes continued...

Kick Back and Relax in the Cheers! Forum. Thoughts on life or want advice or thoughts from other pca members. Or just plain "chill". Originator of da Babe threads.
Post Reply
bitSLAP
Golden Member
Posts: 1218
Joined: Fri Dec 08, 2000 1:19 pm
Location: Fredericton
Contact:

Post 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.
kenada
Genuine Member
Posts: 98
Joined: Wed Nov 22, 2000 12:37 pm
Location: F City

Post 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 ;) ).
bitSLAP
Golden Member
Posts: 1218
Joined: Fri Dec 08, 2000 1:19 pm
Location: Fredericton
Contact:

Post 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...
Post Reply