没有合适的资源?快使用搜索试试~ 我知道了~
首页JDK 9 JSE Tools官方参考文档(E61612-05,2017年10月)
JDK 9 JSE Tools官方参考文档(E61612-05,2017年10月)
需积分: 5 0 下载量 130 浏览量
更新于2024-06-22
收藏 1.55MB PDF 举报
《JDK9-JSE-Tools Reference-319》是一份关于Java平台标准版(Java Platform, Standard Edition, JSE)的工具参考文档,针对的是Java SE Release 9版本,发布日期为2017年10月。该文档由Oracle及其关联公司所有,版权受1993年和2017年的法律保护,强调了用户在使用和分发时必须遵守严格的许可协议,禁止未经许可的行为,如复制、修改或公开传播软件,除非法律法规另有规定。 文档内容涵盖了对JDK 9中工具的详尽介绍,包括但不限于编译器、调试器、性能分析工具等,这些工具是开发人员进行Java应用程序开发、测试和优化的重要辅助工具。对于软件的反向工程、解剖或反编译,除非为了实现兼容性,否则是被严格禁止的。这意味着开发者在使用这些工具时,需要确保遵守文档中的规定,尊重Oracle的知识产权。 值得注意的是,这份文档的信息可能会随时更新,且并不保证无误。如果用户在使用过程中发现错误,应以书面形式报告给Oracle。另外,如果这份软件或相关文档是由美国政府或代表其授权的人士获取的,那么文档还包含了一个特定的政府用户通知,表明它可能受到美国联邦政府用户条款的约束。 《JDK9-JSE-Tools Reference-319》提供了开发人员在JDK 9环境下高效工作的必要工具指南,但同时也强调了对版权和使用规范的尊重,确保软件的合法和合规使用。对于任何想要深入学习和使用JDK 9工具的开发者来说,理解和遵守文档中的条款至关重要。
资源详情
资源推荐
-endorseddirs directories
Overrides the location of the endorsed standards path.
Note:
This option is not supported when using
--release release
to compile for JDK
9. See the description of
--release release
for details about compiling for
versions other than JDK 9.
-extdirs directories
Overrides the location of the installed extensions. The
directories
variable is a colon-
separated list of directories. Each JAR file in the specified directories is searched for
class files. All JAR files found become part of the class path.
If you are cross-compiling, then this option specifies the directories that contain the
extension classes. See Cross-Compilation Options for javac.
Note:
This option is not supported when using
--release release
to compile for JDK
9. See the description of
--release release
for details about compiling for
versions other than JDK 9.
-g
Generates all debugging information, including local variables. By default, only line
number and source file information is generated.
-g:[lines, vars, source],[lines, vars, source],[lines, vars, source]
Generates only the kinds of debugging information specified by the comma-separated
list of keywords. Valid keywords are:
lines
Line number debugging information.
vars
Local variable debugging information.
source
Source file debugging information.
-g:none
Doesn’t generate any debugging information.
-h directory
Specifies where to place generated native header files.
When you specify this option, a native header file is generated for each class that
contains native methods or that has one or more constants annotated with the
java.lang.annotation.Native annotation. If the class is part of a package, then
the compiler puts the native header file in a subdirectory that reflects the package
name and creates directories as needed.
Chapter 2
javac
2-5
--help
or
–help
Prints a synopsis of the standard options.
--help-extra
or
-X
Prints the help for extra options.
-implicit:{[none, class],[none, class]}
Specifies whether or not to generate class files for implicitly referenced files:
•
-implicit:class
— Automatically generates class files.
•
-implicit:none
— Suppresses class file generation.
If this option isn’t specified, then the default automatically generates class files. In this
case, the compiler issues a warning if any class files are generated when also doing
annotation processing. The warning isn’t issued when the
-implicit
option is explicitly
set. See Searching for Types.
-Joption
Passes
option
to the runtime system, where
option
is one of the Java options
described on javacommand. For example,
-J-Xms48m
sets the startup memory to 48
MB.
Note:
The
CLASSPATH
environment variable,
-classpath
option,
-bootclasspath
option,
and
-extdirs
option don’t specify the classes used to run
javac
. Trying to
customize the compiler implementation with these options and variables is
risky and often doesn’t accomplish what you want. If you must customize the
complier implementation, then use the
-J
option to pass options through to
the underlying Java launcher.
--limit-modules module , module
*
Limits the universe of observable modules.
--module module-name
or
-m module-name
Compiles only the specified module and checks time stamps.
--module-path path
or
-p path
Specifies where to find application modules.
--module-source-path module-source-path
Specifies where to find input source files for multiple modules.
--module-version version
Specifies the version of modules that are being compiled.
-nowarn
Disables warning messages. This option operates the same as the
-Xlint:none
option.
-parameters
Generates metadata for reflection on method parameters. Stores formal parameter
names of constructors and methods in the generated class file so that the method
Chapter 2
javac
2-6
java.lang.reflect.Executable.getParameters
from the Reflection API can retrieve
them.
-proc: [none, only] , [none, only]
Controls whether annotation processing and compilation are done.
-proc:none
means
that compilation takes place without annotation processing.
-proc:only
means that
only annotation processing is done, without any subsequent compilation.
-processor class1 [,class2,class3...]
Names of the annotation processors to run. This bypasses the default discovery
process.
--processor-module—path path
or
-p module-path
Specifies the module path used for finding annotation processors.
--processor—path path
or
-processorpath path
Specifies where to find annotation processors. If this option isn’t used, then the class
path is searched for processors.
-profile profile
Checks that the API used is available in the specified profile.
Note:
Not supported when using
--release release
to compile for JDK 9. See the
description of
--release release
for details about compiling for versions other
than JDK 9.
--release release
Compiles against the public, supported and documented API for a specific VM
version. Supported
release
targets are
6
,
7
,
8
, and
9
.
Note:
When using
--release
for a version of the Java Platform that supports
modules, you can’t use
--add-modules
to access internal JDK modules, nor
can you use
--add-exports
to access internal JDK APIs in the modules.
-s directory
Specifies the directory used to place the generated source files. If a class is part of a
package, then the compiler puts the source file in a subdirectory that reflects the
package name and creates directories as needed. For example:
• Oracle Solaris, Linux, and OS X:: If you specify
-s /home/mysrc
and the class is
called
com.mypackage.MyClass
, then the source file is put in
/home/mysrc/com/
mypackage/MyClass.java
.
• Windows: If you specify
-s C:\mysrc
and the class is called
com.mypackage.MyClass
, then the source file is put in
C:\mysrc\com\mypackage
\MyClass.java
.
Chapter 2
javac
2-7
-source release
Specifies the version of source code accepted. The following values for
release
are
allowed:
Note:
As of JDK 9, the
javac
doesn’t support
-source
release settings less than or
equal to
5
. If settings less than or equal to
5
are used, then the
javac
command behaves as if
-source 6
were specified.
1.6
No language changes were introduced in Java SE 6. However, encoding errors in
source files are now reported as errors instead of warnings as was done in earlier
releases of Java Platform, Standard Edition.
6
Synonym for 1.6.
1.7
The compiler accepts code with features introduced in Java SE 7.
7
Synonym for 1.7.
1.8
The compiler accepts code with features introduced in Java SE 8.
8
Synonym for 1.8.
9
The default value. The compiler accepts code with features introduced in Java SE
9.
--source-path path
or
-sourcepath path
Specifies where to find input source files. This is the source code path used to search
for class or interface definitions. As with the user class path, source path entries are
separated by colons (:) on Oracle Solaris and semicolons(;) on Windows. They can be
directories, JAR archives, or ZIP archives. If packages are used, then the local path
name within the directory or archive must reflect the package name.
Note:
Classes found through the class path might be recompiled when their source
files are also found. See Searching for Types.
--system jdk | none
Overrides the location of system modules.
-target release
Generates class files for a specific VM version.
Chapter 2
javac
2-8
--upgrade-module—path path
Overrides the location of upgradeable modules.
-verbose
Outputs messages about what the compiler is doing. Messages include information
about each class loaded and each source file compiled.
--version
or
-version
Prints version information.
-Werror
Terminates compilation when warnings occur.
Cross-Compilation Options for javac
By default, for releases prior to JDK 9, classes were compiled against the bootstrap
classes of the platform that shipped with the
javac
command. But
javac
also supports
cross-compiling, in which classes are compiled against bootstrap classes of a different
Java platform implementation. It’s important to use the
-bootclasspath
and
-extdirs
options when cross-compiling.
Note:
Not supported when using
--release release
to compile for JDK 9. See the
description of
--release release
for details about compiling for versions other
than JDK 9.
Extra Options for javac
--add-exports module/package=other-module(,other-module)
*
Specifies a package to be considered as exported from its defining module to
additional modules or to all unnamed modules when the value of
other-module
is
ALL-
UNNAMED
.
--add-reads module=other-module(,other-module)
*
Specifies additional modules to be considered as required by a given module.
-Djava.endorsed.dirs=dirs
Overrides the location of the endorsed standards path.
Note:
Not supported when using
--release release
to compile for JDK 9. See the
description of
--release release
for details about compiling for versions other
than JDK 9.
-Djava.ext.dirs=dirs
Overrides the location of installed extensions.
Chapter 2
javac
2-9
剩余318页未读,继续阅读
weixin_40191861_zj
- 粉丝: 67
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 京瓷TASKalfa系列维修手册:安全与操作指南
- 小波变换在视频压缩中的应用
- Microsoft OfficeXP详解:WordXP、ExcelXP和PowerPointXP
- 雀巢在线媒介投放策划:门户网站与广告效果分析
- 用友NC-V56供应链功能升级详解(84页)
- 计算机病毒与防御策略探索
- 企业网NAT技术实践:2022年部署互联网出口策略
- 软件测试面试必备:概念、原则与常见问题解析
- 2022年Windows IIS服务器内外网配置详解与Serv-U FTP服务器安装
- 中国联通:企业级ICT转型与创新实践
- C#图形图像编程深入解析:GDI+与多媒体应用
- Xilinx AXI Interconnect v2.1用户指南
- DIY编程电缆全攻略:接口类型与自制指南
- 电脑维护与硬盘数据恢复指南
- 计算机网络技术专业剖析:人才培养与改革
- 量化多因子指数增强策略:微观视角的实证分析
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功