单选题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/

题目
单选题
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


相似考题
参考答案和解析
正确答案: F
解析: 暂无解析
更多“A class games.cards.Poker is correctly defined in the jar fi”相关问题
  • 第1题:

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

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

    正确答案:A

  • 第2题:

    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

  • 第3题:

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

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

    正确答案:A

  • 第4题:

    In which two web application directories can dependent classes and libraries be located? ()

    • A、 /WEB-INF/lib as a JAR file
    • B、 /META-INF/lib as a JAR file
    • C、 /classes as compiled class files
    • D、 /WEB-INF/lib as compiled class files
    • E、 /WEB-INF/classes as compiled class files
    • F、 /META-INF/classes as compiled class files

    正确答案:A,E

  • 第5题:

    In which two locations can library dependencies be defined for a web application? ()

    • A、 the web application deployment descriptor
    • B、 the /META-INF/dependencies.xml file
    • C、 the /META-INF/MANIFEST.MF manifest file
    • D、 the /META-INF/MANIFEST.MF manifest of a JAR in the web application classpath

    正确答案:C,D

  • 第6题:

    单选题
    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 JYM?()
    A

     Jar A

    B

     Jar B

    C

     Jar C

    D

     Jar D

    E

     Jar E


    正确答案: B
    解析: 暂无解析

  • 第7题:

    多选题
    A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class?()
    A

    The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.

    B

    The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar..

    C

    The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class.

    D

    The JAR file is 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 -d /foo/myLib.jar Book.java

    G

    The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -classpath /foo/myLib.jar Book.java


    正确答案: F,A
    解析: 暂无解析

  • 第8题:

    多选题
    In which two web application directories can dependent classes and libraries be located? ()
    A

    /WEB-INF/lib as a JAR file

    B

    /META-INF/lib as a JAR file

    C

    /classes as compiled class files

    D

    /WEB-INF/lib as compiled class files

    E

    /WEB-INF/classes as compiled class files

    F

    /META-INF/classes as compiled class files


    正确答案: A,E
    解析: 暂无解析

  • 第9题:

    单选题
    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


    正确答案: B
    解析: 暂无解析

  • 第10题:

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

    -cp

    B

    -g

    C

    -d

    D

    -verbose


    正确答案: B
    解析: 暂无解析

  • 第11题:

    单选题
    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 /stuffijava/*.jar

    F

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


    正确答案: E
    解析: 暂无解析

  • 第12题:

    多选题
    class One {   public One foo() { return this; }  }  class Two extends One {  public One foo() { return this; }  }  class Three extends Two {   // insert method here  }  Which two methods, inserted individually, correctly complete the Three class?()
    A

    public void foo() { }

    B

    public int foo() { return 3; }

    C

    public Two foo() { return this; }

    D

    public One foo() { return this; }

    E

    public Object foo() { return this; }


    正确答案: D,B
    解析: 暂无解析

  • 第13题:

    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

  • 第14题:

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

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

    正确答案:B

  • 第15题:

    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

  • 第16题:

    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 JYM?() 

    • A、 Jar A
    • B、 Jar B
    • C、 Jar C
    • D、 Jar D
    • E、 Jar E

    正确答案:A

  • 第17题:

    A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar.  Which three, taken independently, will allow the developer to use the Paper class while compiling the Bookclass?()

    • A、The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.
    • B、The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar..
    • C、The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class.
    • D、The JAR file is 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

  • 第18题:

    多选题
    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.


    正确答案: E,C
    解析: 暂无解析

  • 第19题:

    多选题
    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


    正确答案: E,B
    解析: 暂无解析

  • 第20题:

    多选题
    A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar.  Which three, taken independently, will allow the developer to use the Paper class while compiling the Bookclass?()
    A

    The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.

    B

    The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar..

    C

    The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class.

    D

    The JAR file is 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


    正确答案: E,F
    解析: 暂无解析

  • 第21题:

    多选题
    A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class?()
    A

    The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar

    B

    The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar

    C

    The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class

    D

    The JAR file is 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


    正确答案: A,D
    解析: 暂无解析

  • 第22题:

    单选题
    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


    正确答案: C
    解析: 暂无解析

  • 第23题:

    多选题
    GivenafileGrizzlyBear.java: 1.package animals.mammals; 2. 3.public class GrizzlyBear extends Bear{ 4.voidhunt(){ 5.Salmons=findSalmon(); 6.s.consume(); 7.} 8.} and another file,Salmon.java: 1.packageanimals.fish; 2. 3.public class Salmon extends Fish{ 4.voidconsume(){/*dostuff*/} 5.} Assume both classes are defined in the correct directories for theft packages,and that the Mammal class correctly defines the findSalmon()method.Which two changes allow this code to compile correctly?()
    A

    add public to the start of line 4 in Salmon.java

    B

    add public to the start of line 4 in GrizzlyBear.java

    C

    add import animals.mammals.*;at line 2 in Salmon.java

    D

    add import animals.fish.*at line 2 in GrizzlyBear.java

    E

    add import animals.fish.Salmon.*;at line 2 in GrizzlyBear.java

    F

    add import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java


    正确答案: A,D
    解析: 暂无解析

  • 第24题:

    单选题
    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


    正确答案: A
    解析: 暂无解析