JDK common command details

xiaoxiao2021-03-31  209

JDK command details (1) Function Description: RMIC generates stub and skeleton for remote objects. Syntax: RMIC [options] package-qualified-class-name (s) Supplementary description: The RMIC compiler generates stub and skeleton for remote objects based on compiled Java classes (with remote object implementation), to remote objects (remote object refers to implementing Java .rmi.Remote interface object). The class given in the RMIC command must be a class that successfully compiles and is a full package with a javac command. Command Options - ClassPath [Path] Specifies the path to the query class. If this option is set, it will override the default or ClassPath environment variable. Directory is separated by colon. -d [directory] Specify the root directory of the class level. This option can be used to specify the target directory of the Stub and the SKELETON file. -depend makes the compiler consider recompiling classes from other class references. In general, it only recomesces the omissions or expired classes from the source code reference. -g allows to generate a commissioned form. The debug table contains information about the line number and local variable, that is, the information used by the Java debug tool. By default, only the line number is generated. -J and -D option are in connection with the options (-J and -D spaceless) to the Java interpreter. -kepGenerated preserves the generated .java source files for Stub and Skeleton files, and write these source files to the same directory as the .class file, use the -d option if you want to specify the directory. -NoWarn close warning. If this option is used, the compiler does not output any warning information. -show displays the GUI of the RMIC compiler (graphical user interface). Enter one or more package qualified class names (separated by space) and press Enter or "Display" button to create stub and skeleton. -vcompat Create stub and skeleton compatible with JDK 1.1 and 1.2 Stub protocol. -verbose makes the compiler and linker about which classes are being compiled and information on which class files are being loaded. -v1.1 Create a JDK 1.1 Stub Protocol version of Stub and Skeleton. -v1.2 Create only the JDK 1.2 Stub Protocol version of the STUB. RMID Function Description: RMID launches the activation system daemon to be able to register and activate the object on the Java virtual machine. Syntax: RMID [-port port] [-log Dir] Supplementary Description: RMID Tool Starts the activation system daemon. The activation system daemon must be initiated first, in order to register an object that can be activated or activated on the Java virtual machine can be activated or activated on the Java virtual machine. Command Options -C

Specify an option to pass the sub-daemon (activation group) of each RMID, this option is passed to the subview process in the form of a command line parameter. -log [directory] Specify the name of the directory, the activation system daemon writes its database and related information in this directory. In the default, a log directory will be created in the directory of the RMID command. -Port [Port] Specifies the port used by the RMID's registration service program. The activation system daemon is bundled with the name java.rmi.activation.activationsystem in the registered service program. -stop stops the current RMID call on the port specified in the PPORT option. If the port is not specified, the RMID running on port 1098 will stop. RMIREGISTRY Function Description: The RMIREGISTRY command launches a remote object registration service on the specified port of the current host. Syntax: RMIREGISTRY [Port] Supplementary Description: The RMIREGISTRY command creates and launches the Remote Object Registration Server on the specified port of the current host. If Port is omitted, the registration service program will start on the 1099 port. The RMIREGISTRY command does not generate any output and is usually run in the background. The Remote Object Registration Server is a bootstaken naming service. The RMI server on the host will use it to bind the remote object to the name. The client can query the remote object and make a remote method call. The registration service program is generally used to locate the application to call the first remote object of its method. This object reverses to provide corresponding support for each application for finding other objects. The method for java.rmi.registry.locateREGISTRY class can be used to get registration service program operations on a host or host and port. The URL-based method of the java.rmi.naming class will operate the registration service program and can be used to query the remote object, and will be bind to the remote object, rebound to the remote object (overwritten) Old binding), cancel the binding of the remote object and list the URL bound to the registered service. SerialVer function Description: The serialver command returns SerialVersionuid. Syntax: Serialver [Command Options] Supplementary Description: Serialver returns one or more class SerialVersionuids in the form that is adapted to the evolution class. It does not have a parameter call, it outputs the use method. Command Options - SHOW Displays a simple user interface. Enter the full class name and press the Enter key or "Show" button to display the SerialVersionuid. Jarsigner Function Description: Signature for the Java Archive (JAR) file and verifies the signature of the signed JAR file. Syntax: jarsigner [Command Options] JAR-FILE ALIAS JARSIGNER -VERIFY [Command Options] JAR-File Supplementary Description: Jarsigner Tool For two purposes: 1: For Java Archive (JAR) file sign 2: Check the signed JAR Signing and Integrity Command Options - KeyStore [URL] specifies the URL of the key warehouse. The default is the .KeyStore file in the host directory of the user, it is determined by the system properties "user.home". -storeType [StoreType] Specifies the type of key warehouse to be instantiated. The default key repository type is the type specified in the "KeyStore.Type" attribute value in the secure properties file, and returned by the static method getDefaultType in java.security.keystore. -StorePass [Password] Specifies the password required to access the key warehouse. This is only required when signing (not check) JAR files.

