Y
yihucd
I have a small java program(the smiplest I can have). When I tried to
run after compling it, it shows the error:
Exception in thread "main" java.lang.NoClassDefFoundError: test
what might go wrong?
--------------------------------------------------here is what I did
-------------------------
C:\>type test.java
public class test{
public static void main(String[] args){
System.out.println("OK");
}
}
C:\>javac test.java
C:\>dir test.*
Volume in drive C has no label.
Volume Serial Number is B496-E852
Directory of C:\
02/20/2006 02:27 PM 404 test.class
02/20/2006 09:51 AM 93 test.java
2 File(s) 497 bytes
0 Dir(s) 11,949,969,408 bytes free
C:\>java test
Exception in thread "main" java.lang.NoClassDefFoundError: test
C:\>
run after compling it, it shows the error:
Exception in thread "main" java.lang.NoClassDefFoundError: test
what might go wrong?
--------------------------------------------------here is what I did
-------------------------
C:\>type test.java
public class test{
public static void main(String[] args){
System.out.println("OK");
}
}
C:\>javac test.java
C:\>dir test.*
Volume in drive C has no label.
Volume Serial Number is B496-E852
Directory of C:\
02/20/2006 02:27 PM 404 test.class
02/20/2006 09:51 AM 93 test.java
2 File(s) 497 bytes
0 Dir(s) 11,949,969,408 bytes free
C:\>java test
Exception in thread "main" java.lang.NoClassDefFoundError: test
C:\>