• 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.

    宛如智障,暗藏锋芒
  • 相关阅读:
    为什么要写技术博客?
    MySQL开发总结
    如何在Linux实现自动运行程序
    SSH无密码登录
    PHP版本MS17-010检测小脚本
    Msf的一些常用操作
    bypass safedog upload
    mysql拿webshell总结
    web端MSF搭建
    【漏洞复现】Tomcat CVE-2017-12615 远程代码执行漏洞
  • 原文地址:https://www.cnblogs.com/zienzir/p/9054884.html
Copyright © 2020-2023  润新知