ywdeMacBook-Air:mars yw$ pwd
/Users/yw/yangwenGit/222/mars
ywdeMacBook-Air:mars yw$ javac --help
用法: javac
其中, 可能的选项包括:
@ 从文件读取选项和文件名
-Akey[=value] 传递给注释处理程序的选项
--add-modules <模块>(,<模块>)*
除了初始模块之外要解析的根模块; 如果
为 ALL-MODULE-PATH, 则为模块路径中的所有模块。
--boot-class-path , -bootclasspath
覆盖引导类文件的位置
--class-path , -classpath , -cp
指定查找用户类文件和注释处理程序的位置
-d 指定放置生成的类文件的位置
-deprecation 输出使用已过时的 API 的源位置
--enable-preview 启用预览语言功能。要与 -source 或 --release 一起使用。
-encoding 指定源文件使用的字符编码
-endorseddirs 覆盖签名的标准路径的位置
-extdirs 覆盖所安装扩展的位置
-g 生成所有调试信息
-g:{lines,vars,source} 只生成某些调试信息
-g:none 不生成任何调试信息
-h 指定放置生成的本机标头文件的位置
--help, -help, -? 输出此帮助消息
--help-extra, -X 输出额外选项的帮助
-implicit:{none,class} 指定是否为隐式引用文件生成类文件
-J 直接将 <标记> 传递给运行时系统
--limit-modules <模块>(,<模块>)*
限制可观察模块的领域
--module <模块>(,<模块>)*, -m <模块>(,<模块>)*
只编译指定的模块,请检查时间戳
--module-path , -p
指定查找应用程序模块的位置
--module-source-path
指定查找多个模块的输入源文件的位置
--module-version <版本> 指定正在编译的模块版本
-nowarn 不生成任何警告
-parameters 生成元数据以用于方法参数的反射
-proc:{none,only} 控制是否执行注释处理和/或编译。
-processor [,,...]
要运行的注释处理程序的名称; 绕过默认的搜索进程
--processor-module-path
指定查找注释处理程序的模块路径
--processor-path , -processorpath
指定查找注释处理程序的位置
-profile 请确保使用的 API 在指定的配置文件中可用
--release 针对特定发行版进行编译。支持的发行版:7, 8, 9, 10, 11, 12
-s 指定放置生成的源文件的位置
--source , -source
提供与指定发行版的源兼容性。支持的发行版:7, 8, 9, 10, 11, 12
--source-path , -sourcepath
指定查找输入源文件的位置
--system |none 覆盖系统模块位置
--target , -target
生成针对特定 VM 版本的类文件。支持的版本:7, 8, 9, 10, 11, 12
--upgrade-module-path
覆盖可升级模块位置
-verbose 输出有关编译器正在执行的操作的消息
--version, -version 版本信息
-Werror 出现警告时终止编译
ywdeMacBook-Air:mars yw$ javac -cp src src/com/banyuan/mars/App.java -d target
ywdeMacBook-Air:mars yw$ pwd
/Users/yw/yangwenGit/222/mars
ywdeMacBook-Air:mars yw$ jar --help
用法: jar [OPTION…] [ [–release VERSION] [-C dir] files] …
jar 创建类和资源的档案, 并且可以处理档案中的
单个类或资源或者从档案中还原单个类或资源。
示例:
jar --create --file classes.jar Foo.class Bar.class
jar --create --file classes.jar --manifest mymanifest -C foo/ .
jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0
-C foo/ classes resources
jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0
-C foo/ module-info.class
jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
要缩短或简化 jar 命令, 可以在单独的文本文件中指定参数,
并使用 @ 符号作为前缀将此文件传递给 jar 命令。
示例:
jar --create --file my.jar @classes.list
主操作模式:
-c, --create 创建档案
-i, --generate-index=FILE 为指定的 jar 档案生成
索引信息
-t, --list 列出档案的目录
-u, --update 更新现有 jar 档案
-x, --extract 从档案中提取指定的 (或全部) 文件
-d, --describe-module 输出模块描述符或自动模块名称
在任意模式下有效的操作修饰符:
-C DIR 更改为指定的目录并包含
以下文件
-f, --file=FILE 档案文件名。省略时, 基于操作
使用 stdin 或 stdout
–release VERSION 将下面的所有文件都放在
jar 的版本化目录中 (即 META-INF/versions/VERSION/)
-v, --verbose 在标准输出中生成详细输出
在创建和更新模式下有效的操作修饰符:
-e, --main-class=CLASSNAME 捆绑到模块化或可执行
jar 档案的独立应用程序
的应用程序入口点
-m, --manifest=FILE 包含指定清单文件中的
清单信息
-M, --no-manifest 不为条目创建清单文件
–module-version=VERSION 创建模块化 jar 或更新
非模块化 jar 时的模块版本
–hash-modules=PATTERN 计算和记录模块的散列,
这些模块按指定模式匹配并直接或
间接依赖于所创建的模块化 jar 或
所更新的非模块化 jar
-p, --module-path 模块被依赖对象的位置, 用于生成
散列
只在创建, 更新和生成索引模式下有效的操作修饰符:
-0, --no-compress 仅存储; 不使用 ZIP 压缩
其他选项:
-?, -h, --help[:compat] 提供此帮助,也可以选择性地提供兼容性帮助
–help-extra 提供额外选项的帮助
–version 输出程序版本
如果模块描述符 ‘module-info.class’ 位于指定目录的
根目录中, 或者位于 jar 档案本身的根目录中, 则
该档案是一个模块化 jar。以下操作只在创建模块化 jar,
或更新现有的非模块化 jar 时有效: ‘–module-version’,
‘–hash-modules’ 和 ‘–module-path’。
如果为长选项提供了必需参数或可选参数, 则它们对于
任何对应的短选项也是必需或可选的。
ywdeMacBook-Air:mars yw$ ls
README.md build.xml libs scripts target
app.jar config resources src
ywdeMacBook-Air:mars yw$ java -cp ./app.jar com.banyuan.mars.App
书名: Python基础教程
价格: 68.3
出版社: 人民邮电出版社
作者: Magnus Lie Hetland
================================================
书名: Effective Java中文版
价格: 75.9
出版社: 机械工业出版社
作者: Joshua Bloch
================================================
书名: C Primer Plus 第6版
价格: 76.5
出版社: 人民邮电出版社
作者: Stephen Prata
================================================
书名: 深入浅出Docker
价格: 59.3
出版社: 人民邮电出版社
作者: Nigel Poulton
================================================
书名: Modern PHP(中文版)
价格: 31.2
出版社: 中国电力出版社
作者: Josh Lockhart
================================================
书名: HTML5权威指南
价格: 89.0
出版社: 人民邮电出版社
作者: Adam Freeman
================================================
书名: MySQL必知必会
价格: 26.9
出版社: 人民邮电出版社
作者: Ben Forta
================================================
书名: Swift编程权威指南
价格: 61.4
出版社: 人民邮电出版社
作者: Matthew Mathias
>================================================
书名: Go语言并发之道
价格: 65.0
出版社: 中国电力出版社
作者: Katherine Cox-Buday
>================================================
书名: HTTP/2基础教程
价格: 33.8
出版社: 人民邮电出版社
作者: Stephen Ludin
================================================
ywdeMacBook-Air:mars yw$ java --help
> 用法:java [options] <主类> [args...]
(执行类)
> 或 java [options] -jar [args...]
(执行 jar 文件)
> 或 java [options] -m <模块>[/<主类>] [args...]
java [options] --module <模块>[/<主类>] [args...]
(执行模块中的主类)
> 或 java [options] <源文件> [args]
(执行单个源文件程序)
> 将主类、源文件、-jar 、-m 或
--module <模块>/<主类> 后的参数作为参数
传递到主类。
其中,选项包括:
-cp <目录和 zip/jar 文件的类搜索路径>
-classpath <目录和 zip/jar 文件的类搜索路径>
--class-path <目录和 zip/jar 文件的类搜索路径>
使用 : 分隔的, 用于搜索类文件的目录, JAR 档案
和 ZIP 档案列表。
-p <模块路径>
--module-path <模块路径>...
用 : 分隔的目录列表, 每个目录
都是一个包含模块的目录。
--upgrade-module-path <模块路径>...
用 : 分隔的目录列表, 每个目录
都是一个包含模块的目录, 这些模块
用于替换运行时映像中的可升级模块
--add-modules <模块名称>[,<模块名称>...]
除了初始模块之外要解析的根模块。
<模块名称> 还可以为 ALL-DEFAULT, ALL-SYSTEM,
ALL-MODULE-PATH.
--list-modules
列出可观察模块并退出
-d
--describe-module <模块名称>
描述模块并退出
--dry-run 创建 VM 并加载主类, 但不执行 main 方法。
此 --dry-run 选项对于验证诸如
模块系统配置这样的命令行选项可能非常有用。
--validate-modules
验证所有模块并退出
--validate-modules 选项对于查找
模块路径中模块的冲突及其他错误可能非常有用。
-D<名称>=<值>
设置系统属性
-verbose:[class|module|gc|jni]
启用详细输出
-version 将产品版本输出到错误流并退出
--version 将产品版本输出到输出流并退出
-showversion 将产品版本输出到错误流并继续
--show-version
将产品版本输出到输出流并继续
--show-module-resolution
在启动过程中显示模块解析输出
-? -h -help
将此帮助消息输出到错误流
--help 将此帮助消息输出到输出流
-X 将额外选项的帮助输出到错误流
--help-extra 将额外选项的帮助输出到输出流
-ea[:<程序包名称>...|:<类名>]
-enableassertions[:<程序包名称>...|:<类名>]
按指定的粒度启用断言
-da[:<程序包名称>...|:<类名>]
-disableassertions[:<程序包名称>...|:<类名>]
按指定的粒度禁用断言
-esa | -enablesystemassertions
启用系统断言
-dsa | -disablesystemassertions
禁用系统断言
-agentlib:<库名>[=<选项>]
加载本机代理库 <库名>, 例如 -agentlib:jdwp
另请参阅 -agentlib:jdwp=help
-agentpath:<路径名>[=<选项>]
按完整路径名加载本机代理库
-javaagent:[=<选项>]
加载 Java 编程语言代理, 请参阅 java.lang.instrument
-splash:<图像路径>
使用指定的图像显示启动屏幕
自动支持和使用 HiDPI 缩放图像
(如果可用)。应始终将未缩放的图像文件名 (例如, image.ext)
作为参数传递给 -splash 选项。
将自动选取提供的最合适的缩放
图像。
有关详细信息, 请参阅 SplashScreen API 文档
@argument 文件
一个或多个包含选项的参数文件
-disable-@files
阻止进一步扩展参数文件
--enable-preview
允许类依赖于此发行版的预览功能
要为长选项指定参数, 可以使用 --<名称>=<值> 或
--<名称> <值>。
ywdeMacBook-Air:mars yw$ jar -tf ./app.jar
META-INF/
META-INF/MANIFEST.MF
.DS_Store
com/
com/.DS_Store
com/banyuan/
com/banyuan/.DS_Store
com/banyuan/mars/
com/banyuan/mars/.DS_Store
com/banyuan/mars/library/
com/banyuan/mars/library/BookParser.class
com/banyuan/mars/library/Book.class
com/banyuan/mars/App.class
ywdeMacBook-Air:mars yw$ jar --help
>用法: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
jar 创建类和资源的档案, 并且可以处理档案中的
单个类或资源或者从档案中还原单个类或资源。
> 示例:
> * 创建包含两个类文件的名为 classes.jar 的档案:
> * jar --create --file classes.jar Foo.class Bar.class
> * 使用现有的清单创建档案, 其中包含 foo/ 中的所有文件:
> * jar --create --file classes.jar --manifest mymanifest -C foo/ .
> * 创建模块化 jar 档案, 其中模块描述符位于
> * classes/module-info.class:
> * jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0
> * -C foo/ classes resources
> * 将现有的非模块化 jar 更新为模块化 jar:
> * jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0
> * -C foo/ module-info.class
> * 创建包含多个发行版的 jar, 并将一些文件放在 META-INF/versions/9 目录中:
> * jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
> 要缩短或简化 jar 命令, 可以在单独的文本文件中指定参数,
并使用 @ 符号作为前缀将此文件传递给 jar 命令。
> 示例:
> * 从文件 classes.list 读取附加选项和类文件列表
jar --create --file my.jar @classes.list
> 主操作模式:
-c, --create 创建档案
-i, --generate-index=FILE 为指定的 jar 档案生成
索引信息
-t, --list 列出档案的目录
-u, --update 更新现有 jar 档案
-x, --extract 从档案中提取指定的 (或全部) 文件
-d, --describe-module 输出模块描述符或自动模块名称
在任意模式下有效的操作修饰符:
-C DIR 更改为指定的目录并包含
以下文件
-f, --file=FILE 档案文件名。省略时, 基于操作
使用 stdin 或 stdout
–release VERSION 将下面的所有文件都放在
jar 的版本化目录中 (即 META-INF/versions/VERSION/)
-v, --verbose 在标准输出中生成详细输出
在创建和更新模式下有效的操作修饰符:
-e, --main-class=CLASSNAME 捆绑到模块化或可执行
jar 档案的独立应用程序
的应用程序入口点
-m, --manifest=FILE 包含指定清单文件中的
清单信息
-M, --no-manifest 不为条目创建清单文件
–module-version=VERSION 创建模块化 jar 或更新
非模块化 jar 时的模块版本
–hash-modules=PATTERN 计算和记录模块的散列,
这些模块按指定模式匹配并直接或
间接依赖于所创建的模块化 jar 或
所更新的非模块化 jar
-p, --module-path 模块被依赖对象的位置, 用于生成
散列
只在创建, 更新和生成索引模式下有效的操作修饰符:
-0, --no-compress 仅存储; 不使用 ZIP 压缩
其他选项:
-?, -h, --help[:compat] 提供此帮助,也可以选择性地提供兼容性帮助
–help-extra 提供额外选项的帮助
–version 输出程序版本
如果模块描述符 ‘module-info.class’ 位于指定目录的
根目录中, 或者位于 jar 档案本身的根目录中, 则
该档案是一个模块化 jar。以下操作只在创建模块化 jar,
或更新现有的非模块化 jar 时有效: ‘–module-version’,
‘–hash-modules’ 和 ‘–module-path’。
如果为长选项提供了必需参数或可选参数, 则它们对于
任何对应的短选项也是必需或可选的。
ywdeMacBook-Air:mars yw$ jar -xvf ./app.jar ./ttt
ywdeMacBook-Air:mars yw$ ls
README.md build.xml libs scripts target
app.jar config resources src
ywdeMacBook-Air:mars yw$ ls -l
total 32
-rw-r–r--@ 1 yw staff 1309 6 26 17:27 README.md
-rw-r–r--@ 1 yw staff 5410 7 3 11:05 app.jar
-rw-r–r-- 1 yw staff 2191 6 26 17:27 build.xml
drwxr-xr-x 4 yw staff 128 6 26 17:27 config
drwxr-xr-x 3 yw staff 96 6 26 17:27 libs
drwxr-xr-x 4 yw staff 128 6 26 17:27 resources
drwxr-xr-x 5 yw staff 160 6 26 17:27 scripts
drwxr-xr-x 6 yw staff 192 7 3 10:17 src
drwxr-xr-x 4 yw staff 128 7 3 10:37 target
ywdeMacBook-Air:mars yw$ mkdir ttt
ywdeMacBook-Air:mars yw$ ls -l
total 32
-rw-r–r--@ 1 yw staff 1309 6 26 17:27 README.md
-rw-r–r--@ 1 yw staff 5410 7 3 11:05 app.jar
-rw-r–r-- 1 yw staff 2191 6 26 17:27 build.xml
drwxr-xr-x 4 yw staff 128 6 26 17:27 config
drwxr-xr-x 3 yw staff 96 6 26 17:27 libs
drwxr-xr-x 4 yw staff 128 6 26 17:27 resources
drwxr-xr-x 5 yw staff 160 6 26 17:27 scripts
drwxr-xr-x 6 yw staff 192 7 3 10:17 src
drwxr-xr-x 4 yw staff 128 7 3 10:37 target
drwxr-xr-x 2 yw staff 64 7 3 11:30 ttt
ywdeMacBook-Air:mars yw$ jar -xvf ./app.jar ./ttt
ywdeMacBook-Air:mars yw$ ls -l
total 32
-rw-r–r--@ 1 yw staff 1309 6 26 17:27 README.md
-rw-r–r--@ 1 yw staff 5410 7 3 11:05 app.jar
-rw-r–r-- 1 yw staff 2191 6 26 17:27 build.xml
drwxr-xr-x 4 yw staff 128 6 26 17:27 config
drwxr-xr-x 3 yw staff 96 6 26 17:27 libs
drwxr-xr-x 4 yw staff 128 6 26 17:27 resources
drwxr-xr-x 5 yw staff 160 6 26 17:27 scripts
drwxr-xr-x 6 yw staff 192 7 3 10:17 src
drwxr-xr-x 4 yw staff 128 7 3 10:37 target
drwxr-xr-x 2 yw staff 64 7 3 11:30 ttt
ywdeMacBook-Air:mars yw$ cd ttt
ywdeMacBook-Air:ttt yw$ ls
ywdeMacBook-Air:ttt yw$ cd …
ywdeMacBook-Air:mars yw$ jar tvf app.jar
0 Wed Jul 03 11:05:46 CST 2019 META-INF/
66 Wed Jul 03 11:05:46 CST 2019 META-INF/MANIFEST.MF
6148 Wed Jul 03 10:37:48 CST 2019 .DS_Store
0 Wed Jul 03 10:37:48 CST 2019 com/
6148 Wed Jul 03 10:37:48 CST 2019 com/.DS_Store
0 Wed Jul 03 10:37:48 CST 2019 com/banyuan/
6148 Wed Jul 03 10:37:48 CST 2019 com/banyuan/.DS_Store
0 Wed Jul 03 10:39:30 CST 2019 com/banyuan/mars/
6148 Wed Jul 03 10:39:30 CST 2019 com/banyuan/mars/.DS_Store
0 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/library/
2202 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/library/BookParser.class
1618 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/library/Book.class
1758 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/App.class
ywdeMacBook-Air:mars yw$ jar xf app.jar ./ttt
ywdeMacBook-Air:mars yw$ ls ttt
ywdeMacBook-Air:mars yw$ cd ttt
ywdeMacBook-Air:ttt yw$ jar tvf …/app.jar
0 Wed Jul 03 11:05:46 CST 2019 META-INF/
66 Wed Jul 03 11:05:46 CST 2019 META-INF/MANIFEST.MF
6148 Wed Jul 03 10:37:48 CST 2019 .DS_Store
0 Wed Jul 03 10:37:48 CST 2019 com/
6148 Wed Jul 03 10:37:48 CST 2019 com/.DS_Store
0 Wed Jul 03 10:37:48 CST 2019 com/banyuan/
6148 Wed Jul 03 10:37:48 CST 2019 com/banyuan/.DS_Store
0 Wed Jul 03 10:39:30 CST 2019 com/banyuan/mars/
6148 Wed Jul 03 10:39:30 CST 2019 com/banyuan/mars/.DS_Store
0 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/library/
2202 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/library/BookParser.class
1618 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/library/Book.class
1758 Wed Jul 03 10:38:56 CST 2019 com/banyuan/mars/App.class
ywdeMacBook-Air:ttt yw$ jar xf …/app.jar
ywdeMacBook-Air:ttt yw$ ls
META-INF com
ywdeMacBook-Air:ttt yw$ ls -l
total 0
drwxr-xr-x 3 yw staff 96 7 3 11:05 META-INF
drwxr-xr-x 4 yw staff 128 7 3 10:37 com
ywdeMacBook-Air:ttt yw$ cd META-INF/
ywdeMacBook-Air:META-INF yw$ ls
MANIFEST.MF
ywdeMacBook-Air:META-INF yw$ ls -l
total 8
-rw-r--r-- 1 yw staff 66 7 3 11:05 MANIFEST.MF
ywdeMacBook-Air:META-INF yw$ cat MANIFEST.MF
Manifest-Version: 1.0
Created-By: 12.0.1 (Oracle Corporation)
ywdeMacBook-Air:META-INF yw$ vim MANIFEST.MF
==ywdeMacBook-Air:META-INF yw$ cat MANIFEST.MF ==
Manifest-Version: 1.0
Created-By: 12.0.1 (Oracle Corporation)
Main-Class: com.banyuan.mars.App
ywdeMacBook-Air:META-INF yw$ jar --help
用法: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
jar 创建类和资源的档案, 并且可以处理档案中的
单个类或资源或者从档案中还原单个类或资源。
示例:
# 创建包含两个类文件的名为 classes.jar 的档案:
jar --create --file classes.jar Foo.class Bar.class
# 使用现有的清单创建档案, 其中包含 foo/ 中的所有文件:
jar --create --file classes.jar --manifest mymanifest -C foo/ .
# 创建模块化 jar 档案, 其中模块描述符位于
# classes/module-info.class:
jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0
-C foo/ classes resources
# 将现有的非模块化 jar 更新为模块化 jar:
jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0
-C foo/ module-info.class
# 创建包含多个发行版的 jar, 并将一些文件放在 META-INF/versions/9 目录中:
jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
要缩短或简化 jar 命令, 可以在单独的文本文件中指定参数,
并使用 @ 符号作为前缀将此文件传递给 jar 命令。
示例:
# 从文件 classes.list 读取附加选项和类文件列表
jar --create --file my.jar @classes.list
主操作模式:
-c, --create 创建档案
-i, --generate-index=FILE 为指定的 jar 档案生成
索引信息
-t, --list 列出档案的目录
-u, --update 更新现有 jar 档案
-x, --extract 从档案中提取指定的 (或全部) 文件
-d, --describe-module 输出模块描述符或自动模块名称
在任意模式下有效的操作修饰符:
-C DIR 更改为指定的目录并包含
以下文件
-f, --file=FILE 档案文件名。省略时, 基于操作
使用 stdin 或 stdout
--release VERSION 将下面的所有文件都放在
jar 的版本化目录中 (即 META-INF/versions/VERSION/)
-v, --verbose 在标准输出中生成详细输出
在创建和更新模式下有效的操作修饰符:
-e, --main-class=CLASSNAME 捆绑到模块化或可执行
jar 档案的独立应用程序
的应用程序入口点
-m, --manifest=FILE 包含指定清单文件中的
清单信息
-M, --no-manifest 不为条目创建清单文件
--module-version=VERSION 创建模块化 jar 或更新
非模块化 jar 时的模块版本
--hash-modules=PATTERN 计算和记录模块的散列,
这些模块按指定模式匹配并直接或
间接依赖于所创建的模块化 jar 或
所更新的非模块化 jar
-p, --module-path 模块被依赖对象的位置, 用于生成
散列
只在创建, 更新和生成索引模式下有效的操作修饰符:
-0, --no-compress 仅存储; 不使用 ZIP 压缩
其他选项:
-?, -h, --help[:compat] 提供此帮助,也可以选择性地提供兼容性帮助
--help-extra 提供额外选项的帮助
--version 输出程序版本
如果模块描述符 'module-info.class' 位于指定目录的
根目录中, 或者位于 jar 档案本身的根目录中, 则
该档案是一个模块化 jar。以下操作只在创建模块化 jar,
或更新现有的非模块化 jar 时有效: '--module-version',
'--hash-modules' 和 '--module-path'。
如果为长选项提供了必需参数或可选参数, 则它们对于
任何对应的短选项也是必需或可选的。
ywdeMacBook-Air:META-INF yw$ cd …
ywdeMacBook-Air:ttt yw$ ls
META-INF com
ywdeMacBook-Air:ttt yw$ cd …
ywdeMacBook-Air:mars yw$ ls
README.md build.xml libs scripts target
app.jar config resources src ttt
ywdeMacBook-Air:mars yw$ jar cf ttt.jar ttt
ywdeMacBook-Air:mars yw$ ls
README.md config scripts ttt
app.jar libs src ttt.jar
build.xml resources target
ywdeMacBook-Air:mars yw$ java -jar ttt.jar
ttt.jar中没有主清单属性
ywdeMacBook-Air:mars yw$ jar -cfe ttt.jar com.banyuan.mars.App -C target/ .
ywdeMacBook-Air:mars yw$ ls -l target
total 0
drwxr-xr-x 4 yw staff 128 7 3 10:37 com
ywdeMacBook-Air:mars yw$ java -jar app.jar
app.jar中没有主清单属性
ywdeMacBook-Air:mars yw$ ls
README.md config scripts ttt
app.jar libs src ttt.jar
build.xml resources target
ywdeMacBook-Air:mars yw$ java -jar ttt.jar
书名: Python基础教程
价格: 68.3
出版社: 人民邮电出版社
作者: Magnus Lie Hetland
================================================
书名: Effective Java中文版
价格: 75.9
出版社: 机械工业出版社
作者: Joshua Bloch
================================================
书名: C Primer Plus 第6版
价格: 76.5
出版社: 人民邮电出版社
作者: Stephen Prata
================================================
书名: 深入浅出Docker
价格: 59.3
出版社: 人民邮电出版社
作者: Nigel Poulton
================================================
书名: Modern PHP(中文版)
价格: 31.2
出版社: 中国电力出版社
作者: Josh Lockhart
================================================
书名: HTML5权威指南
价格: 89.0
出版社: 人民邮电出版社
作者: Adam Freeman
================================================
书名: MySQL必知必会
价格: 26.9
出版社: 人民邮电出版社
作者: Ben Forta
================================================
书名: Swift编程权威指南
价格: 61.4
出版社: 人民邮电出版社
作者: Matthew Mathias
================================================
书名: Go语言并发之道
价格: 65.0
出版社: 中国电力出版社
作者: Katherine Cox-Buday
================================================
书名: HTTP/2基础教程
价格: 33.8
出版社: 人民邮电出版社
作者: Stephen Ludin
================================================
ywdeMacBook-Air:mars yw$ jar -tf ttt.jar
META-INF/
META-INF/MANIFEST.MF
.DS_Store
com/
com/.DS_Store
com/banyuan/
com/banyuan/.DS_Store
com/banyuan/mars/
com/banyuan/mars/.DS_Store
com/banyuan/mars/library/
com/banyuan/mars/library/BookParser.class
com/banyuan/mars/library/Book.class
com/banyuan/mars/App.class
ywdeMacBook-Air:mars yw$ java -jar app.jar
app.jar中没有主清单属性
ywdeMacBook-Air:mars yw$ java -jar ttt.jar
书名: Python基础教程
价格: 68.3
出版社: 人民邮电出版社
作者: Magnus Lie Hetland
================================================
书名: Effective Java中文版
价格: 75.9
出版社: 机械工业出版社
作者: Joshua Bloch
================================================
书名: C Primer Plus 第6版
价格: 76.5
出版社: 人民邮电出版社
作者: Stephen Prata
================================================
书名: 深入浅出Docker
价格: 59.3
出版社: 人民邮电出版社
作者: Nigel Poulton
================================================
书名: Modern PHP(中文版)
价格: 31.2
出版社: 中国电力出版社
作者: Josh Lockhart
================================================
书名: HTML5权威指南
价格: 89.0
出版社: 人民邮电出版社
作者: Adam Freeman
================================================
书名: MySQL必知必会
价格: 26.9
出版社: 人民邮电出版社
作者: Ben Forta
================================================
书名: Swift编程权威指南
价格: 61.4
出版社: 人民邮电出版社
作者: Matthew Mathias
================================================
书名: Go语言并发之道
价格: 65.0
出版社: 中国电力出版社
作者: Katherine Cox-Buday
================================================
书名: HTTP/2基础教程
价格: 33.8
出版社: 人民邮电出版社
作者: Stephen Ludin
================================================
ywdeMacBook-Air:mars yw$ cd src
ywdeMacBook-Air:src yw$ ls
JsplitPane.class JsplitPane.java com
ywdeMacBook-Air:src yw$ cd ..
ywdeMacBook-Air:mars yw$ ls
README.md build.xml libs scripts target ttt.jar
app.jar config resources src ttt
ywdeMacBook-Air:mars yw$ javac -cp libs/commons-csv-1.7.jar:src src/
ywdeMacBook-Air:mars yw$ ls
README.md build.xml libs scripts target ttt.jar
app.jar config resources src ttt
ywdeMacBook-Air:mars yw$ javac -cp libs:src src/com/banyuan/mars/App.java -d target
ywdeMacBook-Air:mars yw$ javac -cp libs/commons-csv-1.7.jar:src src/com/banyuan/mars/App.java -d target
ywdeMacBook-Air:mars yw$ ls
README.md build.xml libs scripts target ttt.jar
app.jar config resources src ttt
ywdeMacBook-Air:mars yw$ mkdir docs
ywdeMacBook-Air:mars yw$ ls
README.md build.xml docs resources src ttt
app.jar config libs scripts target ttt.jar
ywdeMacBook-Air:mars yw$ ls -la
total 64
drwxr-xr-x 15 yw staff 480 7 3 14:07 .
drwxr-xr-x 4 yw staff 128 7 3 10:28 ..
-rw-r--r--@ 1 yw staff 6148 7 3 14:14 .DS_Store
-rw-r--r--@ 1 yw staff 1309 6 26 17:27 README.md
-rw-r--r--@ 1 yw staff 5410 7 3 11:05 app.jar
-rw-r--r-- 1 yw staff 2191 6 26 17:27 build.xml
drwxr-xr-x 4 yw staff 128 6 26 17:27 config
drwxr-xr-x 2 yw staff 64 7 3 14:07 docs
drwxr-xr-x 3 yw staff 96 6 26 17:27 libs
drwxr-xr-x 4 yw staff 128 6 26 17:27 resources
drwxr-xr-x 5 yw staff 160 6 26 17:27 scripts
drwxr-xr-x 6 yw staff 192 7 3 10:17 src
drwxr-xr-x 4 yw staff 128 7 3 10:37 target
drwxr-xr-x 5 yw staff 160 7 3 11:33 ttt
-rw-r--r-- 1 yw staff 5441 7 3 11:42 ttt.jar
ywdeMacBook-Air:mars yw$ ls -la ./src
total 32
drwxr-xr-x 6 yw staff 192 7 3 10:17 .
drwxr-xr-x 15 yw staff 480 7 3 14:07 ..
-rw-r--r--@ 1 yw staff 6148 7 3 10:17 .DS_Store
-rw-r--r-- 1 yw staff 1262 6 26 17:27 JsplitPane.class
-rw-r--r-- 1 yw staff 1147 6 26 17:27 JsplitPane.java
drwxr-xr-x 5 yw staff 160 7 3 10:17 com
ywdeMacBook-Air:mars yw$ javadoc --help
用法:
javadoc [options] [packagenames] [sourcefiles] [@files]
其中, 选项包括:
--add-modules <模块>(,<模块>)*
除了初始模块之外要解析的根模块;
如果 <模块> 为 ALL-MODULE-PATH,
则为模块路径中的所有模块。
-bootclasspath <路径>
覆盖用于非模块化发行版的
平台类文件的位置
-breakiterator
计算带有 BreakIterator 的第一个语句
--class-path <路径>, -classpath <路径>, -cp <路径>
指定查找用户类文件的位置
-doclet <类> 通过替代 doclet 生成输出
-docletpath <路径>
指定查找 doclet 类文件的位置
--enable-preview
启用预览语言功能。与 -source 或 --release
一起使用。
-encoding <名称>
源文件编码名称
-exclude <程序包列表>
指定要排除的程序包列表
--expand-requires <值>
指示工具展开要文档化的模块集。
默认情况下, 将仅文档化命令行中明确
指定的模块。值 "transitive" 将额外包含
这些模块的所有 "requires transitive"
被依赖对象。值 "all" 将包含这些模块
的所有被依赖对象。
-extdirs <目录列表>
覆盖所安装扩展的位置
--help, -help, -?, -h
显示命令行选项并退出
--help-extra, -X
输出非标准选项的提要并退出
-J<标记> 直接将 <标记> 传递给运行时系统
--limit-modules <模块>(,<模块>)*
限制可观察模块的领域
-locale <名称> 要使用的区域设置, 例如, en_US 或 en_US_WIN
--module <模块>(,<模块>)*
文档化指定模块
--module-path <路径>, -p <路径>
指定查找应用程序模块的位置
--module-source-path <路径>
指定查找多个模块的输入源文件的位置
-package
显示程序包/受保护/公共类型和成员。对于
命名模块, 显示所有程序包和所有模块详细信息。
-private
显示所有类型和成员。对于命名模块,
显示所有程序包和所有模块详细信息。
-protected
显示受保护/公共类型和成员 (默认设置)。对于
命名模块, 显示导出的程序包和模块的 API。
-public
只显示公共类型和成员。对于命名模块,
显示导出的程序包和模块的 API。
-quiet 不显示状态消息
--release <发行版>
提供与指定发行版的源兼容性
--show-members <值>
指定将文档化的成员 (字段, 方法等), 其值可以
为 "public", "protected", "package" 或
"private" 之一。默认值为 "protected", 该值将
显示公共和受保护成员, "public" 将仅显示
公共成员, "package" 将显示公共, 受保护和
程序包成员, "private" 将显示所有成员。
--show-module-contents <值>
指定模块声明的文档粒度。
可能的值为 "api" 或 "all"。
--show-packages <值>
指定将文档化的模块的程序包。
可能的值为 "exported" 或 "all" 程序包。
--show-types <值>
指定将文档化的类型 (类, 接口等), 其值可以
为 "public", "protected", "package" 或
"private" 之一。默认值为 "protected", 该值将
显示公共和受保护类型, "public" 将仅显示
公共类型, "package" 将显示公共, 受保护和
程序包类型, "private" 将显示所有类型。
--source <发行版>, -source <发行版>
提供与指定发行版的源兼容性
--source-path <路径>, -sourcepath <路径>
指定查找源文件的位置
-subpackages <子程序包列表>
指定要递归加载的子程序包
--system
覆盖用于模块化发行版的系统模块的位置
--upgrade-module-path <路径>
覆盖可升级模块位置
-verbose 输出有关 Javadoc 正在执行的操作的消息
--version 输出版本信息
由 Standard doclet 提供:
--add-stylesheet
用于所生成文档的其他样式表文件
--allow-script-in-comments
允许在选项和注释中使用 JavaScript
-author 包含 @author 段
-bottom
包含每个页面的底部文本
-charset
用于跨平台查看生成的文档的字符集
-d
输出文件的目标目录
-docencoding
指定输出的字符编码
-docfilessubdirs
递归复制文档文件子目录
-doctitle
包含概览页面的标题
-excludedocfilessubdir :..
排除具有给定名称的所有文档文件子目录
-footer
包含每个页面的页脚文本
--frames 允许在生成的输出中使用帧
-group :...
将指定的元素在概览页面上分组在一起
-header
包含每个页面的页眉文本
-helpfile
包含帮助链接所链接到的文件
-html4 生成 HTML 4.01 输出
-html5 生成 HTML 5 输出
--javafx, -javafx
启用 JavaFX 功能
-keywords 随程序包, 类和成员信息一起附带 HTML 元标记
-link 创建指向 中的 javadoc 输出的链接
-linkoffline
使用 中的程序包列表链接到 中的文档
-linksource 以 HTML 格式生成源文件
--main-stylesheet , -stylesheetfile
用于更改生成文档的样式的文件
-nocomment 不生成说明和标记, 只生成声明
-nodeprecated
不包含 @deprecated 信息
-nodeprecatedlist
不生成已过时的列表
--no-frames 禁止在生成的输出中使用帧(默认值)
-nohelp 不生成帮助链接
-noindex 不生成索引
-nonavbar 不生成导航栏
-noqualifier ::..
输出中不包括限定符的列表
-nosince 不包括 @since 信息
-notimestamp 不包括隐藏的时间戳
-notree 不生成类分层结构
--override-methods (detail|summary)
在详细资料部分或概要部分中的文档覆盖方法
-overview
从 HTML 文件读取概览文档
-serialwarn 生成有关 @serial 标记的警告
-sourcetab
指定源中每个制表符占据的空格数
-splitindex 将索引分为每个字母对应一个文件
-tag ::
指定单个参数定制标记
-taglet 要注册的 Taglet 的全限定名称
-tagletpath Taglet 的路径
-top
包含每个页面的顶部文本
-use 创建类和程序包用法页面
-version 包含 @version 段
-windowtitle
文档的浏览器窗口标题
GNU 样式的选项可使用 = (而非空白) 来分隔选项名称
及其值。
ywdeMacBook-Air:mars yw$ ls -la src
total 32
drwxr-xr-x 7 yw staff 224 7 3 14:33 .
drwxr-xr-x 15 yw staff 480 7 3 14:07 ..
-rw-r--r--@ 1 yw staff 6148 7 3 10:17 .DS_Store
-rw-r--r-- 1 yw staff 1262 6 26 17:27 JsplitPane.class
-rw-r--r-- 1 yw staff 1147 6 26 17:27 JsplitPane.java
drwxr-xr-x 5 yw staff 160 7 3 10:17 com
drwxr-xr-x 3 yw staff 96 6 26 17:27 libs
ywdeMacBook-Air:mars yw$ ls -la src/com/banyuan/mars/library
total 32
drwxr-xr-x 6 yw staff 192 6 26 17:27 .
drwxr-xr-x 5 yw staff 160 7 3 10:17 ..
-rw-r--r-- 1 yw staff 1977 6 26 17:27 Book.java
-rw-r--r-- 1 yw staff 2953 6 26 17:27 BookParser.java
-rw-r--r-- 1 yw staff 767 6 26 17:27 Bookshelf.java
-rw-r--r-- 1 yw staff 723 6 26 17:27 MasterReader.java
ywdeMacBook-Air:mars yw$ javadoc -d ./docs ./src/com/banyuan/mars/library/Book.java
正在加载源文件./src/com/banyuan/mars/library/Book.java...
正在构造 Javadoc 信息...
标准 Doclet 版本 12.0.1
正在构建所有程序包和类的树...
正在生成./docs/com/banyuan/mars/library/Book.html...
正在生成./docs/com/banyuan/mars/library/package-summary.html...
正在生成./docs/com/banyuan/mars/library/package-tree.html...
正在生成./docs/constant-values.html...
正在构建所有程序包和类的索引...
正在生成./docs/overview-tree.html...
正在生成./docs/deprecated-list.html...
正在构建所有类的索引...
正在生成./docs/index-all.html...
正在构建所有类的索引...
正在生成./docs/allclasses-index.html...
正在生成./docs/allpackages-index.html...
正在生成./docs/index.html...
正在生成./docs/help-doc.html...
ywdeMacBook-Air:mars yw$ javadoc -d ./docs ./src/com/banyuan/mars/library/*.java
正在加载源文件./src/com/banyuan/mars/library/Book.java...
正在加载源文件./src/com/banyuan/mars/library/BookParser.java...
正在加载源文件./src/com/banyuan/mars/library/Bookshelf.java...
正在加载源文件./src/com/banyuan/mars/library/MasterReader.java...
正在构造 Javadoc 信息...
./src/com/banyuan/mars/library/MasterReader.java:5: 错误: 程序包org.apache.commons.csv不存在
import org.apache.commons.csv.*;
^
1 个错误
ywdeMacBook-Air:mars yw$ javadoc -d ./docs ./src/com/banyuan/mars/library/.java -classpath ./src/libs/.jar
正在加载源文件./src/com/banyuan/mars/library/Book.java...
正在加载源文件./src/com/banyuan/mars/library/BookParser.java...
正在加载源文件./src/com/banyuan/mars/library/Bookshelf.java...
正在加载源文件./src/com/banyuan/mars/library/MasterReader.java...
正在构造 Javadoc 信息...
标准 Doclet 版本 12.0.1
正在构建所有程序包和类的树...
正在生成./docs/com/banyuan/mars/library/Book.html...
正在生成./docs/com/banyuan/mars/library/BookParser.html...
正在生成./docs/com/banyuan/mars/library/Bookshelf.html...
正在生成./docs/com/banyuan/mars/library/MasterReader.html...
正在生成./docs/com/banyuan/mars/library/package-summary.html...
正在生成./docs/com/banyuan/mars/library/package-tree.html...
正在生成./docs/constant-values.html...
正在构建所有程序包和类的索引...
正在生成./docs/overview-tree.html...
正在生成./docs/deprecated-list.html...
正在构建所有类的索引...
正在生成./docs/index-all.html...
正在构建所有类的索引...
正在生成./docs/allclasses-index.html...
正在生成./docs/allpackages-index.html...
正在生成./docs/index.html...
正在生成./docs/help-doc.html...
ywdeMacBook-Air:mars yw$ javadoc com.banyuan.mars.library -d ./docs -sourcepath ./src -classpath ./src/libs/*.jar
正在加载程序包com.banyuan.mars.library的源文件...
正在构造 Javadoc 信息...
标准 Doclet 版本 12.0.1
正在构建所有程序包和类的树...
正在生成./docs/com/banyuan/mars/library/Book.html...
正在生成./docs/com/banyuan/mars/library/BookParser.html...
正在生成./docs/com/banyuan/mars/library/Bookshelf.html...
正在生成./docs/com/banyuan/mars/library/MasterReader.html...
正在生成./docs/com/banyuan/mars/library/package-summary.html...
正在生成./docs/com/banyuan/mars/library/package-tree.html...
正在生成./docs/constant-values.html...
正在构建所有程序包和类的索引...
正在生成./docs/overview-tree.html...
正在生成./docs/deprecated-list.html...
正在构建所有类的索引...
正在生成./docs/index-all.html...
正在构建所有类的索引...
正在生成./docs/allclasses-index.html...
正在生成./docs/allpackages-index.html...
正在生成./docs/index.html...
正在生成./docs/help-doc.html...
ywdeMacBook-Air:mars yw$ javadoc com.banyuan.mars.library -d ./docs -sourcepath ./src -classpath ./src/libs/*.jar
正在加载程序包com.banyuan.mars.library的源文件...
正在构造 Javadoc 信息...
正在创建目标目录: "./docs/"
标准 Doclet 版本 12.0.1
正在构建所有程序包和类的树...
正在生成./docs/com/banyuan/mars/library/Book.html...
正在生成./docs/com/banyuan/mars/library/BookParser.html...
正在生成./docs/com/banyuan/mars/library/Bookshelf.html...
正在生成./docs/com/banyuan/mars/library/MasterReader.html...
正在生成./docs/com/banyuan/mars/library/package-summary.html...
正在生成./docs/com/banyuan/mars/library/package-tree.html...
正在生成./docs/constant-values.html...
正在构建所有程序包和类的索引...
正在生成./docs/overview-tree.html...
正在生成./docs/deprecated-list.html...
正在构建所有类的索引...
正在生成./docs/index-all.html...
正在构建所有类的索引...
正在生成./docs/allclasses-index.html...
正在生成./docs/allpackages-index.html...
正在生成./docs/index.html...
正在生成./docs/help-doc.html...
ywdeMacBook-Air:mars yw$ javadoc -d docs -sourcepath src @config/package.txt
正在加载程序包com.banyuan.mars的源文件...
正在加载程序包com.banyuan.mars.library的源文件...
正在构造 Javadoc 信息...
src/com/banyuan/mars/library/MasterReader.java:5: 错误: 程序包org.apache.commons.csv不存在
import org.apache.commons.csv.*;
^
1 个错误
ywdeMacBook-Air:mars yw$ javadoc -d docs -sourcepath src @config/package.txt -classpath ./src/libs/*.jar
正在加载程序包com.banyuan.mars的源文件...
正在加载程序包com.banyuan.mars.library的源文件...
正在构造 Javadoc 信息...
标准 Doclet 版本 12.0.1
正在构建所有程序包和类的树...
正在生成docs/com/banyuan/mars/App.html...
正在生成docs/com/banyuan/mars/library/Book.html...
正在生成docs/com/banyuan/mars/library/BookParser.html...
正在生成docs/com/banyuan/mars/library/Bookshelf.html...
正在生成docs/com/banyuan/mars/library/MasterReader.html...
正在生成docs/com/banyuan/mars/package-summary.html...
正在生成docs/com/banyuan/mars/package-tree.html...
正在生成docs/com/banyuan/mars/library/package-summary.html...
正在生成docs/com/banyuan/mars/library/package-tree.html...
正在生成docs/constant-values.html...
正在构建所有程序包和类的索引...
正在生成docs/overview-tree.html...
正在生成docs/deprecated-list.html...
正在构建所有类的索引...
正在生成docs/index.html...
正在生成docs/index-all.html...
正在构建所有类的索引...
正在生成docs/allclasses-index.html...
正在生成docs/allpackages-index.html...
正在生成docs/overview-summary.html...
正在生成docs/help-doc.html...