Hey guys,
I got some question about the Development Self Test.
First of all the question number 12.
And as the right answers the F and G are listed:
but I also think that the answer C is good:
(which is the same as F and G just without the current directory to look for)
but if we are in the directory "x" then there is nothing to look for there. I mean, the GoDeep.class while executed will look for Foo.class which is accesible in test/MyJar.jar so the classpath equal to "test/MyJar.jar" should be enought, no? What do you guys think?
And another question number 11 which is cited here: https://coderanch.com/t/474863/java-programmer-SCJP/certification/Mistake-GuideBook-SCJP-Java-Chapter
I am wondering how would the correct answer look like. Why it is not C? I mean the JAR file is in the current directory so just pointing it shouldn't be bad. Or another solution I can see is something like this:
What would be the correct solution for this task? I mean besides the 4 proposed in the answer sheet.
Cheers,
Jan.
I got some question about the Development Self Test.
First of all the question number 12.
And as the right answers the F and G are listed:
F. java -classpath .:test/MyJar.jar GoDeep
G. java -classpath test/MyJar.jar:. GoDeep
but I also think that the answer C is good:
C. F. java -classpath test/MyJar.jar GoDeep
(which is the same as F and G just without the current directory to look for)
but if we are in the directory "x" then there is nothing to look for there. I mean, the GoDeep.class while executed will look for Foo.class which is accesible in test/MyJar.jar so the classpath equal to "test/MyJar.jar" should be enought, no? What do you guys think?
And another question number 11 which is cited here: https://coderanch.com/t/474863/java-programmer-SCJP/certification/Mistake-GuideBook-SCJP-Java-Chapter
I am wondering how would the correct answer look like. Why it is not C? I mean the JAR file is in the current directory so just pointing it shouldn't be bad. Or another solution I can see is something like this:
What would be the correct solution for this task? I mean besides the 4 proposed in the answer sheet.
Cheers,
Jan.