Given the following directory structure:
/proj |--- lib | |--- supercharge.jar | |--- src |--- top |--- sub |--- A.java
Assume that the current directory is /proj/src
, and that the class A declared in the file A.java uses reference types from the JAR file supercharge.jar
.
Which commands will succeed without compile-time errors?
Select the two correct answers.
(a) javac -cp ../lib top/sub/A.java (b) javac -cp ../lib/supercharge top/sub/A.java (c) javac -cp ../lib/supercharge.jar top/sub/A.java (d) javac -cp /proj/lib/supercharge.jar top/sub/A.java (e) javac -cp /proj/lib top/sub/A.java
(c), (d)
The pathname of the JAR file, together with the JAR file name, should be specified.