I have created a java program and prevented the class file to be saved in package where source file is saved say pracjava by using these steps:

include the package abc like that
package abc; in program

and then compling the prog in this way
e:\pracjava\javac -d . prog.java

this creating class file inside abc package which is inside pracjava package

but when i am executing program using
e:\pracjava\java prog
then it is not running
giving error no classdef found error

i have set path to c:\jdk1.5\bin
and classpath to e:\pracjava


however when compling the program using
e:\pracjava\javac prog.java

and then executing it. It is not giving any error