A class games.cards.Poker is correctly defined in the jar fi

题目
单选题
A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: java games.cards.Poker What allows the user to do this?()
A

put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java

B

put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/*.jar

C

Put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/Poker.jar

D

put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java

E

put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/*.jar

F

put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/Poker.jar

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You have been asked to configure a login class which will permit its users to view and edit the configuration. The class should only allow the configuration of the interfaces and firewall heirarchies. Which configuration correctly accomplishes this?()

A.A

B.B

C.C

D.D


参考答案:B

第2题:

在J2EE的Web应用中,编译后的class文件存放的目录为()

  • A、classes目录
  • B、images目录
  • C、jar目录
  • D、任意位置

正确答案:A

第3题:

Click the Exhibit button. Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JVM? ()

A.Jar A

B.Jar B

C.Jar C

D.Jar D

E.Jar E


参考答案:A

第4题:

运行jar文件中class文件需要在java命令后面加的参数为()。

  • A、-cp
  • B、-g
  • C、-d
  • D、-verbose

正确答案:A

第5题:

Which the two are true regarding a web application class loader?()

  • A、 A web application may override the web container’s implementation classes
  • B、 A web application running in a J2EE product may override classes in the javax.* namespace
  • C、 A web application class loader may NOT override any classes in the java.* and javax.*  namespace
  • D、 Resources in the WAR class directory or in any of the JAR files within the library directory may  be accessed using the J2SE semantics of getResource
  • E、 Resources in the WAR class directory or in any of the JAR files within the library directory  cannot be accessed using the J2SE semantics of getResource

正确答案:C,D

第6题:

以下不属于Java程序结构文件的是( )。

A.asp文件

B.java文件

C.class文件

D.jar文件


正确答案:A

第7题:

A developer is creating a class Book that needs to access class Paper.The Paper class is deployed in a JARnamedmyLib.jar.Whichthree,taken independently,will allow the developer to use the Paper class while compiling the Book class?()

  • A、The JAR fileis located at$JAVA_HOME/jre/classes/myLib.jar.
  • B、The JAR fileis located at$JAVA_HOME/jre/lib/ext/myLib.jar.
  • C、TheJ AR fileis located at/foo/myLib.jar and aclasspath environment variable is set that includes /foo/myLib.jar/Paper.class.
  • D、The JAR fileis located at/foo/myLib.jar and a classpath environment variable is set that includes/foo/myLib.jar.
  • E、The JAR file is located at/foo/myLib.jar and the Book class is compiled using javac-cp/foo/myLib.jar/Paper Book.java.
  • F、The JAR file is located at/foo/myLib.jar and the Book class is compiled using javac-classpath/foo/myLib.jar Book.java.

正确答案:B,D,F

第8题:

Given:10. interface Data { public void load(); }11. abstract class Info { public abstract void load(); }Which class correctly uses the Data interface and Info class?()()

A.

B.

C.

D.

E.

F.


参考答案:A

第9题:

在WEB-INF目录下,必须存放的文件为:()

  • A、class文件
  • B、web.xml
  • C、jar文件
  • D、html文件

正确答案:B

第10题:

Given a correctly compiled class whose source code is:  package com.sun.sjcp;  public class Commander {  public static void main(String[] args) {  // more code here  }  }  Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?() 

  • A、 java Commander
  • B、 java com. sim. sjcp.Commander
  • C、 java com/sun/sjcp/Commander
  • D、 java -cp com.sun.sjcp Commander
  • E、 java -cp com/sun/sjcp Commander

正确答案:B

更多相关问题