When you run it in Command window you must set the path to the
java where you have installed it.
if the Java in your system is jdk1.2.2(for eg) and is in D drive....
in the command window set path using this command
set path=D:\jdk1.2.2\bin
the bin path should be specified like this...
Ajay