Given the following directory structure:
x-
---|- FindBaz.class
---|
---|- test-|
-----------|- Baz.class
-----------|
-----------|- myApp-|
-----------------------|- Baz.class
And given the contents of the related .java files:
In the
test directory:
In the myApp directory:
If the current directory is x, which invocations will produce the output "test/Baz"?
(Choose all that apply.)
A.
java FindBaz
B. java -classpath test FindBaz
C. java -classpath .:test FindBaz
D. java -classpath .:test/myApp FindBaz
E. java -classpath test:test/myApp FindBaz
F. java -classpath test:test/myApp:. FindBaz
G. java -classpath test/myApp:test:. FindBaz
in k&b the answers are C , F
but why B and E are not true??
I know that the comand java search to file class to execute in the current file by default and the classpaths in the command are used to search the other files that the class file need. since we are already in the x directory, and that directory already contain the file class FindBaz.class .... why B and E are false....??
please if someone can explain me...
thks