I know the implementing as above is impossible. There may be a package can resolve this problem, write a line in JAVA code at head: package myjavaapplications; and run it like java myjavaapplications.Test
But this only resolved a part of the problems. How could I find a certain disk, F:\. Maybe you say just change the directory using cd instruction. But the point is I will implement the things in a program like this:
Either (1) use the "-cp" switch to set the class path for the Java executable, or (2) create a batch file in which you run the program, including either the -cp switch or a "set CLASSPATH" command, and run that from your Java program.