if you are using Windows do this
set classpath=%classpath%;.;
type the above command in the command prompt from the directory of your class
file location.
suppose the class file is in c:\java
open command prompt and change directory to java
and issue the command.
if you are unix
use
set CLASSPATH=$CLASSPATH: