单选题CLASSPATH中的“.”的含义是哪项?()A 省略号B 当前目录C 所有目录D 上级目录

题目
单选题
CLASSPATH中的“.”的含义是哪项?()
A

省略号

B

当前目录

C

所有目录

D

上级目录


相似考题
参考答案和解析
正确答案: D
解析: 暂无解析
更多“CLASSPATH中的“.”的含义是哪项?()    ”相关问题
  • 第1题:

    下面关于classpath的说法中,错误的是()。

    A、classpath和path环境变量的查看与配置的方式完全相同。

    B、为了让Java虚拟机能找到所需的class文件,就需要对classpath环境变量进行设置。

    C、从JDK5.0开始,如果classpath环境变量没有进行设置,Java虚拟机会自动将其设置为“.”,也就是当前目录。

    D、在命令行窗口中配置了classpath后,重新打开新命令行窗口依然生效


    正确答案:D

  • 第2题:

    Classpath环境变量设置中的".;"是指可以加载应用程序当前目录及其子目录中的类。()

    此题为判断题(对,错)。


    答案:对

  • 第3题:

    在Java中,关于CLASSPATH环境变量的说法不正确的是()。

    • A、CLASSPATH一旦设置之后不可修改,但可以将目录添加到该环境变量中。
    • B、编译器用它来搜索各自的类文件。
    • C、CLASSPATH是一个目录列表。
    • D、解释器用它来搜索各自的类文件。

    正确答案:A

  • 第4题:

    在Java中,关于CLASSPATH环境变量的说法,正确的有()。

    • A、CLASSPATH一旦设置就不可修改,但可以将目录添加到该环境变量中
    • B、编译器用它来搜索各自的类文件
    • C、CLASSPATH是一个目录列表
    • D、解释器用它来搜索各自的类文件

    正确答案:B,C,D

  • 第5题:

    下列关于classpath环境变量的说法中,哪一个是正确的()。

    • A、classpath配置一次后可永久使用
    • B、没有classpath环境变量就不能运行Java程序
    • C、classpath环境变量可以让虚拟机找到class文件的目录
    • D、查看当前classpath配置的命令是:classpath

    正确答案:C

  • 第6题:

    JDBC的驱动程序要在classpath中进行配置。


    正确答案:正确

  • 第7题:

    CLASSPATH是有关什么的环境变量?它如何影响程序的运行?如何设置和修改这个环境变量?


    正确答案: 在编译和运行程序中,经常要用到多个包,怎样指明这些包的根目录呢?简单地说,包层次的根目录是由环境变量CLASSPATH来确定的。具体操作有两种方法:
    一是在java及javac命令行中,用-classpath选项来指明,如:
    J.ava–classpathd:/tang/ch04;c:/java/classes;.pk.TestPkg
    二是设定classpath环境变量,用命令行设定环境变量,如:
    S.etCLASSPATH=d:/tang/ch04;c:/java/classes;.
    在Windows中还可以按第2章中的办法设定环境变量。

  • 第8题:

    单选题
    下面关于path和classpath的说法中,错误的是()。
    A

    path用来指定java虚拟机(JVM)所在的目录

    B

    classpath用来指定我们自己所写的或要用到的类文件(.jar文件)所在的目录

    C

    在dos命令行中,classpath和path环境变量的查看与配置的方式不相同

    D

    只要设置了classpath这个环境变量系统就不会再在当前目录下查询某个类


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

  • 第9题:

    单选题
    下列关于classpath环境变量的说法中,哪一个是正确的()。
    A

    classpath配置一次后可永久使用

    B

    没有classpath环境变量就不能运行Java程序

    C

    classpath环境变量可以让虚拟机找到class文件的目录

    D

    查看当前classpath配置的命令是:classpath


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

  • 第10题:

    单选题
    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
    解析: 暂无解析

  • 第11题:

    多选题
    package com.company.application;  public class MainClass {  public static void main(String[] args) { }  }  And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to “.“ (current directory).  Which two java commands entered at the command line will run MainClass?()
    A

    java MainClass if run from the /apps directory

    B

    java com.company.application.MainClass if run from the /apps directory

    C

    java -classpath /apps com.company.application.MainClass if run from any directory

    D

    java -classpath . MainClass if run from the /apps/com/company/application directory

    E

    java -classpath /apps/com/company/application:. MainClass if run from the /apps directory

    F

    java com.company.application.MainClass if run from the /apps/com/company/application directory


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

  • 第12题:

    单选题
    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
    解析: 暂无解析

  • 第13题:

    环境变量classpath的含义是指示类装载器到哪里去寻找第三方提供的类和用户定义的类。()

    此题为判断题(对,错)。


    答案:对

  • 第14题:

    安装JDK之后如何设置JDK系统的PATH,CLASSPATH?他们的作用是什么?


    正确答案:更新系统PATH的方法随Windows版本不同而不同。对于Windows95/98,可以将下列项目作为C:///autoexec.bat文件的最后一行:SETPATH=C:///j2sdk1.4.2/bin;%PATH%。
    当程序需要第三方的类库支持,而且比较常用,就可以采用此种方法.比如常用的数据库驱动程序,写servlet需要的servlet包等等,设置方法就是在环境变量中加入CLASSPATH,然后就可以直接编译运了.Java运行环境从CLASSPATH环境变量中寻找要执行的用户项目(三方的类库)。
    可以按如下的方式设置SETCLASSPATH=C:///J2SDK1.4.2/jre/lib/jaws.jar;%CLASSPATH%,通常我们要从当前目录中寻找用户类,因为开发的程序相关的类放在这里,表示当前工作目录。

  • 第15题:

    CLASSPATH中的“.”的含义是哪项?()

    • A、省略号
    • B、当前目录
    • C、所有目录
    • D、上级目录

    正确答案:B

  • 第16题:

    安装JDK时,需要配置环境变量path、classpath和JAVA_HOME。


    正确答案:正确

  • 第17题:

    M1432中,“M”的含义是(),“1”的含义是(),“32”的含义是()。


    正确答案:磨床;外圆磨床;主参数的1/10(能加工的最大直径为320mm)

  • 第18题:

    简述Java中path及classpath的作用。


    正确答案:P.ath:是操作系统的环境属性,指的是可以执行命令的程序路径。
    C.LASSPATH:是所有*.class文件的执行路径,java命令执行的时候将利用此路径加载所需要的*.class文件。

  • 第19题:

    问答题
    安装JDK之后如何设置JDK系统的PATH,CLASSPATH?他们的作用是什么?

    正确答案: 更新系统PATH的方法随Windows版本不同而不同。对于Windows95/98,可以将下列项目作为C:///autoexec.bat文件的最后一行:SETPATH=C:///j2sdk1.4.2/bin;%PATH%。
    当程序需要第三方的类库支持,而且比较常用,就可以采用此种方法.比如常用的数据库驱动程序,写servlet需要的servlet包等等,设置方法就是在环境变量中加入CLASSPATH,然后就可以直接编译运了.Java运行环境从CLASSPATH环境变量中寻找要执行的用户项目(三方的类库)。
    可以按如下的方式设置SETCLASSPATH=C:///J2SDK1.4.2/jre/lib/jaws.jar;%CLASSPATH%,通常我们要从当前目录中寻找用户类,因为开发的程序相关的类放在这里,表示当前工作目录。
    解析: 暂无解析

  • 第20题:

    多选题
    Given: And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to "." (current directory). Which two java commands entered at the commandline will run MainClass?()
    A

    java MainClass if run from the /apps directory

    B

    java com.company.application.MainClass if run from the /apps directory

    C

    java -classpath /apps com.company.application.MainClass if run from any directory

    D

    java -classpath . MainClass if run from the /apps/com/company/application directory

    E

    java -classpath /apps/com/company/application:. MainClass if run from the /apps directory


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

  • 第21题:

    问答题
    CLASSPATH是有关什么的环境变量?它如何影响程序的运行?如何设置和修改这个环境变量?

    正确答案: 在编译和运行程序中,经常要用到多个包,怎样指明这些包的根目录呢?简单地说,包层次的根目录是由环境变量CLASSPATH来确定的。具体操作有两种方法:
    一是在java及javac命令行中,用-classpath选项来指明,如:
    J.ava–classpathd:/tang/ch04;c:/java/classes;.pk.TestPkg
    二是设定classpath环境变量,用命令行设定环境变量,如:
    S.etCLASSPATH=d:/tang/ch04;c:/java/classes;.
    在Windows中还可以按第2章中的办法设定环境变量。
    解析: 暂无解析

  • 第22题:

    判断题
    JDBC的驱动程序要在classpath中进行配置。
    A

    B


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

  • 第23题:

    单选题
    下面关于classpath的说法中,错误的是()。
    A

    classpath和path环境变量的查看与配置的方式完全相同。

    B

    为了让Java虚拟机能找到所需的class文件,就需要对classpath环境变量进行设置。

    C

    从JDK5.0开始,如果classpath环境变量没有进行设置,Java虚拟机会自动将其设置为“.”,也就是当前目录。

    D

    在命令行窗口中配置了classpath后,重新打开新命令行窗口依然生效


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