Java Errors

Hi there

I am a student in the UK trying to pick up Java from Sams 21 Days Java 2.0 book. I am copying the examples from the book but receive errors when running them, however if I copy the java file from the cd-rom (which appears identical) there are no errors and it works perfectly! I am wondering what I am doing wrong here.

I begin by creating a text file and copying code, then save as .java and then compile in command prompt "javac...." and then run.

one of the errors i have recieved is " exception in thread "main" java.lang.noclassdeffounderror.variables(wrongname:variables)"

Any ideas ? help appreciated

[648 byte] By [rskidorz@hotmail.coma] at [2007-10-1 19:33:03]
# 1
Have you set your classpath?
m-A-ya at 2007-7-11 15:46:11 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...