Calss path problem
Hi All,
I had installed J2SE 5.0. I had Set the PATH to J2SE 5.0 Directory. When ever I execute the following
c:\>javac MyProg.class
it gives error
Exception in thread "main" java.lang.NoClassDefFoundError: MyProg/class
Please help me why this error is coming and how can i rectify it.
Try reposting in this forum:
http://forum.java.sun.com/category.jspa?categoryID=5
Here are a few questions that people in the Java forum may ask:
1) Is the file containing class MyProg named MyProg.java? (javac is case sensitive, it and expects the file to be named {something}.java)
2) Is the class MyProg public?
3) Does the class MyProg contain a public method main?
4) Does the program work properly in Java 1.4?
It may be helpful to post the exact commands you're typing, the first page of the source code containing main.