---
title: "j2sdk1.4.0中bin子目录下各程序的参数用法"
author: "sun_cat"
date: "2007-05-16T09:26:59Z"
tags: []
slug: "j2sdk1-4-0-bin"
draft: false
lastmod: "2007-05-16T09:26:59Z"
id: 80260
url: "https://sun-cat.iteye.com/blog/80260"
---

javac.exe

用法：javac &lt;选项&gt; &lt;源文件&gt;  
可能的选项包括：  
\-g                        生成所有调试信息  
\-g:none                   生成无调试信息  
\-g:{lines,vars,source}    生成只有部分调试信息  
\-O                        优化；可能妨碍调试或者增大类文件  
\-nowarn                   生成无警告  
\-verbose                  输出关于编译器正在做的信息  
\-deprecation              输出使用了不鼓励使用的API的源程序位置  
\-classpath &lt;路径&gt;         指定用户类文件的位置  
\-sourcepath &lt;路径&gt;        指定输入源文件的位置  
\-bootclasspath &lt;路径&gt;     覆盖自举类文件的位置  
\-extdirs &lt;目录(多个)&gt;     覆盖安装的扩展类的位置  
\-d &lt;目录&gt;                 指定输出类文件的位置  
\-encoding &lt;编码&gt;          指定源文件中所用的字符集编码  
\-target &lt;版本&gt;            生成指定虚拟机版本的类文件  
\-help                     Print a synopsis of standard options

\------------------------------------------------------------------------------------

ppletviewer.exe

用法：appletviewer &lt;options&gt; url(s)

其中，&lt;options&gt; 包括：  
\-debug                  在 Java 调试器中启动 applet 小程序查看器  
\-encoding &lt;encoding&gt;    指定由 HTML 文件使用的字符编码  
\-J&lt;runtime flag&gt;        向 Java 解释器传递参数

-J 选项不是标准选项，如有更改，不另行通知。

\------------------------------------------------------------------------------------  
jar.exe

用法：jar {ctxu}\[vfm0M] \[jar-文件] \[manifest-文件] \[-C 目录] 文件名 ...  
选项：  
   -c  创建新的存档  
   -t  列出存档内容的列表  
   -x  展开存档中的命名的（或所有的〕文件  
   -u  更新已存在的存档  
   -v  生成详细输出到标准输出上  
   -f  指定存档文件名  
   -m  包含来自标明文件的标明信息  
   -0  只存储方式；未用ZIP压缩格式  
   -M  不产生所有项的清单（manifest〕文件  
   -i  为指定的jar文件产生索引信息  
   -C  改变到指定的目录，并且包含下列文件：  
如果一个文件名是一个目录，它将被递归处理。  
清单（manifest〕文件名和存档文件名都需要被指定，按'm' 和 'f'标志指定的相同顺序。  
示例1：将两个class文件存档到一个名为 'classes.jar' 的存档文件中：  
      jar cvf classes.jar Foo.class Bar.class  
示例2：用一个存在的清单（manifest）文件 'mymanifest' 将 foo/ 目录下的所有  
          文件存档到一个名为 'classes.jar' 的存档文件中：  
      jar cvfm classes.jar mymanifest -C foo/ .

\------------------------------------------------------------------------------------  
jarsigner.exe

用法：jarsigner \[options] jar-file alias  
     jarsigner -verify \[options] jar-file

\[-keystore &lt;url&gt;]           keystore location

\[-storepass &lt;password&gt;]     password for keystore integrity

\[-storetype &lt;type&gt;]         keystore type

\[-keypass &lt;password&gt;]       password for private key (if different)

\[-sigfile &lt;file&gt;]           name of .SF/.DSA file

\[-signedjar &lt;file&gt;]         name of signed JAR file

\[-verify]                   verify a signed JAR file

\[-verbose]                  verbose output when signing/verifying

\[-certs]                    display certificates when verbose and verifying

\[-internalsf]               include the .SF file inside the signature block

\[-sectionsonly]             don't compute hash of entire manifest

\[-provider]                 name of cryptographic service provider's master class file  
...

\------------------------------------------------------------------------------------  
javadoc.exe

