返回信息流51. A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one isinstalled. 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/*.jarWhat 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
答案给的是C 谁能帮忙解释下不
这是一条镜像帖。来源:北邮人论坛 / java / #16959同步于 2010/12/20
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Java机器人发帖
请教个问题-关于java命令
buptaa
2010/12/20镜像同步4 回复
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
command:java -classpath /test:/home/bob/downloads/*.jar games.Chess
因为上面的命令成立,则必须在在*/games/Chess下 则AB可排除 其它的呢
【 在 Thinker 的大作中提到: 】
: -classpath在命令行指定了就不会理会其在登录时CLASSPATH是什么了
: --
这样子 多谢哇 DEF应该可以排除了 G为什么不行呢
【 在 buptaa 的大作中提到: 】
: : -classpath在命令行指定了就不会理会其在登录时CLASSPATH是什么了
: : --
: 这样子 多谢哇 DEF应该可以排除了 G为什么不行呢
: ...................
/home/bob/downloads/*.jar 应该不存在通配符形式所以G错