Forums Register Login

What about this error message

+Pie Number of slices to send: Send
Hello Friends
I have installed jdk1.3 beta. to test I worte this piece of code

<<file name is a1.java>>
import java.lang.*;
import java.util.* ;
import java.io.* ;
public class a1 {
public static void main(String args[] )
{
System.out.println("HI Awdhesh You have done it");
}
}
NO complie time error
while executing the error read is

" Exception in thread "main" java.lang.NoClassDefFoundError: a1 "
Can someone reply to this as what should I do
Also pl. specify what should be my classpath <<drive>>\jdk1.3 or ???

Thanks
+Pie Number of slices to send: Send
Your classpath needs to include whereever the class file for a1 is. Also make sure that the capitalization of your java command matches the way it is in the class file (looks right but . . .)
+Pie Number of slices to send: Send
Try running your program using this:

java -classpath . a1

The -classpath . specifies "look in THIS directory for a1".
Susan
+Pie Number of slices to send: Send
Thanks problem is solved.
+Pie Number of slices to send: Send
Thanks Susan,
I was having the same problem with my DOS Promt. Your tip worked for me too. Cool! Does that mean my Autoexec.bat is using a different classpath?
Percy
I'm doing laundry! Look how clean this tiny ad is:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 619 times.
Similar Threads
compilation error
Package Question II
Values of Hash Map to be 2-dimensional array
Whats happens actually.
Read file from directory, update contents of the each file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:46:31.