用法：javadoc \[options] \[packagenames] \[sourcefiles] \[classnames] \[@files]  
\-overview &lt;file&gt;          读取 HTML 格式的概述文档  
\-public                   仅显示 public 类和成员  
\-protected                显示 protected/public 类和成员（缺省）  
\-package                  显示 package/protected/public 类和成员  
\-private                  显示所有类和成员  
\-help                     显示命令行选项  
\-doclet &lt;class&gt;           通过候选 doclet 生成输出  
\-docletpath &lt;path&gt;        指定 doclet 类文件的查找位置  
\-sourcepath &lt;pathlist&gt;    指定源文件的查找位置  
\-classpath &lt;pathlist&gt;     指定用户类文件的查找位置  
\-exclude &lt;pkglist&gt;        Specify a list of packages to exclude  
\-subpackages &lt;subpkglist&gt; Specify subpackages to recursively load  
\-breakiterator            Compute 1st sentence with BreakIterator  
\-bootclasspath &lt;pathlist&gt; 覆盖自举类加载器所加载的类文件的位置  
\-source &lt;release&gt;         Provide source compatibility with specified release  
\-extdirs &lt;dirlist&gt;        覆盖已安装的扩展的位置  
\-verbose                  有关 Javadoc 所做工作的输出信息  
\-locale &lt;name&gt;            所用的 Locale，例如 en\_US 或 en\_US\_WIN  
\-encoding &lt;name&gt;          源文件编码名称  
\-J&lt;flag&gt;                  将 &lt;flag&gt; 直接传给运行时系统

由标准 doclet 提供：  
\-d &lt;directory&gt;                    输出文件的目标目录  
\-use                              创建类和包的用法页  
\-version                          包含 @version 段  
\-author                           包含 @author 段  
\-docfilessubdirs                  Recursively copy doc-file subdirectories  
\-splitindex                       将索引分为每个字母对应一个文件  
\-windowtitle &lt;text&gt;               文档的浏览器窗口标题  
\-doctitle &lt;html-code&gt;             包含包索引页（首页）的标题  
\-header &lt;html-code&gt;               包含每一页的页眉文本  
\-footer &lt;html-code&gt;               包含每一页的页脚文本  
\-bottom &lt;html-code&gt;               包含每一页的页底文本  
\-link &lt;url&gt;                       Create links to javadoc output at &lt;url&gt;  
\-linkoffline &lt;url&gt; &lt;url2&gt;         Link to docs at &lt;url&gt; using package list at &lt;url2&gt;  
\-excludedocfilessubdir &lt;name1&gt;:.. Exclude any doc-files subdirectories with given name.  
\-group &lt;name&gt; &lt;p1&gt;:&lt;p2&gt;..         Group specified packages together in overview page  
\-nocomment                        Supress description and tags, generate only declarations.  
\-nodeprecated                     不包含 @deprecated 信息  
\-noqualifier &lt;name1&gt;:&lt;name2&gt;:...  Exclude the list of qualifiers from the output.  
\-nosince                          Do not include @since information  
\-nodeprecatedlist                 不生成不鼓励使用的列表  
\-notree                           不生成类层次  
\-noindex                          不生成索引  
\-nohelp                           不生成帮助链接  
\-nonavbar                         不生成导航栏  
\-quiet                            Do not display status messages to screen  
\-serialwarn                       Generate warning about @serial tag  
\-tag &lt;name&gt;:&lt;locations&gt;:&lt;header&gt;  Specify single argument custom tags  
\-taglet                           The fully qualified name of Taglet to register  
\-tagletpath                       The path to Taglets  
\-charset &lt;charset&gt;                Charset for cross-platform viewing of generated documentation.  
\-helpfile &lt;file&gt;                  包含帮助链接功能链接到目标的文件  
\-linksource                       Generate source in HTML  
\-stylesheetfile &lt;path&gt;            改变所生成文档的样式的文件  
\-docencoding &lt;name&gt;               输出编码名称

\------------------------------------------------------------------------------------  
jdb.exe

用法：jdb &lt;options&gt; &lt;class&gt; &lt;arguments&gt;

where options include:  
   -help             print out this message and exit  
   -sourcepath &lt;directories separated by ";"&gt;  
                     directories in which to look for source files  
   -attach &lt;address&gt;  
                     attach to a running VM at the specified address using standard connector  
   -listen &lt;address&gt;  
                     wait for a running VM to connect at the specified address using standard connector  
   -listenany  
                     wait for a running VM to connect at any available address using standard connector  
   -launch  
                     launch VM immediately instead of waiting for 'run' command  
   -connect &lt;connector-name&gt;:&lt;name1&gt;=&lt;value1&gt;,...  
                     connect to target VM using named connector with listed argument values  
   -dbgtrace \[flags] print info for debugging jdb  
   -tclient          run the application in the Hotspot(tm) Performance Engine (Client)  
   -tserver          run the application in the Hotspot(tm) Performance Engine (Server)