In this case, if the -storepass option is provided in the command line, the user will be prompted to enter the password. -KeyPass [Password] specifies the password of the private key used to protect the key warehouse item (the alias) specified in the command line). This password is required when using Jarsigner signature for the JAR file. If the password is not provided in the command line, and the required password is different from the password of the key repository, the user will be 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 JAR file used to signed. -verify If it appears in the command line, the specified JAR file will be verified instead of signature. If the calibration is successful, "jar verified" will be displayed. If you try to verify the unsigned JAR file or check the JAR file that is not supported algorithm (for example, the RSA used when installing the RSA provider), there will be as follows: "JAR is unsigned. (Signatures Missing OR) NOT PARSABLE "". -certs If it appears together with the -verify and the -verbose option, the output will include each signature person of the JAR file. -verbose If it appears in the command line, represent the "Verbose" mode, which outputs additional information in JARSIGNER in JAR signature or verification. -Internalsf passed that the JAR file was signed when the .dsa (signature block) file included a full encoded copy of the simultaneous generated .SF file (signature file). This approach has been changed. In order to reduce the entire size of the output JAR file, the.dsa file no longer contains a copy of the .sf file. But if the -Internalsf appears in the command line, an old approach will be used. This option is used primarily in testing; it is actually not used because it will eliminate useful optimization. -SectionsSonly If it appears in the command line, the .sf file (signature file) generated when the JAR file is signed, will not include the head that contains the hash of the entire list file. It only contains information and hashes associated with each individual source file in JAR. This option is used primarily in testing; it is actually not used because it will eliminate useful optimization. -J [javaoption] passes 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 to adjust the execution environment or memory usage. To get the list of available interpreter options, you can type Java on the command line -H or Java -X. JDK command Details (2) KeyTool Function Description: Manage the key warehouse (database) composed of the X.509 certificate chain of the private key and authentication related public key. Also manages certificates from the trusted entity Syntax: KeyTool [Command] Supplementary Description: KeyTool is a key and certificate management tool. It enables users to manage their own public key / private key pairs and related certificates, used to self-certification (users from other User / Service Authentication Irself) or Data Integrity and Authentication Service. It also allows users to store their communication peers public key (in the form of certificate). Native2ASCII function Description: Will contain local coding characters (neither Latin1 is not unicode The character) file is converted to the Unicode encoded character file.

