zoukankan      html  css  js  c++  java
  • Setting the Java Class Path

      The class path is the path taht Java Runtime Environment(JRE) searches for classes and other resource files.

    Synopsis:

      The class serach path (classpath) can  be set suing either the -classpath option when calling a JDK tool( the preferred method) or bby setting the CLASSPATH environment variable.

    The -classpath option is preferred beacuse you can set it individually for each application without affecting other applications and without outher applications modifying its value.

    sdkTool -classpath classpath1:classpath2...

    set CLASSPATH=classpath1;classpath2...

    sdkTool

      A command-line tool, such as java, javac, javadoc, or apt.For a listing, see JDK Tools and Utilites at

    http://docs.oracle.com/javase/8/docs/technotes/tools/index.html

    classpaht1:classpath2

      Classpaths to the JAR,zip or class files.Each class path should end with a file name or directory depending on what you are setting the class path to, as follows:

    `For a JAR or zip file that contains class files, the class path ends with the name of the zip or JAR file.

    `For class files in an unnamed package, thje class path ends with the direcotry that contains the class files.

    `For class files in a named package, the class path ends with the directory that contains the root package, which is the first package in the full package name.

    Multiple path entries are separated by semicolons with no spaces around the equals sigh (=) in windows.

    The defalut class path is the current direcoty. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current direcoty in the search path,

    then you must include a dot(.) in the new settings.

    Class path entries that are neither directories nor archives (.zip or JAR files) nor the asterisk(*) wildcard character are ignored.

    宛如智障,暗藏锋芒
  • 相关阅读:
    logdump命令使用
    centos 添加用户并赋予sudo权限
    ogg进程解析
    xxl-job-executor2.2.0添加为默认执行器(docker方式)
    mysql设置数据库默认编码和表名不区分大小写
    linux-curl工具使用
    docker通过dockerfile打java项目镜像
    通过shell检查服务并发送mail告警(shell监控脚本)
    esxi6.5安装教程
    Vmware Vcenter6.5 配置集群和主机
  • 原文地址:https://www.cnblogs.com/zienzir/p/9054884.html
Copyright © 2011-2022 走看看