options forwarded to debuggee process:  
   -v -verbose\[:class|gc|jni]  
                     turn on verbose mode  
   -D&lt;name&gt;=&lt;value&gt;  set a system property  
   -classpath &lt;directories separated by ";"&gt;  
                     list directories in which to look for classes  
   -X&lt;option&gt;        non-standard target VM option

&lt;class&gt; is the name of the class to begin debugging  
&lt;arguments&gt; are the arguments passed to the main() method of &lt;class&gt;

For command help type 'help' at jdb prompt

\------------------------------------------------------------------------------------  
javah.exe

用法：javah \[options] &lt;classes&gt;

其中 \[options] 包括：

-help                 打印该帮助信息  
\-classpath &lt;path&gt;     类的加载路径  
\-bootclasspath &lt;path&gt; 自举类的加载路径  
\-d &lt;dir&gt;              输出目录  
\-o &lt;file&gt;             输出文件（仅能使用 -d 或 -o 之一）  
\-jni                  生成 JNI 风格的头文件（缺省）  
\-old                  生成 JDK1.0 风格的头文件  
\-stubs                生成 stubs 文件  
\-version              打印版本信息  
\-verbose              输出有关本命令所做工作的信息  
\-force             始终写输出文件

指定 &lt;classes&gt; 时必须使用全名（例如 java.lang.Object）。

\------------------------------------------------------------------------------------  
javap.exe

用法：javap &lt;options&gt; &lt;classes&gt;...

where options include:  
  -b                        Backward compatibility with javap in JDK 1.1  
  -c                        Disassemble the code  
  -classpath &lt;pathlist&gt;     Specify where to find user class files  
  -extdirs &lt;dirs&gt;           Override location of installed extensions  
  -help                     Print this usage message  
  -J&lt;flag&gt;                  Pass &lt;flag&gt; directly to the runtime system  
  -l                        Print line number and local variable tables  
  -public                   Show only public classes and members  
  -protected                Show protected/public classes and members  
  -package                  Show package/protected/public classes

                          and members (default)  
  -private                  Show all classes and members  
  -s                        Print internal type signatures  
  -bootclasspath &lt;pathlist&gt; Override location of class files loaded  
                            by the bootstrap class loader  
  -verbose                  Print stack size, number of locals and args for methods  
                            If verifying, print reasons for failure

\------------------------------------------------------------------------------------  
javaw.exe

\------------------------------------------------------------------------------------  
HtmlConverter.exe

用法：HtmlConverter \[-option1 value1 \[-option2 value2 \[...]]] \[-simulate]  \[filespecs]

其中，选项包括：

   -source:    获取源文件的路径。  缺省值： &lt;userdir&gt;  
   -dest:      写入已转换文件的路径。  缺省值： &lt;userdir&gt;  
   -backup:    写备份文件的路径。  缺省值： &lt;dirname&gt;\_BAK  
   -f:         强制覆写备份文件。  
   -subdirs:   应处理子目录中的文件。  
   -template:  模板文件的路径。  如果不确定，请使用缺省值。  
   -log:       写日志的路径。  如果没有提供，则不会写入任何日志。  
   -progress:  转换时显示进度。  缺省值： true  
   -simulate:  在没有进行转换时显示特定于转换的信息。  
   -latest:    使用最新的 JRE 支持发行版 mimetype。  
   -gui:       显示转换程序的图形用户界面。

   filespecs:  用空格分开的文件说明列表。  缺省值： "\*.html \*.htm" （需要引号）

\------------------------------------------------------------------------------------  
keytool.exe

keytool 用法：

