After installing JDK, do you find that there are many EXE files in the bin folder of the installation directory?
The following describes the usage of different EXE files.
Javac: Java compiler, which replaces Java source code with byte generation
Java: Java interpreter, which executes Java application code directly from class files
Appletviewer: a Java browser that executes Java applets on HTML files.
Javadoc: HTML document generated based on the Java source code and its instructions
Jdb: Java debugger that can execute programs, set breakpoints, and check VARIABLES line by line.
Javah: generate the C process that can call the Java Process, or create the header file of the C process that can be called by the Java program
Javap: Java anti-assembler, which displays the accessible functions and data in the compilation class file and the meaning of the byte code.
Jar: a versatile archive and compression tool. It is a Java application that combines multiple files into a single jar archive file.
Htmlconverter -- command Conversion Tool.
Native2ascii -- convert a file that contains non-Unicode or latinl characters to a unicode encoded character.
Serialver -- Return serialveruid. Syntax: The serialver [show] Command Option show is used to display a simple interface. Enter the complete Class Name and press ENTER or "show" to display the serialveruid.
Additional details:
Javac.exe
Usage: javac <option> <Source File>
Possible options include:
-G generates all debugging information
-G: None generates no debugging information
-G: {lines, vars, source} Only some debugging information is generated.
-O-optimized; may impede debugging or increase class files
-Nowarn generation without warning
-Verbose outputs information about what the compiler is doing
-Deprecation: the output uses the source code location of the APIs that are not encouraged.
-Classpath <path> specifies the location of user class files
-Sourcepath <path> specifies the location of the input source file.
-Bootclasspath <path> overwrites the location of the self-initiated class file
-Extdirs <directory (multiple directories)> overwrites the installed extension class location
-D <directory> specifies the location of the output class file
-Encoding <encoding> specifies the character set encoding used in the source file.
-Target <version> generates class files of the specified virtual machine version.
-Help print a synopsis of standard options
Appletviewer.exe
Usage: appletviewer <Options> URL
<Options> include:
-Debug starts the applet viewer in the Java debugger.
-Encoding <encoding> specifies the character encoding used by the HTML file.
-J <runtime flag>: Passing parameters to the Java interpreter
-The J option is not a standard option. If there is any change, no further notice will be given.
================================
Jar.exe
Usage: jar {ctxu} [vfm0m] [Jar-file] [manifest-file] [-C Directory] File Name...
Option:
-C. Create a new archive
-T list the archived content
-X expand the named (or all) files in the archive
-U: update an existing archive
-V generates detailed output to the standard output
-F specifies the archive file name
-M contains the marker information from the specified file.
-0 storage only; zip compression format not used
-M does not generate a manifest file for all items
-I generates index information for the specified JAR File
-C changes to the specified directory and contains the following files:
If a file name is a directory, it is recursively processed.
Both the configuration (manifest) file name and the archive file name must be specified, in the same order specified by the 'M' and 'F' signs.
Example 1: Archive two class files to an archive file named 'classes. jar:
Jar CVF classes. Jar Foo. Class bar. Class
Example 2: use an existing manifest file 'mymanifest'
Archive the file to an archive file named 'classes. jar:
Jar cvfm classes. Jar mymanifest-C Foo /.
Javadoc.exe
Usage: javadoc [Options] [packagenames] [sourcefiles] [classnames] [@ files]
-Overview <File> Read the overview document in HTML Format
-Public: Only public classes and members are displayed.
-Protected: displays the protected/public class and members (default)
-Package: displays package/protected/public class and members.
-Private: displays all classes and members.
-Help: Display command line options
-Doclet <class> Generate Output Using candidate doclet
-Docletpath <path> specifies the location for searching doclet files.
-Sourcepath <pathlist> specifies the location where the source file is located.
-Classpath <pathlist> specifies the location for searching user class files.
-Exclude <pkglist> specify a list of packages to exclude
-Subpackages <subpkglist> specify subpackages to recursively Load
-Breakiterator compute 1st sentence with breakiterator
-Bootclasspath <pathlist> overwrites the position of the class file loaded by the UDF.
-Source <release> Provide source compatibility with specified release
-Extdirs <dirlist> overwrites the location of the installed Extension
-Verbose output information about javadoc's work
-Locale used by locale <Name>, such as en_us or en_us_win
-Encoding <Name> source file encoding name
-J <flag> directly transmits <flag> to the runtime system
Provided by the standard doclet:
-D <directory> target directory of the output file
-Use create class and package usage page
-Version contains @ version segments
-Author contains @ author segments
-Docfilessubdirs recursively copy doc-file subdirectories
-Splitindex divides the index into one file corresponding to each letter.
-Windowtitle <text> the browser window title of the document
-Doctitle <HTML-code> contains the title of the package index page (home page ).
-Header <HTML-code> contains the header text of each page
-Footer <HTML-code> contains the footer text of each page.
-Bottom <HTML-code> contains the bottom text of each page.
-Link <URL> Create links to javadoc output at <URL>
-Linkoffline <URL> <url2> link to docs at <URL> using package list at <url2>
-Excludedocfilessubdir <name1>: .. exclude any doc-files subdirectories with given name.
-Group <Name> <P1 >:< P2> .. group specified packages together in overview page
-Nocomment supress description and tags, generate only declarations.
-Nodeprecated does not contain @ deprecated information.
-Noqualifier <name1 >:< name2>:... exclude the list of qualifiers from the output.
-Nosince do not include @ since information
-Nodeprecatedlist
-Notree does not generate class Layers
-No index is generated.
-Nohelp does not generate a help link
-Nonavbar does not generate a navigation bar
-Quiet do not display status messages to screen
-Serialwarn generate warning about @ serial tag
-Tag <name >:< locations >:< header> specify single argument custom tags
-Taglet the fully qualified name of taglet to register
-Tagletpath the path to taglets
-Charset <charset> charset for cross-platform viewing of generated documentation.
-Helpfile <File> contains the help link function to the target file.
-Linksource generate source in HTML
-Stylesheetfile <path>: The file that changes the style of the generated document.
-Docencoding <Name> name of the output code
Javah.exe
Usage: javah [Options] <classes>
[Options] include:
-Help: print the help information.
-Classpath <path> class loading path
-Bootclasspath <path> indicates the auto-initiated class loading path.
-D <dir> output directory
-O <File> output file (only-D or-O can be used)
-JNI: JNI-style header file (default)
-Old: generate a jdk1.0-style header file
-Stubs: generate a stubs File
-Version: prints version information.
-Verbose outputs information about the work performed by this command.
-Force always writes output files
The full name (for example, java. Lang. Object) must be used when <classes> is specified ).
Javaw.exe
================================
Htmlconverter.exe
Usage: htmlconverter [-option1 value1 [-option2 value2 [...] [-simulate] [filespecs]
The options include:
-Source: Obtain the path of the source file. Default Value: <userdir>
-Dest: Path of the converted file to be written. Default Value: <userdir>
-Backup: The Path to the backup file. Default Value: <dirname> _ Bak
-F: forcibly overwrite the backup file.
-Subdirs: process files in sub-directories.
-Template: the path of the template file. If you are not sure, use the default value.
-Log: the log writing path. If no log is provided, no logs are written.
-Progress: shows the progress during conversion. Default Value: True
-Simulate: the conversion-specific information is displayed when no conversion is performed.
-Latest: use the latest JRE to support the mimetype release.
-Gui: displays the graphical user interface of the Conversion Program.
Filespecs: list of files separated by spaces. Default Value: "*. html *. htm" (quotation marks required)
Orbd.exe
Usage: orbd <option>
The <option> options include:
-Port: enables the active port of orbd. The default value is 1049 (optional)
-Defaultdb orbd file directory. The default value is "./ORB. DB" (optional)
-Serverid orbd: the server identifier. The default value is 1 (optional)
-Orbinitialport: initial port (required)
-Orbinitialhost initial host name (required)
================================
Policytool.exe
Usage: policytool [Option]
[-File <File>] Location of the Rule File
================================
Rmic.exe
Usage: rmic <option> <Class Name>
The <option> options include:
-Keep does not delete the source files generated in the middle.
-Keepgenerated (same as "-keep ")
-V1.1 creates stubs/skeleton for 1.1 stub Protocol version
-Vcompat (default) Creation and 1.1 and
1.2 stub Protocol version compatible stubs/skeleton
-V1.2 only creates stubs for 1.2 stub Protocol version
-IIOP creates a stubs for IIOP. When this option is used, <option> should also include:
-Always always create stubs (even when they appear at the same time 〕
-Alwaysgenerate (same as "-always ")
-Nolocalstubs is not created as a stubs optimized by the same process.
-IDL: Create an IDL. When this option is used, <option> should also include:
-Novaluemethods: a method that does not generate a Value Type
-Always always create IDL (even when they appear simultaneously 〕
-Alwaysgenerate (same as "-always ")
-G General debugging information
-Depend: recursively recompile expired files
-Nowarn: no warning
-Nowrite does not write compiled classes to the file system.
-Verbose outputs information about the compiler's work.
-Classpath <path> specifies the search location of the Input Source and class files.
-Sourcepath <path> specifies the location for searching user source files
-Bootclasspath <path> overwrites the location of the self-initiated class file.
-Extdirs <path> overwrites the location where the extension class is installed.
-D <directory> specifies the location of the generated class file
-J <runtime flag>: Pass the parameter to the Java interpreter.
================================
Rmid.exe
Usage: rmid <option>
<Option> includes:
-Port <option> specifies the port used by the rmid
-Log <directory> specifies the directory where rmid writes logs.
-Stop: stop the current rmid call (for the specified port)
-C <runtime tag> transmits parameters to each sub-process (activation Group)
-J <runtime flag>: Passing parameters to the Java interpreter
================================
Rmiregistry.exe
Usage: rmiregistry <option> <port>
The <option> options include:
-J <runtime flag>: Pass the parameter to the Java interpreter.
================================
Serialver.exe
Usage: serialver [-classpath] [-show] [classname...]
================================
Servertool.exe
Welcome to the Java IDL server Tool
Enter the command at the prompt
Servertool> help
Available commands:
-------------------
Register-register an active server
Unregister-cancel Server Registration
Getserverid-server ID of the Application name returned
List-list all registered servers
Listappnames-list the name of the currently defined application
Listactive-list active servers
Locate-locate the registered server on a specific port type
Locateperorb-locate the port for the request proxy for a specific object on the registered server.
Orblist-Object Request proxy Program (ORB) name and its ing list
Shutdown-shut down a registered Server
Startup-start a registered Server
Help-get help
Quit-exit this tool
================================
Rmic
Function Description:
Rmic generates stub and skeleton for remote objects.
Syntax:
Rmic [Options] package-qualified-class-name (s)
Note:
The rmic compiler generates stub and skeleton for remote objects based on the compiled Java class (including remote object implementation) name (remote objects refer to objects that implement java. RMI. remote interfaces ). The class given in the rmic command must be a class successfully compiled by the javac command and fully qualified.
Command Options
-Classpath [path] specifies the path of the rmic used to query the class. If this option is set, it overwrites the default value or classpath environment variable. Directories are separated by colons.
-D [Directory] specifies the root directory of the class hierarchy. This option can be used to specify the target directories of stub and skeleton files.
-Depend: Enable the compiler to re-compile the class referenced from other classes. In general, it only recompiles the missing or expired classes referenced from the source code.
-G allows you to generate a debugging table. The debugging table contains information about the row number and local variables, that is, the information used by the Java debugging tool. By default, only the row number is generated.
-J is used with the-D option. It sends the option followed by the option (no space between-J and-d) to the Java interpreter.
-Keepgenerated retains the generated. Java source files for the stub and skeleton files and writes these source files to the same directory as the. class files. If you want to specify a directory, use the-D option.
-Nowarn: Close the warning. If this option is used, the compiler does not output any warning information.
-Show: displays the rmic compiler gui (graphical user interface ). Enter one or more qualified class names (separated by spaces), and press the Enter key or the "show" button to create stub and skeleton.
-Vcompat (default) creates stub and skeleton compatible with JDK 1.1 and 1.2 stub.
-Verbose enables the compiler and the linker to output information about the classes being compiled and the class files being loaded.
-V1.1 create stub and skeleton of JDK 1.1 stub.
-V1.2 only creates stub of JDK 1.2 stub Protocol version.
======================================
Rmid
Function Description:
Rmid starts the activation system daemon to register and activate objects on the Java Virtual Machine.
Syntax:
Rmid [-Port port] [-log dir]
Note:
Run the rmid tool to activate the system daemon. You must first start the activation system daemon to register an activated object with the activation system or activate an activated object on the Java Virtual Machine.
Command Options
-C <some command line options> specifies an option. When creating a sub-daemon (activation group) for each rmid, this option is passed to the sub-daemon as a command line parameter.
-Log [Directory] specifies the directory name to activate the system daemon to write its database and related information to the directory. By default, a log directory is created in the directory where the rmid command is executed.
-Port [port] specifies the port used by the Registration Service Program of rmid. The activation system daemon binds activationsystem with the name java. RMI. Activation. activationsystem in the registration service.
-Stop: Call the current rmid on the port specified by the stop-port option. If no port is specified, the rmid running on port 1098 is stopped.
==================================
Rmiregistry
Function Description:
The rmiregistry command can start the Remote Object Registration Service Program on the specified port of the current host.
Syntax:
Rmiregistry [port]
Note:
The rmiregistry command creates and starts the Remote Object Registration Service Program on the specified port of the current host. If port is omitted, the registration service starts on port 1099. The rmiregistry command does not generate any output and is generally run in the background. The Remote Object Registration Service Program is a UDF Naming Service. The RMI server on the host will use it to bind the remote object to the name. The client can query remote objects and call remote methods. Registering a service program is generally used to locate the first remote object that an application needs to call its method. This object, in turn, provides corresponding support for each application to find other objects. The Java. RMI. Registry. locateregistry class method can be used to obtain registration service program operations on a host, host, or port. Java. RMI. the URL-based method of the naming class will operate the registration service program, and can be used to query remote objects, simple (string) bind the name to a remote object, bind the new name to the remote object (overwrite the old binding), unbind the remote object, and list the URLs bound to the registered service program.
==================================
Serialver
Function Description:
The serialver command returns the serialversionuid.
Syntax:
Serialver [Command Options]
Note:
Serialver returns the serialversionuid of one or more classes in the form suitable for copying to the evolutionary class. When a parameter is not called, It outputs the usage line.
Command Options
-Show shows a simple user interface. Enter the complete Class Name and press the Enter key or the "show" button to display the serialversionuid.
======================================
Jarsigner
Function Description:
Generate a signature for the Java archive (jar) file and verify the signature of the signed JAR file.
Syntax:
Jarsigner [Command Options] jar-file alias
Jarsigner-verify [Command Option] jar-File
Note:
The jarsigner tool is used for two purposes:
1: sign the Java archive (jar) File
2: Verify the signature and integrity of signed JAR files
Command Options
-Keystore [url] specifies the URL of the key repository. The default value is the. keystore file in your home directory, which is determined by the system property "user. Home.
-Storetype [storetype] specifies the key repository type to be instantiated. The default key repository type is the type specified by the "keystore. Type" attribute value in the Security Attribute file, which is returned by the static method getdefaulttype in Java. Security. keystore.
-Storepass [Password] specifies the password required to access the key repository. This is only required when signing (not verifying) jar files. In this case, if the-storepass option is not provided in the command line, the user will be prompted to enter the password.
-Keypass [Password] specifies the password used to protect the private key of the key warehouse item (marked by the alias specified in the command line. This password is required when jarsigner is used to sign the JAR file. If the command line does not provide a password, and the required password is different from the key warehouse password, the user is prompted to enter it.
-Sigfile [file] specifies the basic file name used to generate. SF and. DSA files.
-Signedjar [file] specifies the name of the signed JAR file.
-Verify: If it appears in the command line, the specified JAR file will be verified instead of the signature. If the verification is successful, "jar verified" is displayed ". If you try to verify unsigned jar files or verify the jar files signed by unsupported algorithms (such as RSA used when the RSA provider is not installed), the following information is displayed: "jar is unsigned. (Signatures missing or not parsable )".
-If certs appears in the command line with the-verify and-verbose options, the output will include the certificate information of each signatory in the jar file.
-If verbose appears in the command line, it represents the "verbose" mode, which enables jarsigner to output additional information during the jar signature or verification process.
-Internalsf in the past, the. DSA (signature block) file generated when the JAR file is signed contains a complete encoded copy of The. SF file (signature file) generated at the same time. This method has been changed. To reduce the overall size of the output JAR file, by default,. DSA files no longer contain copies of. SF files. However, if-internalsf appears in the command line, the old practice will be adopted. This option is mainly useful during testing; it should not be used in fact because it will eliminate useful optimizations.
-Sectionsonly if it appears in the command line, the. SF file (signature file) generated when the JAR file is signed does not include the hash header containing the entire list file. It only contains information and hashes related to each separate source file in jar. This option is mainly useful during testing; it should not be used in fact because it will eliminate useful optimizations.
-J [javaoption] directly transmits the specified javaoption string to the Java interpreter. (Jarsigner is actually a "wrapper" of the interpreter "). This option should not contain any spaces. It helps adjust the execution environment or memory usage. To obtain a list of available interpreter options, type Java-H or Java-X in the command line.
======================================
Keytool
Function Description:
Manage a key warehouse (database) consisting of a private key and an X.509 Certificate Chain of the relevant public key ). You can also manage certificates from trusted entities.
Syntax:
Keytool [command]
Note:
Keytool is a key and certificate management tool. It enables users to manage their own public/private key pairs and related certificates for (digital signature) Self-authentication (users authenticate themselves to other users/services) or data integrity and authentication services. It also allows users to store the public keys of their communication peers (in the form of certificates ).
======================================
Native2ascii
Function Description:
Convert a file that contains both local and non-Unicode characters to a Unicode character.
Syntax:
Native2ascii [Options] [inputfile [outputfile]
Note:
The Java compiler and other Java tools can only process files containing Latin-1 and/or Unicode (udddd mark) characters. Native2ascii converts a file containing other character encoding into a file containing Latin-1 and/or Unicode encoding characters. If outputfile is omitted, the standard output device is used. In addition, if inputfile is also omitted, standard input is used for device input.
Command Options
-Reverse: convert a file containing Latin-1 and/or Unicode characters to a file containing local encoding characters.
-Encoding [encoding_name] specifies the encoding name used in the conversion process. The default encoding is obtained from the system property file. encoding.
======================================
Appletviewer
Function Description:
Java Applet browser. The appletviewer command can run the applet without the web browser environment.
Syntax:
Appletviewer [threads flag] [Command Option] URLs...
Note:
The appletviewer command connects to the document or resource to which the URL points, and displays each applet referenced by the document in its own window. Note: If the document to which the URL points does not reference any applet with the object, embed, or applet tag, appletviewer will not do anything.
Command Options
-Debug starts appletviewer in the Java debugger jdb so that you can debug the applet in the document.
-Encoding [encoding name] specifies the encoding name of the input HTML file.
-J [javaoption] transmits the javaoption string as a single parameter to the Java interpreter running appletviewer. The parameter cannot contain spaces. A string composed of multiple parameters. Each parameter must start with-J and be removed after the prefix. This will be useful when adjusting the compiler's execution environment or memory usage.
======================================
Extcheck
Function Description:
Extcheck checks the version conflict between the target JAR file and the extension JAR file of the current installation method.
Syntax:
Extcheck [-verbose] targetfile. Jar
Note:
The extcheck utility checks whether the title and version of the specified JAR file conflict with the extension installed in the jdk tm software. Before installing an extension, you can use this utility to check whether the extension has the same or higher version.
The extcheck utility sets targetfile. the specification-title and specification-version headers of the JAR file list compare with the corresponding headers of all jar files currently installed in the extension directory (the default extension directory is JRE/lib/EXT). The extcheck utility Compares version numbers in the same way as Java. Lang. Package. iscompatiblewith. If no conflict is detected, the returned code is 0. If the list of any JAR file in the extension directory has the same specification-title and the same or updated specification-version number, a non-zero error code is returned. If the list of targetfile. jar does not contain the specification-title or specification-version attribute, a non-zero error code is returned.
Command Options
-Verbose checks the jar files in the extended directory to list the files. In addition, the list attribute of the target JAR file and all conflicting jar files are reported.
==================================
Jar
Function Description:
Java archiving Tool
Syntax:
Jar [Command Option] [manifest] Destination input-file [input-files]
Note:
The jar tool is a Java application that combines multiple files into a single jar archive file. Jar is a versatile archive and compression Tool Based on Zip and zlib compression formats. However, the main purpose of jar design is to easily package a Java applet or application into a single archive file. Add the applet or application component (. when the class files, images, and sounds are merged into a single archive file, you can use a Java proxy (such as a browser) to download them during an HTTP transaction process, instead of requiring a new connection for each component. This greatly shortens the download time. Jar can also compress files, further improving the download speed. In addition, it allows the author of the applet to sign each item in the file and authenticate its source. The syntax of the jar tool is basically the same as that of the tar command.
Command Options
-C create a new archive or empty archive on the standard output.
-T list the content table on the standard output.
-X [file] extracts all files from the standard input, or only the specified files. If file is omitted, all files are extracted; otherwise, only the specified files are extracted.
-F the second parameter specifies the JAR file to be processed. In the case of-C (creation), the second parameter refers to the name of the JAR file to be created (not on the standard output ). In the case of-T (Table (or-X (extraction), the second parameter specifies the JAR file to be listed or extracted.
-V outputs a growth format on a standard error output device.
-M includes the configuration information in the specified existing inventory file. Example: "jar CMF mymanifestfile myjarfile *. Class"
-0 stores only, without zip compression.
-M does not create a project inventory file.
-U updates an existing JAR file by adding a file or changing the list. Example: "jar-UF Foo. jar Foo. class "to file Foo. add class to the existing JAR file Foo. jar, while "jar Umf manifest Foo. jar, use the information in manifest to update Foo. jar list.
-C: Change the directory during jar command execution. For example, "jar-UF Foo. jar-C Classes *" adds all files in the classes directory to foo. jar, but does not add the class directory itself.
Program example
1: package all the class files in the current directory into new jar files:
Jar cf file. jar *. Class
2: display the file list in a jar file
Jar TF file. Jar
3: add all files in the current directory to an existing JAR file.
Jar CVF file. jar *
======================================
Javadoc
Function Description
The Java API document builder generates an API document HTML page from the Java source file.
Syntax:
Javadoc [Command Options] [package name] [source file name] [@ files]
The [package name] is the name of a series of packages separated by spaces. The package name cannot use wildcards, such (*). [Source file name] is separated by Space
Reprinted: http://www.cnblogs.com/gengyulong/archive/2011/08/04/2127309.html