Syntax: Native2ASCII [Options] [InputFile "] Supplementary Description: Java Compiler and Other Java Tools can only process files with Latin-1 and / or Unicode encoding (UDDDD marks) characters. Native2ASCII converts files with other characters encoded into files containing Latin-1 and / or Unicode encoded characters. If OUTPUTFILE is omitted, the standard output device is used. Also, if INPUTFILE is also omitted, you will enter with a standard input device. Command Options -Reverse performs the opposite operation: convert files containing Latin-1 and / or Unicode encoded characters into files containing local coded characters. -encoding [encoding_name] Specifies the encoded name used by the conversion process. The default encoding is obtained from the system properties file.encoding. AppletViewer Function Description: Java Applet browser. The AppletViewer command runs the applet in the absence of the World Wide Web browser environment. Syntax: AppletViewer [Threads Flag] [Command Options] URLS ... Supplementary Description: AppletViewer Command Connects to the document or resource pointed to by the URL, and displays each applet referenced in its own window. Note: If the document pointed to by the URL does not quote any applet with Object, an Embed or Applet tag, AppletViewer does not do anything. Command Options -debug launches AppletViewer in the Java Debugger JDB so you can debug the applet in the document. -Encoding [Code Name] Specifies the encoding name of the input HTML file. -J [javaoption] transmits a JavaOption string as a single parameter to the Java interpreter running AppletViewer. The parameters cannot contain spaces. A string consisting of multiple parameters, each of which must be started with a prefix -j, which will be removed later. This will be useful when adjusting the execution environment or memory usage of the compiler. Extcheck Function Description: Extcheck Detects the Target JAR file with the current installation method to extend version conflicts between JAR files. Syntax: Extcheck [-verbose] targetfile.jar Supplementary Description: ExtCheck Utility Checks Specifies whether the title of JAR file is conflicted with the extension installed in the JDK TM software. Before installing an extension, you can use this utility to see if the extension is installed or higher. The ExtCheck utility compares the Specification-Title and Specification-Version headers of the targetfile.jar file list compared to the corresponding head of all JAR files currently installed in the extended directory (the default extension directory is JRE / lib / ext). The way the EXTCHECK utility comparison version number is the same as the java.lang.Package.isCompATIBLEWith method. Returns the code is 0 if the conflict is not detected. Returns non-zero error codes if the list of JAR files in the extended directory has the same specification-title and the same or updated Spectial-Version number. If there is no Specification-Title or Specification-Version property in the list of TargetFile.jar, the non-zero error code is also returned. Command Options -verbose checks the file when checking the JAR file in the extended directory. In addition, the list of list properties of the target JAR file and all conflicts of JAR files are also reported.

JAR Function Description: Java Archive Tool Syntax: JAR [Command Options] [Manifest] Destination Input-file [Input-Files] Supplementary Description: JAR Tool is a Java application that combines multiple files into a single JAR archive file. JAR is a multi-purpose archive and compression tool, which is based on ZIP and ZLIB compression format. However, the main purpose of design JAR is to facilitate packaging Java Applets or applications into a single archive. When combining the applet or application component (.class file, image, and sound) into a single archive file, you can download them with a Java agent (such as a browser) during a HTTP transaction process, not for each component. They all ask a new connection. This greatly shortens the download time. JAR can also compress files to further improve download speed. In addition, it allows the author of the applet to sign each item in the file, so it can be authenticated. The syntax of the JAR tool is basically the same as the syntax of the tar command. Command Options -c Create a new archive or air archive on the standard output. -t lists the contents on the standard output. -x [file] extracts all files from standard input, or only extracts the specified file. If the file is omitted, all files are extracted; otherwise only the specified file is extracted. -f second parameter Specifies the JAR file to be processed. In the -c (created) situation, the second parameter refers to the name of the JAR file to be created (not on standard output). In -T (table (or -x (extraction), the second parameter specifies the JAR file to list or extract. -V generate the output result of the long format on the standard error output device. -M includes Inventory information in the existing manifest file specified. Usage: "JAR CMF mymanifestfile myjarfile * .class" -0 is stored only, does not perform ZIP compression. -M does not create a list of items. -U By adding a file or change list To update an existing JAR file. For example: "jar -uf foo.jar foo.class" Add file foo.class into the existing JAR file foo.jar, and "Jar Umf Manifest Foo.jar" uses Manifest Information update foo.jar's list. -C Change the directory during executive JAR commands. For example: "jar -uf foo.jar -c classes *" adds all files in the classes directory to foo.jar, but not Add a class directory itself. Program example 1: Pack all the Class files in the current directory into a new JAR file: jar cf file.jar * .class 2: Show a list of files in a jar file JAR TF file.jar 3: Will All files in the directory are added to a JAR CVF file.jar * Javadoc feature in the existing JAR file, generate an API document HTML page from the Java source file. Syntax: javadoc [Command Options] [Put Name] [ Source file name] [@files] where [Package name] is separated by spaces, the package name is not allowed to use wildcard, such as (*). [Source File Name] is a series of sources separated by spaces. File name, source file name can include path and wildcards, such as (*). [@Files] is one or more files containing package names and source files in any order. Supplementary Description Javadoc parses the declaration and document comments in Java source files And generate the corresponding HTML page defaults), describe public classes, protection classes, internal classes, interfaces, constructors, methods, and domains. When implementation, Javadoc requires and relies on the Java compiler to complete their work. Javadoc call part Javac Compile the declaration section, ignore members' implementation.

It builds a rich internal representation of the class, including class level and "use" relationship, then generate HTML. Javadoc also obtains the documentation provided by the user from the document comment from the source code. When Javadoc is established its internal document structure, it will load all references. Due to this, Javadoc must find all the references, including boot classes, extensions, and user classes. Command Options -overview I> Path / filename Specifies that Javadoc should get an overview document from the "source" file specified by Path / FileName and put it in Overview-Summary.html. Where Path / FileName is a relative path name relative to-SourcePath. -public only shows public classes and members. -Protected only shows protected and public classes and members. This is the default. -package only shows package, protected and public classes and members. -priVate displays all classes and members. -Help Shows Online Help, which will list these Javadoc and Doclet command line options. -Doclet class Specifies the class file that starts to generate a document. This doclet defines the contents and formats of the output. If the -Doclet option is not used, Javadoc generates the default HTML format using the standard DOCLET. This class must contain a START (root) method. The path to the startup class is defined by the -Docletpath option. -DocletPath ClassPathList Specifies the path to the Doclet class file, which is specified by the -Doclet option. If the Doclet is already in the search path, it is not necessary to use this option. -1.1 Generates documents with the appearance and function of documents generated by Javadoc 1.1. That is, the background of the page is gray, use the image to do header, using the Bullet list instead of the table, has a single-layer destination directory structure, does not include inherited API, does not make the *** TML framework, and the internal class is not supported. This option also automatically divides the index into one file per letter. If you want this look, this option is more than JavaDoc 1.1 is equivalent to fixing some errors. -SourcePath SourcePathList When the package name is passed to the javadoc command, the search path of the positioning source file (.java) is specified. Note that only the SourcePath option can only be used when specifying the package with the javadoc command - it will not look for .java files passing into the javadoc command. If all-SourcePath is omitted, Javadoc uses the class path to find the source file. -classpath classpathlist Specifies that Javadoc will find the path to the reference class - the reference class is any class that is the class with the document plus any class they reference. Javadoc will search all the subdirectory of the specified path. ClassPathList can include multiple paths, separated from each other with comma. -BootClassPath ClassPathList Specifies the path where you have a class. They are named Java platform classes. This bootclasspath is part of Javadoc to find the search path of the source file and class file. Use the colon (:) to separate the directory in ClassPathList. -extdirs dirlist Specifies the directory where the extension class is located. They are any classes that use the Java extension mechanism. This EXTDIRS is part of Javadoc to find some source files and some search paths in the file. Use the colon (:) to separate the directory in Dirlist. -verbose provides more detailed information at Javadoc runtime. When using the Verbose option, the load source file is displayed, generates a document (one information of each source file) and sorting. The Verbose option causes additional information to specify the number of milliseconds that parse each Java source file.

-locale language_country_variant Specifies the environment that Javadoc uses when generating documents. -Encoding Name Specifies the source file encoding name, such as Eucjis / SJIS. If this option is not specified, the platform default converter is used. -J [flag] transmits Flag directly to runtime system Java running Javadoc. Note that there is no space between J and FLAG. The option -D directory specifies the destination directory of Javadoc to save the generated HTML of JavaDoc to specify the DICLET. I omit this option will result in saving the file to the current directory. The Directory can be an absolute path or relative path relative to the current working directory. -USE includes a "Usage" page for each with document class and packet. This page describes any API packages, classes, methods, constructor, and domains using any APIs for a given class or package. For a given class C, anything using class C will include a subclass of C, a domain that is declared as C, a method of returning C, and a method and constructor having a C-type parameter. -Version includes @version text in the generated document. This text will be omitted by default. -author includes @Author text in the generated document. -splitIndex divides the index file to multiple files, one file per letter, plus a file containing all index items starting with non-alphabatic characters. -windowtitle [Title] Specifies the title in the HTML tag. It will appear in the window title bar and in any browser bookmark (favorite location) created for this page. The title should not contain any HTML tags because the browser will not explain them correctly. Any internal quotes in Title must escape. If -WindowTitle is omitted, Javadoc uses the value of the -DOCTITLE.

-DOCTITE [TITLE] Specifies placement to be placed close to the top of the overview. The title will be placed directly under the navigation bar as a primary title. Title can contain HTML tags and spaces, but if so, it must be enclosed with quotation marks. Any internal quotes in Title must escape.

-title [Title] This option no longer exists. It only exists in the Beta version of Javadoc 1.2. It has been renamed to -DOCTITLE. Rename this option is to more clearly indicate that it defines document titles instead of window titles.

-Header [header] Specifies the header text placed at the top of each output file. This eyebel will place the right side of the upper navigation bar. Header can include HTML tags and spaces, but if so, it must be enclosed with quotation marks. Any internal quotation marks in Head must escape.

-footer [Footer] Specifies the footnote text placed at the bottom of each output file. The script will be placed on the right side of the lower navigation bar. Footer can contain HTML tags and spaces, but if so, you must enclose it with quotation marks. Any internal quotation marks in Footer must escape.

-Bottom [text] Specifies the text placed at the bottom of each output file. This text will be placed on the page, located below the lower navigation bar. The text can contain HTML tags and spaces, but if so, it must be enclosed with quotation marks. Any internal quotation marks in Text must escape.

-link [docurl] Create a link to the document that is used to generate an externally reference class that has been generated with Javadoc. The parameter docurl is the URL of the Javadoc-generated external document you want to link to. This position can be opposing or absolute URL.

-linkoffline [docurl] [packagelisturl] This option creates a link to the document to the external reference class name.

-group [groupheading] PackagePattern: packagepattern: ... Pack the package on the outline page into the specified group, each set of tables. Specify each group with different -Group options. Each group appears on the page in the order specified in the command line. The packets in the group were sorted by alphabet. For a given-GROUP option, the package that matches the packagepattern expression list is now in the topic of GroupHeading. -NodePRecated prevents any discomfort in the document from being generated. It performs what-NodePRecatedList, and it does not generate any disci-use API in the rest of the document. This is very useful when writing code does not want to be distracted by the code division that does not encourage it.

-NodePRecatedList prevents the API list (deprecated-list.html) that does not encourage use in the generated file and prevents the link to contain this page in the navigation bar. (However, Javadoc continues to generate an unscrewable API in the rest of the document.) If the source code does not contain an API that does not encourage, and it is very useful if you want the navigation bar cleaner, it is very useful.

-Notree ignores the class / interface level in the generated document. By default, this level will be generated.

-NoIndex ignores the index in the generated document. Default will be generated by default.

-nohelp ignores the Help link in the top of each page of the output and the navigation bar on the bottom.

-nonavbar prevents the navigation bar, header and footnotes, otherwise they will appear at the top and bottom of the generated page. It has no effect on the "bottom" option. When only content is interested in content and without navigating, such, for example, only files are converted to PostScript or PDF for printing, the -nonavbar option is very useful.

-Helpfile [Path / filename] Specifies the path to the alternative help file link to the "Help" link in the top and bottom navigation bar. Path / filename. When this option does not use this option, Javadoc automatically creates a help file Help-doc.html, which is hardly encoded in Javadoc. This option allows you to override this default. Where filename can be any name, not limited to help-doc.html - Javadoc will adjust the link in the navigation bar accordingly.

-stylesheetfile [path / filename] Specifies the path to replacing the HTML style form file. When this option is not used, Javadoc will automatically create style form file stylesheet.css, which is hardly encoded in Javadoc. This option allows you to override this default. Where filename can be any name and is not limited to stylesheet.css.

-docencoding [name] Specifies the encoding method of outputting an HTML file.

Javah

Function Description:

C header file and stub file generator. Javah generates a C header file and C source file from the Java class. These files provide connection gluing, allowing Java and C code to interact.

grammar:

JAVAH [Command Options] full-qualified-classname..

Javah_g [Command Options] full-qualified-classname..

Supplementary description:

Javah generates the C header files and source files that implement the local method. The C program uses the generated header file and the source file to reference the instance variable of an object in the local source code. .h file contains a struct definition that is parallel to the layout of the corresponding class. The domain in this structure corresponds to the instance variable in the class.

The header file name and the structural name declared in the header are from the class name. If the class passed to Javah is in a packet, the header file name and the structure are now crowned with the package. Underline (_) is used as name separator.

By default, Javah creates a header file for the classes listed in the command line and puts the file in the current directory. Create a source file with the -stubs option. Use the -o option to pick all the result strings of the listed classes into a single file. By default, Javah creates a header file for the classes listed in the command line and puts the file in the current directory. Create a source file with the -stubs option. Use the -o option to pick all the result strings of the listed classes into a single file.

Command option

-o [Output File] Targe all the header files or source files listed in the command line to the output file. -o or -d two options can only be selected.

-d [directory] Sets the Javah save the header file or the STUB file directory. -d or -o two options can only be selected.

-stubs causes Javah to generate C declarations from the Java object file.

-verbose specifies the long format output and causes Javah to output information about the status of the file to the standard output device.

-HELP outputs help information for Javah usage.

-Version outputs the version information of Javah.

-jni makes Javah create an output file that contains the original graphics of the local method of JNI style. This is the default output, so the use of -jni is optional.

-CLASSPATH [Path] Specifies the path to Que the class. If this option is set, it will override the default or ClassPath environment variable. Directory is separated by colon.

-bootclasspath [Path] Specifies the path to load from the class. By default, self-promotion is a class that implements the core Java platform, located in Jrelib

T. Jar and jrelibi18n.jar.

-OLD specifies that the old JDK1.0-style header file should be generated.

-force Specifies to write output files.

JavaP

Function Description:

Java class file parser.

grammar:

JavaP [Command Options] Class..

Supplementary description:

The javap command is used to resolve class files. Its output depends on the options used. If no option is used, Java will pass the PUBLIC domain and method that passes the class to its class. Javap outputs it to the standard output device.

Command option

-HELP outputs the help information of JAVAP.

-L output row and local variable table.

-b ensures backward compatibility with JDK 1.1 Java.

-public only shows public classes and members.

-Protected only shows Protected and Public classes and members.

-Package only shows package, protected and public classes and members. This is the default setting.

-priVate displays all classes and members.

-J [Flag] directly passes Flag to the runtime system.

-s output internal type signature.

-c Output The unsolved code of each method in the class, that is, the command constitutes the Java bytecode.

-verbose output stack size, Locals and ARGS of each method.

-CLASSPATH [Path] Specifies the path to find the class to find the class. If this option is set, it will overwrite the default value or the ClassPath environment variable. Directory is separated by colon.

- BootClassPath [Path] Specifies the path to load from the class. By default, self-promotion is a class that implements the core Java platform, located in Jrelib

T. Jar and jrelibi18n.jar.

-extdirs [DIRS] overwrites the location of the search installation. The extended default location is Jrelibext.

转载请注明原文地址:https://www.9cbs.com/read-130919.html

New Post(0)