张浩BIT 2016-06-24 08:33 采纳率: 66.7%
浏览 1335
已结题

请解释该题目,为什么答案选C?

A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar games. Chess Bob's CLASSPATH is set (at login time) to:/usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar
What is a possible location for the
Chess.class file?
A. /test/Chess.class
B. /home/bob/Chess.class
C. /test/games/Chess.class
D. /usr/lib/games/Chess.class
E. /home/bob/games/Chess.class
F. inside jarfile /opt/java/lib/Games.jar (with a correct manifest)
G. inside jarfile /home/bob/downloads/Games.jar (with a correct manifest)
Answer: C

  • 写回答

1条回答 默认 最新

  • newcih 2016-07-16 23:43
    关注

    在cp为/test:/home/bob/downloads/ 时才能运行,所以排除选项,只有A, C, G可以选。但是这里要明白,Chess.class是含有main方法的。而games却是整个项目的名字,所以Chess.class肯定是要在games目录里面的。综上选C___

    评论

报告相同问题?