Create a classpath environment variable, store all your class files in this.
with this u will b able to excute java from any of the drives.
If this doesnt solve the purpose, put all the java files in a package with
classpath set, this wud solve the problem