Sunday, August 29, 2010

The -classpath overrides the CLASSPATH environment variable

Courtesy of Sun Web Learning Center

Given the command line:

java -classpath x/MyJar.jar Test.java

Which two are true? (Choose two.)


A A CLASSPATH environment variable will override -classpath.
B The -classpath overrides the CLASSPATH environment variable.
C If a version of MyJar.jar is located in both the current directory and in the x subdirectory, the current directory version will be used.
D If a version of MyJar.jar is located in both the current directory and in the x subdirectory, the x subdirectory version will be used.

B and D describe the correct functionalities of the java command.

No comments:

Post a Comment