I could not understand why E and H are the correct alternatives, if someone can give me a strength in that part of the classpath would be grateful, is the subject which will enable me to be ready for scjp Sorry bad grammar because I'm from Brazil Thanks
Thanks Ankit Garg for answer
I'm reading the link you gave me but still do not understand how it works right, is the subject remaining to complete my studies for the test scjp Thanks for answer
Juliet Smith
Greenhorn
Joined: Apr 12, 2010
Posts: 3
posted
0
I agree that H contains a mistake, but not with Ankits reply (the jar filename is correctly shown in option H as mp.jar and not cp.jar as he states)
I think H should read java -cp /jars/mp.jar player.MusicPlayer
(The question states "You are currently in the directory /mp")
would look for the jars directory under the root folder.
You need to get ride of the forward slash before jar to get this command line to work.
It helps to understand the classpath if you remember that for the .class files it is enough to give the path to the directory that contains the directory with the same name as the first part of the package declaration.
To use a JAR file you have to give it the name of the file. Giving it the name of the directory containing the JAR file will not work.