Hi Deepa,
I downloaded the exam from this link
http://www.ii.uib.no/~khalid/pgjc/jcbook/engine.html. Maybe as per my guess the download was not proper.Anyway after downloading to your directory go from the command prompt to that directory and say
set classpath=.;%classpath;and then i typed in
java -jar pgjc-engine.jar
It worked on my machine,i am also using jdk 1.2.2.
Try downloading the stuff once again,it might work.