Running java after file is compiled

I compiled a simple file

class Grades {

public static void main(String args[]) {

System.out.println("it's not much, but it's a start...");

}

}

after compiling, which seemd to work fine, when I tried to run it I got the following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: Grades

Am I supposed to set a classpath? If so is this a command I write in my autoexec.bat or where do I put it.

I cannot find where the classes are stored. Please advise

[551 byte] By [kimro] at [2007-9-26 1:24:03]
# 1
Hi,You should be able to run it withjava -classpath . Gradesor you can add the following to your autoexec.bat:set CLASSPATH=.Hope this helps,Kurt.
leukbr at 2007-6-29 1:03:38 > top of Java-index,Desktop,Deploying...
# 2
That Worked, thanks.
kimro at 2007-6-29 1:03:38 > top of Java-index,Desktop,Deploying...