Can compile , cannot run...

I'm using J2SE , and using command prompt to compile my java class file, after I compile without any errors, then when I try to run it, it gave the error message Exception in thread "main" java.lang.NoClassDefFoundError: assignment6, why?
[253 byte] By [Stephensawa] at [2007-10-1 23:05:18]
# 1

There can be a number of causes. The most likely is that the class search path if configured badly on your computer. The easiest way to configure a working class search path is to not do it; the default works perfectly. If you haven't touched the class search path, it could be that some software installer has done it without you being aware.

Try running with the command "java -classpath . assignment6" and see if it works. If it does, the problem was with the class path. How to change the class path permanently depends on the operating system you use.

If it doesn't work, there are still a few other things than can be tried ..

http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR

jsalonena at 2007-7-15 14:00:22 > top of Java-index,Administration Tools,Sun Connection...
# 2
If you are using some package structure such as package com;in your program then compile it using javac -d . assignment6.javathen run using java com.assignment6ie., use the package.filename ie., fully qualified classname.
ShivaKatulaa at 2007-7-15 14:00:22 > top of Java-index,Administration Tools,Sun Connection...