JDK command details (1)

Source: Internet
Author: User
JDK command details (1) -- Linux general technology-Linux programming and kernel information. The following is a detailed description. 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] [-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 <某些命令行选项> Specify 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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.