-certreq     \[-v] \[-alias &lt;alias&gt;] \[-sigalg &lt;sigalg&gt;]  
    \[-file &lt;csr\_file&gt;] \[-keypass &lt;keypass&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-delete      \[-v] -alias &lt;alias&gt;  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-export      \[-v] \[-rfc] \[-alias &lt;alias&gt;] \[-file &lt;cert\_file&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-genkey      \[-v] \[-alias &lt;alias&gt;] \[-keyalg &lt;keyalg&gt;]  
    \[-keysize &lt;keysize&gt;] \[-sigalg &lt;sigalg&gt;]  
    \[-dname &lt;dname&gt;] \[-validity &lt;valDays&gt;]  
    \[-keypass &lt;keypass&gt;] \[-keystore &lt;keystore&gt;]  
    \[-storepass &lt;storepass&gt;] \[-storetype &lt;storetype&gt;]  
    \[-provider &lt;provider\_class\_name&gt;] ...

-help

-identitydb  \[-v] \[-file &lt;idb\_file&gt;] \[-keystore &lt;keystore&gt;]  
    \[-storepass &lt;storepass&gt;] \[-storetype &lt;storetype&gt;]

-import      \[-v] \[-noprompt] \[-trustcacerts] \[-alias &lt;alias&gt;]  
    \[-file &lt;cert\_file&gt;] \[-keypass &lt;keypass&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-keyclone    \[-v] \[-alias &lt;alias&gt;] -dest &lt;dest\_alias&gt;  
    \[-keypass &lt;keypass&gt;] \[-new &lt;new\_keypass&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-keypasswd   \[-v] \[-alias &lt;alias&gt;]  
    \[-keypass &lt;old\_keypass&gt;] \[-new &lt;new\_keypass&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-list        \[-v | -rfc] \[-alias &lt;alias&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

-printcert   \[-v] \[-file &lt;cert\_file&gt;]

-selfcert    \[-v] \[-alias &lt;alias&gt;] \[-sigalg &lt;sigalg&gt;]  
    \[-dname &lt;dname&gt;] \[-validity &lt;valDays&gt;]  
    \[-keypass &lt;keypass&gt;] \[-keystore &lt;keystore&gt;]  
    \[-storepass &lt;storepass&gt;] \[-storetype &lt;storetype&gt;]  
    \[-provider &lt;provider\_class\_name&gt;] ...

-storepasswd \[-v] \[-new &lt;new\_storepass&gt;]  
    \[-keystore &lt;keystore&gt;] \[-storepass &lt;storepass&gt;]  
    \[-storetype &lt;storetype&gt;] \[-provider &lt;provider\_class\_name&gt;] ...

\------------------------------------------------------------------------------------  
extcheck.exe

用法：extcheck \[-verbose] &lt;jar file&gt;

\------------------------------------------------------------------------------------  
idlj.exe

com.sun.tools.corba.se.idl.InvalidArgument: No IDL file was specified.

Compiler Usage:

   java com.sun.tools.corba.se.idl.toJavaPortable.Compile \[options] &lt;idl file&gt;

where &lt;idl file&gt; is the name of a file containing IDL definitions, and  
\[options] is any combination of the options listed below.  The options  
are optional and may appear in any order; &lt;idl file&gt; is required and  
must appear last.

Options:  
\-d &lt;symbol&gt;               This is equivalent to the following line in an  
                         IDL file:  #define &lt;symbol&gt;  
\-emitAll                  Emit all types, including those found in #included files.  
\-f&lt;side&gt;                  Define what bindings to emit.  &lt;side&gt; is one of client,  
                         server, all, serverTIE, allTIE.  serverTIE and allTIE  
                         cause delegate model skeletons to be emitted.  If this  
                         flag is not used, -fclient is assumed.  
\-i &lt;include path&gt;         By default, the current directory is scanned for  
                         included files.  This option adds another directory.  
\-keep                     If a file to be generated already exists, do not  
                         overwrite it.  By default it is overwritten.  
\-noWarn                   Suppress warnings.  
\-oldImplBase              Generate skeletons compatible with old (pre-1.4) JDK ORBs.  
\-pkgPrefix &lt;t&gt; &lt;prefix&gt;   When the type or module name &lt;t&gt; is encountered at  
                         file scope, begin the Java package name for all files  
                         generated for &lt;t&gt; with &lt;prefix&gt;.  
\-pkgTranslate &lt;t&gt; &lt;pkg&gt;   When the type or module name &lt;t&gt; in encountered, replace  
                         it with &lt;pkg&gt; in the generated java package.  Note that  
                         pkgPrefix changes are made first.  &lt;t&gt; must match the  
                         full package name exactly.  Also, &lt;t&gt; must not be  
                         org, org.omg, or any subpackage of org.omg.  
\-skeletonName &lt;xxx%yyy&gt;   Name the skeleton according to the pattern.  
                         The defaults are:  
                         %POA for the POA base class (-fserver or -fall)  
                         \_%ImplBase for the oldImplBase base class  
                         (-oldImplBase and (-fserver or -fall)).  
\-td &lt;dir&gt;                 use &lt;dir&gt; for the output directory instead of  
                         the current directory.  
\-tieName &lt;xxx%yyy&gt;        Name the tie according to the pattern.  The defaults are:  
                         %POATie for the POA tie (-fserverTie or -fallTie)  
                         %\_Tie for the oldImplBase tie  
                         (-oldImplBase and (-fserverTie or -fallTie)).  
\-v, -verbose              Verbose mode.  
\-version                  Display the version number and quit.

\------------------------------------------------------------------------------------

orbd.exe

用法：orbd &lt;选项&gt;

其中，&lt;选项&gt; 包括：  
\-port                  启动 ORBD 的激活端口，缺省值为 1049 (可选)  
\-defaultdb             ORBD 文件的目录，缺省值为 "./orb.db" (可选)  
\-serverid              ORBD 的服务器标识符，缺省值为 1 (可选)  
\-ORBInitialPort        初始端口（必需）  
\-ORBInitialHost        初始主机名称（必需）

\------------------------------------------------------------------------------------  
policytool.exe

用法：policytool \[选项]

\[-file &lt;file&gt;]    规则文件位置

\------------------------------------------------------------------------------------

rmic.exe

用法：rmic &lt;选项&gt; &lt;类名&gt;

其中 &lt;选项&gt; 包括：  
\-keep          不删除中间生成的源文件  
\-keepgenerated （同 "-keep")  
\-v1.1          为 1.1 stub 协议版本创建 stubs/skeleton  
\-vcompat       （缺省）创建与 1.1 和  
                          1.2 stub 协议版本兼容的 stubs/skeleton  
\-v1.2          仅为 1.2 stub 协议版本创建 stubs  
\-iiop          为 IIOP 创建 stubs。当使用该选项时，&lt;选项&gt;还应包括：

                  -always           总创建 stubs （即使在它们同时出现时〕  
                  -alwaysgenerate   (同 "-always")  
                  -nolocalstubs     不创建为同一进程优化的 stubs

-idl           创建 IDL。当使用该选项时，&lt;选项&gt;还应包括：

                  -noValueMethods   不生成值类型的方法  
                  -always           总创建 IDL （即使在它们同时出现时〕  
                  -alwaysgenerate   (同 "-always")

-g             一般调试信息  
\-depend        以递归方式重编译过期的文件  
\-nowarn        不警告  
\-nowrite       不将编译过的类写入到文件系统  
\-verbose       输出有关编译器所做工作的信息  
\-classpath &lt;path&gt;     指定输入源和类文件的查找位置  
\-sourcepath &lt;path&gt;    指定用户源文件的查找位置  
\-bootclasspath &lt;path&gt; 覆盖自举类文件的位置  
\-extdirs &lt;path&gt;       覆盖安装扩展类的位置  
\-d &lt;directory&gt;        指定所生成类文件的放置位置  
\-J&lt;runtime flag&gt;      将参数传给 java 解释程序

\------------------------------------------------------------------------------------

rmid.exe

用法：rmid &lt;option&gt;

其中，&lt;option&gt; 包括:  
\-port &lt;option&gt;        指定供 rmid 使用的端口  
\-log &lt;directory&gt;    指定 rmid 将日志写入的目录  
\-stop               停止当前的 rmid 调用（对指定端口）  
\-C&lt;runtime 标记&gt;    向每个子进程传递参数（激活组）  
\-J&lt;runtime 标记&gt;    向 java 解释程序传递参数

\------------------------------------------------------------------------------------

rmiregistry.exe

用法： rmiregistry &lt;选项&gt; &lt;端口&gt;

其中，&lt;选项&gt; 包括：  
\-J&lt;runtime 标记&gt; 将参数传递到 java 解释程序

\------------------------------------------------------------------------------------  
serialver.exe

用法：serialver \[-classpath classpath] \[-show] \[classname...]

\------------------------------------------------------------------------------------  
servertool.exe

欢迎使用 Java IDL 服务器工具  
请在提示处输入命令

servertool &gt; help

可用命令：

register     - 注册一个可激活的服务器  
unregister   - 取消服务器注册  
getserverid  - 返回应用程序名称的服务器标识符  
list         - 列举所有已注册服务器  
listappnames - 列举当前定义的应用程序名称  
listactive   - 列举当前活动的服务器  
locate       - 将已注册服务器定位在特定类型的端口  
locateperorb - 为已注册服务器的特定对象请求代理程序定位端口。  
orblist      - 对象请求代理程序 (orb) 名称及其映射列表  
shutdown     - 关闭一个已注册服务器  
startup      - 启动一个已注册服务器  
help         - 取得帮助  
quit         - 退出此工具

servertool &gt; quit