The current directory should be in p1's parent directory. Forexample (assuming Windows), if the path is c:\xxx\p1, then you shouldbe in xxx. Then to compile, do:javac -classpath . p1\test.javaTo run, do:java -classpath . p1.test