diff --git a/src/java.base/share/man/java.1 b/src/java.base/share/man/java.1 index d0268e474ffa2..27c2d4bad4a52 100644 --- a/src/java.base/share/man/java.1 +++ b/src/java.base/share/man/java.1 @@ -19,68 +19,77 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\"t -.\" Automatically generated by Pandoc 2.3.1 +'\" t +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JAVA" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JAVA" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -java \- launch a Java application +java - launch a Java application .SH SYNOPSIS .PP To launch a class file: .PP -\f[CB]java\f[R] [\f[I]options\f[R]] \f[I]mainclass\f[R] [\f[I]args\f[R] ...] +\f[V]java\f[R] [\f[I]options\f[R]] \f[I]mainclass\f[R] [\f[I]args\f[R] +\&...] .PP To launch the main class in a JAR file: .PP -\f[CB]java\f[R] [\f[I]options\f[R]] \f[CB]\-jar\f[R] \f[I]jarfile\f[R] +\f[V]java\f[R] [\f[I]options\f[R]] \f[V]-jar\f[R] \f[I]jarfile\f[R] [\f[I]args\f[R] ...] .PP To launch the main class in a module: .PP -\f[CB]java\f[R] [\f[I]options\f[R]] \f[CB]\-m\f[R] -\f[I]module\f[R][\f[CB]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...] +\f[V]java\f[R] [\f[I]options\f[R]] \f[V]-m\f[R] +\f[I]module\f[R][\f[V]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...] .PP or .PP -\f[CB]java\f[R] [\f[I]options\f[R]] \f[CB]\-\-module\f[R] -\f[I]module\f[R][\f[CB]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...] +\f[V]java\f[R] [\f[I]options\f[R]] \f[V]--module\f[R] +\f[I]module\f[R][\f[V]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...] .PP -To launch a single source\-file program: +To launch a single source-file program: .PP -\f[CB]java\f[R] [\f[I]options\f[R]] \f[I]source\-file\f[R] [\f[I]args\f[R] +\f[V]java\f[R] [\f[I]options\f[R]] \f[I]source-file\f[R] [\f[I]args\f[R] \&...] .TP -.B \f[I]options\f[R] -Optional: Specifies command\-line options separated by spaces. +\f[I]options\f[R] +Optional: Specifies command-line options separated by spaces. See \f[B]Overview of Java Options\f[R] for a description of available options. -.RS -.RE .TP -.B \f[I]mainclass\f[R] +\f[I]mainclass\f[R] Specifies the name of the class to be launched. -Command\-line entries following \f[CB]classname\f[R] are the arguments for +Command-line entries following \f[V]classname\f[R] are the arguments for the main method. -.RS -.RE .TP -.B \f[CB]\-jar\f[R] \f[I]jarfile\f[R] +\f[V]-jar\f[R] \f[I]jarfile\f[R] Executes a program encapsulated in a JAR file. The \f[I]jarfile\f[R] argument is the name of a JAR file with a manifest -that contains a line in the form \f[CB]Main\-Class:\f[R]\f[I]classname\f[R] -that defines the class with the -\f[CB]public\ static\ void\ main(String[]\ args)\f[R] method that serves -as your application\[aq]s starting point. -When you use \f[CB]\-jar\f[R], the specified JAR file is the source of all +that contains a line in the form +\f[V]Main-Class:\f[R]\f[I]classname\f[R] that defines the class with the +\f[V]public static void main(String[] args)\f[R] method that serves as +your application\[aq]s starting point. +When you use \f[V]-jar\f[R], the specified JAR file is the source of all user classes, and other class path settings are ignored. If you\[aq]re using JAR files, then see \f[B]jar\f[R]. -.RS -.RE .TP -.B \f[CB]\-m\f[R] or \f[CB]\-\-module\f[R] \f[I]module\f[R][\f[CB]/\f[R]\f[I]mainclass\f[R]] +\f[V]-m\f[R] or \f[V]--module\f[R] \f[I]module\f[R][\f[V]/\f[R]\f[I]mainclass\f[R]] Executes the main class in a module specified by \f[I]mainclass\f[R] if it is given, or, if it is not given, the value in the \f[I]module\f[R]. In other words, \f[I]mainclass\f[R] can be used when it is not specified @@ -90,198 +99,193 @@ by the module, or to override the value when it is specified. See \f[B]Standard Options for Java\f[R]. .RE .TP -.B \f[I]source\-file\f[R] -Only used to launch a single source\-file program. +\f[I]source-file\f[R] +Only used to launch a single source-file program. Specifies the source file that contains the main class when using -source\-file mode. -See \f[B]Using Source\-File Mode to Launch Single\-File Source\-Code +source-file mode. +See \f[B]Using Source-File Mode to Launch Single-File Source-Code Programs\f[R] -.RS -.RE .TP -.B \f[I]args\f[R] ... -Optional: Arguments following \f[I]mainclass\f[R], \f[I]source\-file\f[R], -\f[CB]\-jar\f[R] \f[I]jarfile\f[R], and \f[CB]\-m\f[R] or \f[CB]\-\-module\f[R] -\f[I]module\f[R]\f[CB]/\f[R]\f[I]mainclass\f[R] are passed as arguments to -the main class. -.RS -.RE +\f[I]args\f[R] ... +Optional: Arguments following \f[I]mainclass\f[R], +\f[I]source-file\f[R], \f[V]-jar\f[R] \f[I]jarfile\f[R], and +\f[V]-m\f[R] or \f[V]--module\f[R] +\f[I]module\f[R]\f[V]/\f[R]\f[I]mainclass\f[R] are passed as arguments +to the main class. .SH DESCRIPTION .PP -The \f[CB]java\f[R] command starts a Java application. +The \f[V]java\f[R] command starts a Java application. It does this by starting the Java Virtual Machine (JVM), loading the -specified class, and calling that class\[aq]s \f[CB]main()\f[R] method. -The method must be declared \f[CB]public\f[R] and \f[CB]static\f[R], it must -not return any value, and it must accept a \f[CB]String\f[R] array as a -parameter. +specified class, and calling that class\[aq]s \f[V]main()\f[R] method. +The method must be declared \f[V]public\f[R] and \f[V]static\f[R], it +must not return any value, and it must accept a \f[V]String\f[R] array +as a parameter. The method declaration has the following form: .RS .PP -\f[CB]public\ static\ void\ main(String[]\ args)\f[R] +\f[V]public static void main(String[] args)\f[R] .RE .PP -In source\-file mode, the \f[CB]java\f[R] command can launch a class +In source-file mode, the \f[V]java\f[R] command can launch a class declared in a source file. -See \f[B]Using Source\-File Mode to Launch Single\-File Source\-Code -Programs\f[R] for a description of using the source\-file mode. +See \f[B]Using Source-File Mode to Launch Single-File Source-Code +Programs\f[R] for a description of using the source-file mode. .RS .PP -\f[B]Note:\f[R] You can use the \f[CB]JDK_JAVA_OPTIONS\f[R] launcher +\f[B]Note:\f[R] You can use the \f[V]JDK_JAVA_OPTIONS\f[R] launcher environment variable to prepend its content to the actual command line -of the \f[CB]java\f[R] launcher. +of the \f[V]java\f[R] launcher. See \f[B]Using the JDK_JAVA_OPTIONS Launcher Environment Variable\f[R]. .RE .PP By default, the first argument that isn\[aq]t an option of the -\f[CB]java\f[R] command is the fully qualified name of the class to be +\f[V]java\f[R] command is the fully qualified name of the class to be called. -If \f[CB]\-jar\f[R] is specified, then its argument is the name of the JAR +If \f[V]-jar\f[R] is specified, then its argument is the name of the JAR file containing class and resource files for the application. -The startup class must be indicated by the \f[CB]Main\-Class\f[R] manifest +The startup class must be indicated by the \f[V]Main-Class\f[R] manifest header in its manifest file. .PP Arguments after the class file name or the JAR file name are passed to -the \f[CB]main()\f[R] method. -.SS \f[CB]javaw\f[R] +the \f[V]main()\f[R] method. +.SS \f[V]javaw\f[R] .PP -\f[B]Windows:\f[R] The \f[CB]javaw\f[R] command is identical to -\f[CB]java\f[R], except that with \f[CB]javaw\f[R] there\[aq]s no associated -console window. -Use \f[CB]javaw\f[R] when you don\[aq]t want a command prompt window to +\f[B]Windows:\f[R] The \f[V]javaw\f[R] command is identical to +\f[V]java\f[R], except that with \f[V]javaw\f[R] there\[aq]s no +associated console window. +Use \f[V]javaw\f[R] when you don\[aq]t want a command prompt window to appear. -The \f[CB]javaw\f[R] launcher will, however, display a dialog box with +The \f[V]javaw\f[R] launcher will, however, display a dialog box with error information if a launch fails. -.SH USING SOURCE\-FILE MODE TO LAUNCH SINGLE\-FILE SOURCE\-CODE PROGRAMS +.SH USING SOURCE-FILE MODE TO LAUNCH SINGLE-FILE SOURCE-CODE PROGRAMS .PP -To launch a class declared in a source file, run the \f[CB]java\f[R] -launcher in source\-file mode. -Entering source\-file mode is determined by two items on the -\f[CB]java\f[R] command line: +To launch a class declared in a source file, run the \f[V]java\f[R] +launcher in source-file mode. +Entering source-file mode is determined by two items on the +\f[V]java\f[R] command line: .IP \[bu] 2 The first item on the command line that is not an option or part of an option. In other words, the item in the command line that would otherwise be the main class name. .IP \[bu] 2 -The \f[CB]\-\-source\f[R] \f[I]version\f[R] option, if present. +The \f[V]--source\f[R] \f[I]version\f[R] option, if present. .PP -If the class identifies an existing file that has a \f[CB]\&.java\f[R] -extension, or if the \f[CB]\-\-source\f[R] option is specified, then -source\-file mode is selected. +If the class identifies an existing file that has a \f[V].java\f[R] +extension, or if the \f[V]--source\f[R] option is specified, then +source-file mode is selected. The source file is then compiled and run. -The \f[CB]\-\-source\f[R] option can be used to specify the source +The \f[V]--source\f[R] option can be used to specify the source \f[I]version\f[R] or \f[I]N\f[R] of the source code. This determines the API that can be used. -When you set \f[CB]\-\-source\f[R] \f[I]N\f[R], you can only use the public +When you set \f[V]--source\f[R] \f[I]N\f[R], you can only use the public API that was defined in JDK \f[I]N\f[R]. .RS .PP \f[B]Note:\f[R] The valid values of \f[I]N\f[R] change for each release, with new values added and old values removed. -You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that is -no longer supported. +You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that +is no longer supported. The supported values of \f[I]N\f[R] are the current Java SE release -(\f[CB]20\f[R]) and a limited number of previous releases, detailed in the -command\-line help for \f[CB]javac\f[R], under the \f[CB]\-\-source\f[R] and -\f[CB]\-\-release\f[R] options. +(\f[V]20\f[R]) and a limited number of previous releases, detailed in +the command-line help for \f[V]javac\f[R], under the \f[V]--source\f[R] +and \f[V]--release\f[R] options. .RE .PP -If the file does not have the \f[CB]\&.java\f[R] extension, the -\f[CB]\-\-source\f[R] option must be used to tell the \f[CB]java\f[R] -command to use the source\-file mode. -The \f[CB]\-\-source\f[R] option is used for cases when the source file is -a "script" to be executed and the name of the source file does not -follow the normal naming conventions for Java source files. +If the file does not have the \f[V].java\f[R] extension, the +\f[V]--source\f[R] option must be used to tell the \f[V]java\f[R] +command to use the source-file mode. +The \f[V]--source\f[R] option is used for cases when the source file is +a \[dq]script\[dq] to be executed and the name of the source file does +not follow the normal naming conventions for Java source files. .PP -In source\-file mode, the effect is as though the source file is -compiled into memory, and the first class found in the source file is -executed. +In source-file mode, the effect is as though the source file is compiled +into memory, and the first class found in the source file is executed. Any arguments placed after the name of the source file in the original command line are passed to the compiled class when it is executed. .PP -For example, if a file were named \f[CB]HelloWorld.java\f[R] and contained -a class named \f[CB]hello.World\f[R], then the source\-file mode command -to launch the class would be: +For example, if a file were named \f[V]HelloWorld.java\f[R] and +contained a class named \f[V]hello.World\f[R], then the source-file mode +command to launch the class would be: .RS .PP -\f[CB]java\ HelloWorld.java\f[R] +\f[V]java HelloWorld.java\f[R] .RE .PP The example illustrates that the class can be in a named package, and does not need to be in the unnamed package. -This use of source\-file mode is informally equivalent to using the -following two commands where \f[CB]hello.World\f[R] is the name of the +This use of source-file mode is informally equivalent to using the +following two commands where \f[V]hello.World\f[R] is the name of the class in the package: .IP .nf \f[CB] -javac\ \-d\ \ HelloWorld.java -java\ \-cp\ \ hello.World +javac -d HelloWorld.java +java -cp hello.World \f[R] .fi .PP -\f[B]In source\-file mode, any additional command\-line options are +\f[B]In source-file mode, any additional command-line options are processed as follows:\f[R] .IP \[bu] 2 The launcher scans the options specified before the source file for any that are relevant in order to compile the source file. .RS 2 .PP -This includes: \f[CB]\-\-class\-path\f[R], \f[CB]\-\-module\-path\f[R], -\f[CB]\-\-add\-exports\f[R], \f[CB]\-\-add\-modules\f[R], -\f[CB]\-\-limit\-modules\f[R], \f[CB]\-\-patch\-module\f[R], -\f[CB]\-\-upgrade\-module\-path\f[R], and any variant forms of those -options. -It also includes the new \f[CB]\-\-enable\-preview\f[R] option, described -in JEP 12. +This includes: \f[V]--class-path\f[R], \f[V]--module-path\f[R], +\f[V]--add-exports\f[R], \f[V]--add-modules\f[R], +\f[V]--limit-modules\f[R], \f[V]--patch-module\f[R], +\f[V]--upgrade-module-path\f[R], and any variant forms of those options. +It also includes the new \f[V]--enable-preview\f[R] option, described in +JEP 12. .RE .IP \[bu] 2 No provision is made to pass any additional options to the compiler, -such as \f[CB]\-processor\f[R] or \f[CB]\-Werror\f[R]. +such as \f[V]-processor\f[R] or \f[V]-Werror\f[R]. .IP \[bu] 2 -Command\-line argument files (\f[CB]\@\f[R]\-files) may be used in the +Command-line argument files (\f[V]\[at]\f[R]-files) may be used in the standard way. Long lists of arguments for either the VM or the program being invoked -may be placed in files specified on the command\-line by prefixing the -filename with an \f[CB]\@\f[R] character. +may be placed in files specified on the command-line by prefixing the +filename with an \f[V]\[at]\f[R] character. .PP -\f[B]In source\-file mode, compilation proceeds as follows:\f[R] +\f[B]In source-file mode, compilation proceeds as follows:\f[R] .IP \[bu] 2 -Any command\-line options that are relevant to the compilation +Any command-line options that are relevant to the compilation environment are taken into account. .IP \[bu] 2 No other source files are found and compiled, as if the source path is set to an empty value. .IP \[bu] 2 -Annotation processing is disabled, as if \f[CB]\-proc:none\f[R] is in +Annotation processing is disabled, as if \f[V]-proc:none\f[R] is in effect. .IP \[bu] 2 -If a version is specified, via the \f[CB]\-\-source\f[R] option, the value -is used as the argument for an implicit \f[CB]\-\-release\f[R] option for +If a version is specified, via the \f[V]--source\f[R] option, the value +is used as the argument for an implicit \f[V]--release\f[R] option for the compilation. This sets both the source version accepted by compiler and the system API that may be used by the code in the source file. .IP \[bu] 2 The source file is compiled in the context of an unnamed module. .IP \[bu] 2 -The source file should contain one or more top\-level classes, the first +The source file should contain one or more top-level classes, the first of which is taken as the class to be executed. .IP \[bu] 2 The compiler does not enforce the optional restriction defined at the end of JLS 7.6, that a type in a named package should exist in a file whose name is composed from the type name followed by the -\f[CB]\&.java\f[R] extension. +\f[V].java\f[R] extension. .IP \[bu] 2 If the source file contains errors, appropriate error messages are written to the standard error stream, and the launcher exits with a -non\-zero exit code. +non-zero exit code. .PP -\f[B]In source\-file mode, execution proceeds as follows:\f[R] +\f[B]In source-file mode, execution proceeds as follows:\f[R] .IP \[bu] 2 -The class to be executed is the first top\-level class found in the +The class to be executed is the first top-level class found in the source file. It must contain a declaration of the standard -\f[CB]public\ static\ void\ main(String[])\f[R] method. +\f[V]public static void main(String[])\f[R] method. .IP \[bu] 2 The compiled classes are loaded by a custom class loader, that delegates to the application class loader. @@ -289,9 +293,9 @@ This implies that classes appearing on the application class path cannot refer to any classes declared in the source file. .IP \[bu] 2 The compiled classes are executed in the context of an unnamed module, -as though \f[CB]\-\-add\-modules=ALL\-DEFAULT\f[R] is in effect. -This is in addition to any other \f[CB]\-\-add\-module\f[R] options that -may be have been specified on the command line. +as though \f[V]--add-modules=ALL-DEFAULT\f[R] is in effect. +This is in addition to any other \f[V]--add-module\f[R] options that may +be have been specified on the command line. .IP \[bu] 2 Any arguments appearing after the name of the file on the command line are passed to the standard main method in the obvious way. @@ -299,46 +303,47 @@ are passed to the standard main method in the obvious way. It is an error if there is a class on the application class path whose name is the same as that of the class to be executed. .PP -See \f[B]JEP 330: Launch Single\-File Source\-Code Programs\f[R] +See \f[B]JEP 330: Launch Single-File Source-Code Programs\f[R] [https://openjdk.org/jeps/330] for complete details. .SH USING THE JDK_JAVA_OPTIONS LAUNCHER ENVIRONMENT VARIABLE .PP -\f[CB]JDK_JAVA_OPTIONS\f[R] prepends its content to the options parsed +\f[V]JDK_JAVA_OPTIONS\f[R] prepends its content to the options parsed from the command line. -The content of the \f[CB]JDK_JAVA_OPTIONS\f[R] environment variable is a -list of arguments separated by white\-space characters (as determined by -\f[CB]isspace()\f[R]). +The content of the \f[V]JDK_JAVA_OPTIONS\f[R] environment variable is a +list of arguments separated by white-space characters (as determined by +\f[V]isspace()\f[R]). These are prepended to the command line arguments passed to -\f[CB]java\f[R] launcher. +\f[V]java\f[R] launcher. The encoding requirement for the environment variable is the same as the -\f[CB]java\f[R] command line on the system. -\f[CB]JDK_JAVA_OPTIONS\f[R] environment variable content is treated in the -same manner as that specified in the command line. +\f[V]java\f[R] command line on the system. +\f[V]JDK_JAVA_OPTIONS\f[R] environment variable content is treated in +the same manner as that specified in the command line. .PP -Single (\f[CB]\[aq]\f[R]) or double (\f[CB]"\f[R]) quotes can be used to -enclose arguments that contain whitespace characters. +Single (\f[V]\[aq]\f[R]) or double (\f[V]\[dq]\f[R]) quotes can be used +to enclose arguments that contain whitespace characters. All content between the open quote and the first matching close quote are preserved by simply removing the pair of quotes. In case a matching quote is not found, the launcher will abort with an error message. -\f[CB]\@\f[R]\-files are supported as they are specified in the command +\f[V]\[at]\f[R]-files are supported as they are specified in the command line. -However, as in \f[CB]\@\f[R]\-files, use of a wildcard is not supported. -In order to mitigate potential misuse of \f[CB]JDK_JAVA_OPTIONS\f[R] -behavior, options that specify the main class (such as \f[CB]\-jar\f[R]) -or cause the \f[CB]java\f[R] launcher to exit without executing the main -class (such as \f[CB]\-h\f[R]) are disallowed in the environment variable. +However, as in \f[V]\[at]\f[R]-files, use of a wildcard is not +supported. +In order to mitigate potential misuse of \f[V]JDK_JAVA_OPTIONS\f[R] +behavior, options that specify the main class (such as \f[V]-jar\f[R]) +or cause the \f[V]java\f[R] launcher to exit without executing the main +class (such as \f[V]-h\f[R]) are disallowed in the environment variable. If any of these options appear in the environment variable, the launcher will abort with an error message. -When \f[CB]JDK_JAVA_OPTIONS\f[R] is set, the launcher prints a message to +When \f[V]JDK_JAVA_OPTIONS\f[R] is set, the launcher prints a message to stderr as a reminder. .PP \f[B]Example:\f[R] .IP .nf \f[CB] -$\ export\ JDK_JAVA_OPTIONS=\[aq]\-g\ \@file1\ \-Dprop=value\ \@file2\ \-Dws.prop="white\ spaces"\[aq] -$\ java\ \-Xint\ \@file3 +$ export JDK_JAVA_OPTIONS=\[aq]-g \[at]file1 -Dprop=value \[at]file2 -Dws.prop=\[dq]white spaces\[dq]\[aq] +$ java -Xint \[at]file3 \f[R] .fi .PP @@ -346,12 +351,12 @@ is equivalent to the command line: .IP .nf \f[CB] -java\ \-g\ \@file1\ \-Dprop=value\ \@file2\ \-Dws.prop="white\ spaces"\ \-Xint\ \@file3 +java -g \[at]file1 -Dprop=value \[at]file2 -Dws.prop=\[dq]white spaces\[dq] -Xint \[at]file3 \f[R] .fi .SH OVERVIEW OF JAVA OPTIONS .PP -The \f[CB]java\f[R] command supports a wide range of options in the +The \f[V]java\f[R] command supports a wide range of options in the following categories: .IP \[bu] 2 \f[B]Standard Options for Java\f[R]: Options guaranteed to be supported @@ -363,7 +368,7 @@ JRE, setting the class path, enabling verbose output, and so on. specific to the Java HotSpot Virtual Machine. They aren\[aq]t guaranteed to be supported by all JVM implementations, and are subject to change. -These options start with \f[CB]\-X\f[R]. +These options start with \f[V]-X\f[R]. .PP The advanced options aren\[aq]t recommended for casual use. These are developer options used for tuning specific areas of the Java @@ -374,13 +379,13 @@ Several examples of performance tuning are provided in \f[B]Performance Tuning Examples\f[R]. These options aren\[aq]t guaranteed to be supported by all JVM implementations and are subject to change. -Advanced options start with \f[CB]\-XX\f[R]. +Advanced options start with \f[V]-XX\f[R]. .IP \[bu] 2 -\f[B]Advanced Runtime Options for Java\f[R]: Control the runtime behavior -of the Java HotSpot VM. +\f[B]Advanced Runtime Options for Java\f[R]: Control the runtime +behavior of the Java HotSpot VM. .IP \[bu] 2 \f[B]Advanced JIT Compiler Options for java\f[R]: Control the dynamic -just\-in\-time (JIT) compilation performed by the Java HotSpot VM. +just-in-time (JIT) compilation performed by the Java HotSpot VM. .IP \[bu] 2 \f[B]Advanced Serviceability Options for Java\f[R]: Enable gathering system information and performing extensive debugging. @@ -391,35 +396,35 @@ garbage collection (GC) is performed by the Java HotSpot Boolean options are used to either enable a feature that\[aq]s disabled by default or disable a feature that\[aq]s enabled by default. Such options don\[aq]t require a parameter. -Boolean \f[CB]\-XX\f[R] options are enabled using the plus sign -(\f[CB]\-XX:+\f[R]\f[I]OptionName\f[R]) and disabled using the minus sign -(\f[CB]\-XX:\-\f[R]\f[I]OptionName\f[R]). +Boolean \f[V]-XX\f[R] options are enabled using the plus sign +(\f[V]-XX:+\f[R]\f[I]OptionName\f[R]) and disabled using the minus sign +(\f[V]-XX:-\f[R]\f[I]OptionName\f[R]). .PP For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option). If you\[aq]re expected to specify the size in bytes, then you can use no -suffix, or use the suffix \f[CB]k\f[R] or \f[CB]K\f[R] for kilobytes (KB), -\f[CB]m\f[R] or \f[CB]M\f[R] for megabytes (MB), or \f[CB]g\f[R] or \f[CB]G\f[R] -for gigabytes (GB). +suffix, or use the suffix \f[V]k\f[R] or \f[V]K\f[R] for kilobytes (KB), +\f[V]m\f[R] or \f[V]M\f[R] for megabytes (MB), or \f[V]g\f[R] or +\f[V]G\f[R] for gigabytes (GB). For example, to set the size to 8 GB, you can specify either -\f[CB]8g\f[R], \f[CB]8192m\f[R], \f[CB]8388608k\f[R], or \f[CB]8589934592\f[R] -as the argument. +\f[V]8g\f[R], \f[V]8192m\f[R], \f[V]8388608k\f[R], or +\f[V]8589934592\f[R] as the argument. If you are expected to specify the percentage, then use a number from 0 to 1. -For example, specify \f[CB]0.25\f[R] for 25%. +For example, specify \f[V]0.25\f[R] for 25%. .PP The following sections describe the options that are obsolete, deprecated, and removed: .IP \[bu] 2 -\f[B]Deprecated Java Options\f[R]: Accepted and acted upon \-\-\- a -warning is issued when they\[aq]re used. +\f[B]Deprecated Java Options\f[R]: Accepted and acted upon --- a warning +is issued when they\[aq]re used. .IP \[bu] 2 -\f[B]Obsolete Java Options\f[R]: Accepted but ignored \-\-\- a warning is +\f[B]Obsolete Java Options\f[R]: Accepted but ignored --- a warning is issued when they\[aq]re used. .IP \[bu] 2 -\f[B]Removed Java Options\f[R]: Removed \-\-\- using them results in an +\f[B]Removed Java Options\f[R]: Removed --- using them results in an error. .SH STANDARD OPTIONS FOR JAVA .PP @@ -428,25 +433,25 @@ implementations of the JVM. .RS .PP \f[B]Note:\f[R] To specify an argument for a long option, you can use -either \f[CB]\-\-\f[R]\f[I]name\f[R]\f[CB]=\f[R]\f[I]value\f[R] or -\f[CB]\-\-\f[R]\f[I]name\f[R] \f[I]value\f[R]. +either \f[V]--\f[R]\f[I]name\f[R]\f[V]=\f[R]\f[I]value\f[R] or +\f[V]--\f[R]\f[I]name\f[R] \f[I]value\f[R]. .RE .TP -.B \f[CB]\-agentlib:\f[R]\f[I]libname\f[R][\f[CB]=\f[R]\f[I]options\f[R]] +\f[V]-agentlib:\f[R]\f[I]libname\f[R][\f[V]=\f[R]\f[I]options\f[R]] Loads the specified native agent library. -After the library name, a comma\-separated list of options specific to +After the library name, a comma-separated list of options specific to the library can be used. .RS .IP \[bu] 2 -\f[B]Linux and macOS:\f[R] If the option \f[CB]\-agentlib:foo\f[R] is +\f[B]Linux and macOS:\f[R] If the option \f[V]-agentlib:foo\f[R] is specified, then the JVM attempts to load the library named -\f[CB]libfoo.so\f[R] in the location specified by the -\f[CB]LD_LIBRARY_PATH\f[R] system variable (on macOS this variable is -\f[CB]DYLD_LIBRARY_PATH\f[R]). +\f[V]libfoo.so\f[R] in the location specified by the +\f[V]LD_LIBRARY_PATH\f[R] system variable (on macOS this variable is +\f[V]DYLD_LIBRARY_PATH\f[R]). .IP \[bu] 2 -\f[B]Windows:\f[R] If the option \f[CB]\-agentlib:foo\f[R] is specified, -then the JVM attempts to load the library named \f[CB]foo.dll\f[R] in the -location specified by the \f[CB]PATH\f[R] system variable. +\f[B]Windows:\f[R] If the option \f[V]-agentlib:foo\f[R] is specified, +then the JVM attempts to load the library named \f[V]foo.dll\f[R] in the +location specified by the \f[V]PATH\f[R] system variable. .RS 2 .PP The following example shows how to load the Java Debug Wire Protocol @@ -454,359 +459,308 @@ The following example shows how to load the Java Debug Wire Protocol suspending the JVM before the main class loads: .RS .PP -\f[CB]\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\f[R] +\f[V]-agentlib:jdwp=transport=dt_socket,server=y,address=8000\f[R] .RE .RE .RE .TP -.B \f[CB]\-agentpath:\f[R]\f[I]pathname\f[R][\f[CB]=\f[R]\f[I]options\f[R]] +\f[V]-agentpath:\f[R]\f[I]pathname\f[R][\f[V]=\f[R]\f[I]options\f[R]] Loads the native agent library specified by the absolute path name. -This option is equivalent to \f[CB]\-agentlib\f[R] but uses the full path +This option is equivalent to \f[V]-agentlib\f[R] but uses the full path and file name of the library. -.RS -.RE .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]classpath\f[R], \f[CB]\-classpath\f[R] \f[I]classpath\f[R], or \f[CB]\-cp\f[R] \f[I]classpath\f[R] +\f[V]--class-path\f[R] \f[I]classpath\f[R], \f[V]-classpath\f[R] \f[I]classpath\f[R], or \f[V]-cp\f[R] \f[I]classpath\f[R] Specifies a list of directories, JAR files, and ZIP archives to search for class files. .RS .PP -On Windows, semicolons (\f[CB];\f[R]) separate entities in this list; on -other platforms it is a colon (\f[CB]:\f[R]). +On Windows, semicolons (\f[V];\f[R]) separate entities in this list; on +other platforms it is a colon (\f[V]:\f[R]). .PP Specifying \f[I]classpath\f[R] overrides any setting of the -\f[CB]CLASSPATH\f[R] environment variable. -If the class path option isn\[aq]t used and \f[I]classpath\f[R] isn\[aq]t -set, then the user class path consists of the current directory (.). +\f[V]CLASSPATH\f[R] environment variable. +If the class path option isn\[aq]t used and \f[I]classpath\f[R] +isn\[aq]t set, then the user class path consists of the current +directory (.). .PP As a special convenience, a class path element that contains a base name of an asterisk (*) is considered equivalent to specifying a list of all -the files in the directory with the extension \f[CB]\&.jar\f[R] or -\f[CB]\&.JAR\f[R] . +the files in the directory with the extension \f[V].jar\f[R] or +\f[V].JAR\f[R] . A Java program can\[aq]t tell the difference between the two invocations. -For example, if the directory mydir contains \f[CB]a.jar\f[R] and -\f[CB]b.JAR\f[R], then the class path element mydir/* is expanded to -\f[CB]A.jar:b.JAR\f[R], except that the order of JAR files is unspecified. -All \f[CB]\&.jar\f[R] files in the specified directory, even hidden ones, +For example, if the directory mydir contains \f[V]a.jar\f[R] and +\f[V]b.JAR\f[R], then the class path element mydir/* is expanded to +\f[V]A.jar:b.JAR\f[R], except that the order of JAR files is +unspecified. +All \f[V].jar\f[R] files in the specified directory, even hidden ones, are included in the list. A class path entry consisting of an asterisk (*) expands to a list of all the jar files in the current directory. -The \f[CB]CLASSPATH\f[R] environment variable, where defined, is similarly -expanded. +The \f[V]CLASSPATH\f[R] environment variable, where defined, is +similarly expanded. Any class path wildcard expansion that occurs before the Java VM is started. Java programs never see wildcards that aren\[aq]t expanded except by querying the environment, such as by calling -\f[CB]System.getenv("CLASSPATH")\f[R]. +\f[V]System.getenv(\[dq]CLASSPATH\[dq])\f[R]. .RE .TP -.B \f[CB]\-\-disable\-\@files\f[R] +\f[V]--disable-\[at]files\f[R] Can be used anywhere on the command line, including in an argument file, -to prevent further \f[CB]\@filename\f[R] expansion. -This option stops expanding \f[CB]\@\f[R]\-argfiles after the option. -.RS -.RE +to prevent further \f[V]\[at]filename\f[R] expansion. +This option stops expanding \f[V]\[at]\f[R]-argfiles after the option. .TP -.B \f[CB]\-\-enable\-preview\f[R] +\f[V]--enable-preview\f[R] Allows classes to depend on \f[B]preview features\f[R] -[https://docs.oracle.com/en/java/javase/12/language/index.html#JSLAN\-GUID\-5A82FE0E\-0CA4\-4F1F\-B075\-564874FE2823] +[https://docs.oracle.com/en/java/javase/12/language/index.html#JSLAN-GUID-5A82FE0E-0CA4-4F1F-B075-564874FE2823] of the release. -.RS -.RE .TP -.B \f[CB]\-\-finalization=\f[R]\f[I]value\f[R] +\f[V]--finalization=\f[R]\f[I]value\f[R] Controls whether the JVM performs finalization of objects. -Valid values are "enabled" and "disabled". -Finalization is enabled by default, so the value "enabled" does nothing. -The value "disabled" disables finalization, so that no finalizers are -invoked. -.RS -.RE +Valid values are \[dq]enabled\[dq] and \[dq]disabled\[dq]. +Finalization is enabled by default, so the value \[dq]enabled\[dq] does +nothing. +The value \[dq]disabled\[dq] disables finalization, so that no +finalizers are invoked. .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]... or \f[CB]\-p\f[R] \f[I]modulepath\f[R] +\f[V]--module-path\f[R] \f[I]modulepath\f[R]... or \f[V]-p\f[R] \f[I]modulepath\f[R] Specifies a list of directories in which each directory is a directory of modules. .RS .PP -On Windows, semicolons (\f[CB];\f[R]) separate directories in this list; -on other platforms it is a colon (\f[CB]:\f[R]). +On Windows, semicolons (\f[V];\f[R]) separate directories in this list; +on other platforms it is a colon (\f[V]:\f[R]). .RE .TP -.B \f[CB]\-\-upgrade\-module\-path\f[R] \f[I]modulepath\f[R]... +\f[V]--upgrade-module-path\f[R] \f[I]modulepath\f[R]... Specifies a list of directories in which each directory is a directory of modules that replace upgradeable modules in the runtime image. .RS .PP -On Windows, semicolons (\f[CB];\f[R]) separate directories in this list; -on other platforms it is a colon (\f[CB]:\f[R]). +On Windows, semicolons (\f[V];\f[R]) separate directories in this list; +on other platforms it is a colon (\f[V]:\f[R]). .RE .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...] +\f[V]--add-modules\f[R] \f[I]module\f[R][\f[V],\f[R]\f[I]module\f[R]...] Specifies the root modules to resolve in addition to the initial module. -\f[I]module\f[R] also can be \f[CB]ALL\-DEFAULT\f[R], \f[CB]ALL\-SYSTEM\f[R], -and \f[CB]ALL\-MODULE\-PATH\f[R]. -.RS -.RE +\f[I]module\f[R] also can be \f[V]ALL-DEFAULT\f[R], +\f[V]ALL-SYSTEM\f[R], and \f[V]ALL-MODULE-PATH\f[R]. .TP -.B \f[CB]\-\-list\-modules\f[R] +\f[V]--list-modules\f[R] Lists the observable modules and then exits. -.RS -.RE .TP -.B \f[CB]\-d\f[R] \f[I]module_name\f[R] or \f[CB]\-\-describe\-module\f[R] \f[I]module_name\f[R] +\f[V]-d\f[R] \f[I]module_name\f[R] or \f[V]--describe-module\f[R] \f[I]module_name\f[R] Describes a specified module and then exits. -.RS -.RE .TP -.B \f[CB]\-\-dry\-run\f[R] +\f[V]--dry-run\f[R] Creates the VM but doesn\[aq]t execute the main method. -This \f[CB]\-\-dry\-run\f[R] option might be useful for validating the -command\-line options such as the module system configuration. -.RS -.RE +This \f[V]--dry-run\f[R] option might be useful for validating the +command-line options such as the module system configuration. .TP -.B \f[CB]\-\-validate\-modules\f[R] +\f[V]--validate-modules\f[R] Validates all modules and exit. This option is helpful for finding conflicts and other errors with modules on the module path. -.RS -.RE .TP -.B \f[CB]\-D\f[R]\f[I]property\f[R]\f[CB]=\f[R]\f[I]value\f[R] +\f[V]-D\f[R]\f[I]property\f[R]\f[V]=\f[R]\f[I]value\f[R] Sets a system property value. The \f[I]property\f[R] variable is a string with no spaces that represents the name of the property. -The \f[I]value\f[R] variable is a string that represents the value of the -property. +The \f[I]value\f[R] variable is a string that represents the value of +the property. If \f[I]value\f[R] is a string with spaces, then enclose it in quotation -marks (for example \f[CB]\-Dfoo="foo\ bar"\f[R]). -.RS -.RE +marks (for example \f[V]-Dfoo=\[dq]foo bar\[dq]\f[R]). .TP -.B \f[CB]\-disableassertions\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]] or \f[CB]\-da\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]] +\f[V]-disableassertions\f[R][\f[V]:\f[R][\f[I]packagename\f[R]]...|\f[V]:\f[R]\f[I]classname\f[R]] or \f[V]-da\f[R][\f[V]:\f[R][\f[I]packagename\f[R]]...|\f[V]:\f[R]\f[I]classname\f[R]] Disables assertions. By default, assertions are disabled in all packages and classes. -With no arguments, \f[CB]\-disableassertions\f[R] (\f[CB]\-da\f[R]) disables +With no arguments, \f[V]-disableassertions\f[R] (\f[V]-da\f[R]) disables assertions in all packages and classes. -With the \f[I]packagename\f[R] argument ending in \f[CB]\&...\f[R], the +With the \f[I]packagename\f[R] argument ending in \f[V]...\f[R], the switch disables assertions in the specified package and any subpackages. -If the argument is simply \f[CB]\&...\f[R], then the switch disables +If the argument is simply \f[V]...\f[R], then the switch disables assertions in the unnamed package in the current working directory. With the \f[I]classname\f[R] argument, the switch disables assertions in the specified class. .RS .PP -The \f[CB]\-disableassertions\f[R] (\f[CB]\-da\f[R]) option applies to all +The \f[V]-disableassertions\f[R] (\f[V]-da\f[R]) option applies to all class loaders and to system classes (which don\[aq]t have a class loader). There\[aq]s one exception to this rule: If the option is provided with no arguments, then it doesn\[aq]t apply to system classes. This makes it easy to disable assertions in all classes except for system classes. -The \f[CB]\-disablesystemassertions\f[R] option enables you to disable +The \f[V]-disablesystemassertions\f[R] option enables you to disable assertions in all system classes. To explicitly enable assertions in specific packages or classes, use the -\f[CB]\-enableassertions\f[R] (\f[CB]\-ea\f[R]) option. +\f[V]-enableassertions\f[R] (\f[V]-ea\f[R]) option. Both options can be used at the same time. -For example, to run the \f[CB]MyClass\f[R] application with assertions -enabled in the package \f[CB]com.wombat.fruitbat\f[R] (and any +For example, to run the \f[V]MyClass\f[R] application with assertions +enabled in the package \f[V]com.wombat.fruitbat\f[R] (and any subpackages) but disabled in the class -\f[CB]com.wombat.fruitbat.Brickbat\f[R], use the following command: +\f[V]com.wombat.fruitbat.Brickbat\f[R], use the following command: .RS .PP -\f[CB]java\ \-ea:com.wombat.fruitbat...\ \-da:com.wombat.fruitbat.Brickbat\ MyClass\f[R] +\f[V]java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat MyClass\f[R] .RE .RE .TP -.B \f[CB]\-disablesystemassertions\f[R] or \f[CB]\-dsa\f[R] +\f[V]-disablesystemassertions\f[R] or \f[V]-dsa\f[R] Disables assertions in all system classes. -.RS -.RE .TP -.B \f[CB]\-enableassertions\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]] or \f[CB]\-ea\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]] +\f[V]-enableassertions\f[R][\f[V]:\f[R][\f[I]packagename\f[R]]...|\f[V]:\f[R]\f[I]classname\f[R]] or \f[V]-ea\f[R][\f[V]:\f[R][\f[I]packagename\f[R]]...|\f[V]:\f[R]\f[I]classname\f[R]] Enables assertions. By default, assertions are disabled in all packages and classes. -With no arguments, \f[CB]\-enableassertions\f[R] (\f[CB]\-ea\f[R]) enables +With no arguments, \f[V]-enableassertions\f[R] (\f[V]-ea\f[R]) enables assertions in all packages and classes. -With the \f[I]packagename\f[R] argument ending in \f[CB]\&...\f[R], the +With the \f[I]packagename\f[R] argument ending in \f[V]...\f[R], the switch enables assertions in the specified package and any subpackages. -If the argument is simply \f[CB]\&...\f[R], then the switch enables +If the argument is simply \f[V]...\f[R], then the switch enables assertions in the unnamed package in the current working directory. With the \f[I]classname\f[R] argument, the switch enables assertions in the specified class. .RS .PP -The \f[CB]\-enableassertions\f[R] (\f[CB]\-ea\f[R]) option applies to all +The \f[V]-enableassertions\f[R] (\f[V]-ea\f[R]) option applies to all class loaders and to system classes (which don\[aq]t have a class loader). There\[aq]s one exception to this rule: If the option is provided with no arguments, then it doesn\[aq]t apply to system classes. This makes it easy to enable assertions in all classes except for system classes. -The \f[CB]\-enablesystemassertions\f[R] option provides a separate switch +The \f[V]-enablesystemassertions\f[R] option provides a separate switch to enable assertions in all system classes. To explicitly disable assertions in specific packages or classes, use -the \f[CB]\-disableassertions\f[R] (\f[CB]\-da\f[R]) option. +the \f[V]-disableassertions\f[R] (\f[V]-da\f[R]) option. If a single command contains multiple instances of these switches, then they\[aq]re processed in order, before loading any classes. -For example, to run the \f[CB]MyClass\f[R] application with assertions -enabled only in the package \f[CB]com.wombat.fruitbat\f[R] (and any +For example, to run the \f[V]MyClass\f[R] application with assertions +enabled only in the package \f[V]com.wombat.fruitbat\f[R] (and any subpackages) but disabled in the class -\f[CB]com.wombat.fruitbat.Brickbat\f[R], use the following command: +\f[V]com.wombat.fruitbat.Brickbat\f[R], use the following command: .RS .PP -\f[CB]java\ \-ea:com.wombat.fruitbat...\ \-da:com.wombat.fruitbat.Brickbat\ MyClass\f[R] +\f[V]java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat MyClass\f[R] .RE .RE .TP -.B \f[CB]\-enablesystemassertions\f[R] or \f[CB]\-esa\f[R] +\f[V]-enablesystemassertions\f[R] or \f[V]-esa\f[R] Enables assertions in all system classes. -.RS -.RE .TP -.B \f[CB]\-help\f[R], \f[CB]\-h\f[R], or \f[CB]\-?\f[R] +\f[V]-help\f[R], \f[V]-h\f[R], or \f[V]-?\f[R] Prints the help message to the error stream. -.RS -.RE .TP -.B \f[CB]\-\-help\f[R] +\f[V]--help\f[R] Prints the help message to the output stream. -.RS -.RE .TP -.B \f[CB]\-javaagent:\f[R]\f[I]jarpath\f[R][\f[CB]=\f[R]\f[I]options\f[R]] +\f[V]-javaagent:\f[R]\f[I]jarpath\f[R][\f[V]=\f[R]\f[I]options\f[R]] Loads the specified Java programming language agent. -See \f[CB]java.lang.instrument\f[R]. -.RS -.RE +See \f[V]java.lang.instrument\f[R]. .TP -.B \f[CB]\-\-show\-version\f[R] +\f[V]--show-version\f[R] Prints the product version to the output stream and continues. -.RS -.RE .TP -.B \f[CB]\-showversion\f[R] +\f[V]-showversion\f[R] Prints the product version to the error stream and continues. -.RS -.RE .TP -.B \f[CB]\-\-show\-module\-resolution\f[R] +\f[V]--show-module-resolution\f[R] Shows module resolution output during startup. -.RS -.RE .TP -.B \f[CB]\-splash:\f[R]\f[I]imagepath\f[R] +\f[V]-splash:\f[R]\f[I]imagepath\f[R] Shows the splash screen with the image specified by \f[I]imagepath\f[R]. HiDPI scaled images are automatically supported and used if available. -The unscaled image file name, such as \f[CB]image.ext\f[R], should always -be passed as the argument to the \f[CB]\-splash\f[R] option. +The unscaled image file name, such as \f[V]image.ext\f[R], should always +be passed as the argument to the \f[V]-splash\f[R] option. The most appropriate scaled image provided is picked up automatically. .RS .PP -For example, to show the \f[CB]splash.gif\f[R] file from the -\f[CB]images\f[R] directory when starting your application, use the +For example, to show the \f[V]splash.gif\f[R] file from the +\f[V]images\f[R] directory when starting your application, use the following option: .RS .PP -\f[CB]\-splash:images/splash.gif\f[R] +\f[V]-splash:images/splash.gif\f[R] .RE .PP See the SplashScreen API documentation for more information. .RE .TP -.B \f[CB]\-verbose:class\f[R] +\f[V]-verbose:class\f[R] Displays information about each loaded class. -.RS -.RE .TP -.B \f[CB]\-verbose:gc\f[R] +\f[V]-verbose:gc\f[R] Displays information about each garbage collection (GC) event. -.RS -.RE .TP -.B \f[CB]\-verbose:jni\f[R] +\f[V]-verbose:jni\f[R] Displays information about the use of native methods and other Java Native Interface (JNI) activity. -.RS -.RE .TP -.B \f[CB]\-verbose:module\f[R] +\f[V]-verbose:module\f[R] Displays information about the modules in use. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Prints product version to the output stream and exits. -.RS -.RE .TP -.B \f[CB]\-version\f[R] +\f[V]-version\f[R] Prints product version to the error stream and exits. -.RS -.RE .TP -.B \f[CB]\-X\f[R] +\f[V]-X\f[R] Prints the help on extra options to the error stream. -.RS -.RE .TP -.B \f[CB]\-\-help\-extra\f[R] +\f[V]--help-extra\f[R] Prints the help on extra options to the output stream. -.RS -.RE .TP -.B \f[CB]\@\f[R]\f[I]argfile\f[R] -Specifies one or more argument files prefixed by \f[CB]\@\f[R] used by the -\f[CB]java\f[R] command. -It isn\[aq]t uncommon for the \f[CB]java\f[R] command line to be very long -because of the \f[CB]\&.jar\f[R] files needed in the classpath. -The \f[CB]\@\f[R]\f[I]argfile\f[R] option overcomes command\-line length -limitations by enabling the launcher to expand the contents of argument -files after shell expansion, but before argument processing. +\f[V]\[at]\f[R]\f[I]argfile\f[R] +Specifies one or more argument files prefixed by \f[V]\[at]\f[R] used by +the \f[V]java\f[R] command. +It isn\[aq]t uncommon for the \f[V]java\f[R] command line to be very +long because of the \f[V].jar\f[R] files needed in the classpath. +The \f[V]\[at]\f[R]\f[I]argfile\f[R] option overcomes command-line +length limitations by enabling the launcher to expand the contents of +argument files after shell expansion, but before argument processing. Contents in the argument files are expanded because otherwise, they would be specified on the command line until the -\f[CB]\-\-disable\-\@files\f[R] option was encountered. +\f[V]--disable-\[at]files\f[R] option was encountered. .RS .PP The argument files can also contain the main class name and all options. If an argument file contains all of the options required by the -\f[CB]java\f[R] command, then the command line could simply be: +\f[V]java\f[R] command, then the command line could simply be: .RS .PP -\f[CB]java\ \@\f[R]\f[I]argfile\f[R] +\f[V]java \[at]\f[R]\f[I]argfile\f[R] .RE .PP -See \f[B]java Command\-Line Argument Files\f[R] for a description and -examples of using \f[CB]\@\f[R]\-argfiles. +See \f[B]java Command-Line Argument Files\f[R] for a description and +examples of using \f[V]\[at]\f[R]-argfiles. .RE .SH EXTRA OPTIONS FOR JAVA .PP -The following \f[CB]java\f[R] options are general purpose options that are -specific to the Java HotSpot Virtual Machine. +The following \f[V]java\f[R] options are general purpose options that +are specific to the Java HotSpot Virtual Machine. .TP -.B \f[CB]\-Xbatch\f[R] +\f[V]-Xbatch\f[R] Disables background compilation. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished. -The \f[CB]\-Xbatch\f[R] flag disables background compilation so that +The \f[V]-Xbatch\f[R] flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed. -This option is equivalent to \f[CB]\-XX:\-BackgroundCompilation\f[R]. -.RS -.RE +This option is equivalent to \f[V]-XX:-BackgroundCompilation\f[R]. .TP -.B \f[CB]\-Xbootclasspath/a:\f[R]\f[I]directories\f[R]|\f[I]zip\f[R]|\f[I]JAR\-files\f[R] +\f[V]-Xbootclasspath/a:\f[R]\f[I]directories\f[R]|\f[I]zip\f[R]|\f[I]JAR-files\f[R] Specifies a list of directories, JAR files, and ZIP archives to append to the end of the default bootstrap class path. .RS .PP -On Windows, semicolons (\f[CB];\f[R]) separate entities in this list; on -other platforms it is a colon (\f[CB]:\f[R]). +On Windows, semicolons (\f[V];\f[R]) separate entities in this list; on +other platforms it is a colon (\f[V]:\f[R]). .RE .TP -.B \f[CB]\-Xcheck:jni\f[R] +\f[V]-Xcheck:jni\f[R] Performs additional checks for Java Native Interface (JNI) functions. .RS .PP @@ -816,13 +770,13 @@ in such cases: .IP \[bu] 2 The thread doing the call is not attached to the JVM. .IP \[bu] 2 -The thread doing the call is using the \f[CB]JNIEnv\f[R] belonging to +The thread doing the call is using the \f[V]JNIEnv\f[R] belonging to another thread. .IP \[bu] 2 A parameter validation check fails: .RS 2 .IP \[bu] 2 -A \f[CB]jfieldID\f[R], or \f[CB]jmethodID\f[R], is detected as being +A \f[V]jfieldID\f[R], or \f[V]jmethodID\f[R], is detected as being invalid. For example: .RS 2 @@ -840,14 +794,14 @@ For example: .IP \[bu] 2 NULL where not permitted .IP \[bu] 2 -An out\-of\-bounds array index, or frame capacity +An out-of-bounds array index, or frame capacity .IP \[bu] 2 -A non\-UTF\-8 string +A non-UTF-8 string .IP \[bu] 2 An invalid JNI reference .IP \[bu] 2 -An attempt to use a \f[CB]ReleaseXXX\f[R] function on a parameter not -produced by the corresponding \f[CB]GetXXX\f[R] function +An attempt to use a \f[V]ReleaseXXX\f[R] function on a parameter not +produced by the corresponding \f[V]GetXXX\f[R] function .RE .RE .PP @@ -859,73 +813,59 @@ may be pending. .IP \[bu] 2 The number of JNI local references existing when a JNI function terminates exceeds the number guaranteed to be available. -See the \f[CB]EnsureLocalcapacity\f[R] function. +See the \f[V]EnsureLocalcapacity\f[R] function. .IP \[bu] 2 -A class descriptor is in decorated format (\f[CB]Lname;\f[R]) when it +A class descriptor is in decorated format (\f[V]Lname;\f[R]) when it should not be. .IP \[bu] 2 -A \f[CB]NULL\f[R] parameter is allowed, but its use is questionable. +A \f[V]NULL\f[R] parameter is allowed, but its use is questionable. .IP \[bu] 2 Calling other JNI functions in the scope of -\f[CB]Get/ReleasePrimitiveArrayCritical\f[R] or -\f[CB]Get/ReleaseStringCritical\f[R] +\f[V]Get/ReleasePrimitiveArrayCritical\f[R] or +\f[V]Get/ReleaseStringCritical\f[R] .PP Expect a performance degradation when this option is used. .RE .TP -.B \f[CB]\-Xcomp\f[R] +\f[V]-Xcomp\f[R] Testing mode to exercise JIT compilers. This option should not be used in production environments. -.RS -.RE .TP -.B \f[CB]\-Xdebug\f[R] +\f[V]-Xdebug\f[R] Does nothing. Provided for backward compatibility. -.RS -.RE .TP -.B \f[CB]\-Xdiag\f[R] +\f[V]-Xdiag\f[R] Shows additional diagnostic messages. -.RS -.RE .TP -.B \f[CB]\-Xint\f[R] -Runs the application in interpreted\-only mode. +\f[V]-Xint\f[R] +Runs the application in interpreted-only mode. Compilation to native code is disabled, and all bytecode is executed by the interpreter. -The performance benefits offered by the just\-in\-time (JIT) compiler +The performance benefits offered by the just-in-time (JIT) compiler aren\[aq]t present in this mode. -.RS -.RE .TP -.B \f[CB]\-Xinternalversion\f[R] +\f[V]-Xinternalversion\f[R] Displays more detailed JVM version information than the -\f[CB]\-version\f[R] option, and then exits. -.RS -.RE +\f[V]-version\f[R] option, and then exits. .TP -.B \f[CB]\-Xlog:\f[R]\f[I]option\f[R] +\f[V]-Xlog:\f[R]\f[I]option\f[R] Configure or enable logging with the Java Virtual Machine (JVM) unified logging framework. See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R]. -.RS -.RE .TP -.B \f[CB]\-Xmixed\f[R] +\f[V]-Xmixed\f[R] Executes all bytecode by the interpreter except for hot methods, which are compiled to native code. On by default. -Use \f[CB]\-Xint\f[R] to switch off. -.RS -.RE +Use \f[V]-Xint\f[R] to switch off. .TP -.B \f[CB]\-Xmn\f[R] \f[I]size\f[R] +\f[V]-Xmn\f[R] \f[I]size\f[R] Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery) in the generational collectors. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The young generation region of the heap is used for new objects. GC is performed in this region more often than in other regions. If the size for the young generation is too small, then a lot of minor @@ -942,33 +882,33 @@ young generation to 256 MB using various units: .IP .nf \f[CB] -\-Xmn256m -\-Xmn262144k -\-Xmn268435456 +-Xmn256m +-Xmn262144k +-Xmn268435456 \f[R] .fi .PP -Instead of the \f[CB]\-Xmn\f[R] option to set both the initial and maximum +Instead of the \f[V]-Xmn\f[R] option to set both the initial and maximum size of the heap for the young generation, you can use -\f[CB]\-XX:NewSize\f[R] to set the initial size and -\f[CB]\-XX:MaxNewSize\f[R] to set the maximum size. +\f[V]-XX:NewSize\f[R] to set the initial size and +\f[V]-XX:MaxNewSize\f[R] to set the maximum size. .RE .TP -.B \f[CB]\-Xms\f[R] \f[I]size\f[R] +\f[V]-Xms\f[R] \f[I]size\f[R] Sets the minimum and the initial size (in bytes) of the heap. This value must be a multiple of 1024 and greater than 1 MB. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The following examples show how to set the size of allocated memory to 6 MB using various units: .RS .IP .nf \f[CB] -\-Xms6291456 -\-Xms6144k -\-Xms6m +-Xms6291456 +-Xms6144k +-Xms6m \f[R] .fi .PP @@ -976,23 +916,23 @@ If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation. The initial size of the heap for the young generation can be set using -the \f[CB]\-Xmn\f[R] option or the \f[CB]\-XX:NewSize\f[R] option. +the \f[V]-Xmn\f[R] option or the \f[V]-XX:NewSize\f[R] option. .PP -Note that the \f[CB]\-XX:InitialHeapSize\f[R] option can also be used to +Note that the \f[V]-XX:InitialHeapSize\f[R] option can also be used to set the initial heap size. -If it appears after \f[CB]\-Xms\f[R] on the command line, then the initial +If it appears after \f[V]-Xms\f[R] on the command line, then the initial heap size gets set to the value specified with -\f[CB]\-XX:InitialHeapSize\f[R]. +\f[V]-XX:InitialHeapSize\f[R]. .RE .TP -.B \f[CB]\-Xmx\f[R] \f[I]size\f[R] +\f[V]-Xmx\f[R] \f[I]size\f[R] Specifies the maximum size (in bytes) of the heap. This value must be a multiple of 1024 and greater than 2 MB. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value is chosen at runtime based on system configuration. -For server deployments, \f[CB]\-Xms\f[R] and \f[CB]\-Xmx\f[R] are often set +For server deployments, \f[V]-Xms\f[R] and \f[V]-Xmx\f[R] are often set to the same value. The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units: @@ -1000,28 +940,26 @@ allocated memory to 80 MB using various units: .IP .nf \f[CB] -\-Xmx83886080 -\-Xmx81920k -\-Xmx80m +-Xmx83886080 +-Xmx81920k +-Xmx80m \f[R] .fi .PP -The \f[CB]\-Xmx\f[R] option is equivalent to \f[CB]\-XX:MaxHeapSize\f[R]. +The \f[V]-Xmx\f[R] option is equivalent to \f[V]-XX:MaxHeapSize\f[R]. .RE .TP -.B \f[CB]\-Xnoclassgc\f[R] +\f[V]-Xnoclassgc\f[R] Disables garbage collection (GC) of classes. This can save some GC time, which shortens interruptions during the application run. -When you specify \f[CB]\-Xnoclassgc\f[R] at startup, the class objects in +When you specify \f[V]-Xnoclassgc\f[R] at startup, the class objects in the application are left untouched during GC and are always be considered live. This can result in more memory being permanently occupied which, if not -used carefully, throws an out\-of\-memory exception. -.RS -.RE +used carefully, throws an out-of-memory exception. .TP -.B \f[CB]\-Xrs\f[R] +\f[V]-Xrs\f[R] Reduces the use of operating system signals by the JVM. Shutdown hooks enable the orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at @@ -1033,15 +971,15 @@ shutdown, even if the JVM terminates abruptly. .IP \[bu] 2 The JVM catches signals to implement shutdown hooks for unexpected termination. -The JVM uses \f[CB]SIGHUP\f[R], \f[CB]SIGINT\f[R], and \f[CB]SIGTERM\f[R] to -initiate the running of shutdown hooks. +The JVM uses \f[V]SIGHUP\f[R], \f[V]SIGINT\f[R], and \f[V]SIGTERM\f[R] +to initiate the running of shutdown hooks. .IP \[bu] 2 Applications embedding the JVM frequently need to trap signals such as -\f[CB]SIGINT\f[R] or \f[CB]SIGTERM\f[R], which can lead to interference with -the JVM signal handlers. -The \f[CB]\-Xrs\f[R] option is available to address this issue. -When \f[CB]\-Xrs\f[R] is used, the signal masks for \f[CB]SIGINT\f[R], -\f[CB]SIGTERM\f[R], \f[CB]SIGHUP\f[R], and \f[CB]SIGQUIT\f[R] aren\[aq]t +\f[V]SIGINT\f[R] or \f[V]SIGTERM\f[R], which can lead to interference +with the JVM signal handlers. +The \f[V]-Xrs\f[R] option is available to address this issue. +When \f[V]-Xrs\f[R] is used, the signal masks for \f[V]SIGINT\f[R], +\f[V]SIGTERM\f[R], \f[V]SIGHUP\f[R], and \f[V]SIGQUIT\f[R] aren\[aq]t changed by the JVM, and signal handlers for these signals aren\[aq]t installed. .RE @@ -1052,119 +990,102 @@ installed. The JVM watches for console control events to implement shutdown hooks for unexpected termination. Specifically, the JVM registers a console control handler that begins -shutdown\-hook processing and returns \f[CB]TRUE\f[R] for -\f[CB]CTRL_C_EVENT\f[R], \f[CB]CTRL_CLOSE_EVENT\f[R], -\f[CB]CTRL_LOGOFF_EVENT\f[R], and \f[CB]CTRL_SHUTDOWN_EVENT\f[R]. +shutdown-hook processing and returns \f[V]TRUE\f[R] for +\f[V]CTRL_C_EVENT\f[R], \f[V]CTRL_CLOSE_EVENT\f[R], +\f[V]CTRL_LOGOFF_EVENT\f[R], and \f[V]CTRL_SHUTDOWN_EVENT\f[R]. .IP \[bu] 2 The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes. -The JVM uses \f[CB]CTRL_BREAK_EVENT\f[R] to perform thread dumps. +The JVM uses \f[V]CTRL_BREAK_EVENT\f[R] to perform thread dumps. .IP \[bu] 2 If the JVM is run as a service (for example, as a servlet engine for a -web server), then it can receive \f[CB]CTRL_LOGOFF_EVENT\f[R] but +web server), then it can receive \f[V]CTRL_LOGOFF_EVENT\f[R] but shouldn\[aq]t initiate shutdown because the operating system doesn\[aq]t actually terminate the process. -To avoid possible interference such as this, the \f[CB]\-Xrs\f[R] option +To avoid possible interference such as this, the \f[V]-Xrs\f[R] option can be used. -When the \f[CB]\-Xrs\f[R] option is used, the JVM doesn\[aq]t install a +When the \f[V]-Xrs\f[R] option is used, the JVM doesn\[aq]t install a console control handler, implying that it doesn\[aq]t watch for or -process \f[CB]CTRL_C_EVENT\f[R], \f[CB]CTRL_CLOSE_EVENT\f[R], -\f[CB]CTRL_LOGOFF_EVENT\f[R], or \f[CB]CTRL_SHUTDOWN_EVENT\f[R]. +process \f[V]CTRL_C_EVENT\f[R], \f[V]CTRL_CLOSE_EVENT\f[R], +\f[V]CTRL_LOGOFF_EVENT\f[R], or \f[V]CTRL_SHUTDOWN_EVENT\f[R]. .RE .PP -There are two consequences of specifying \f[CB]\-Xrs\f[R]: +There are two consequences of specifying \f[V]-Xrs\f[R]: .IP \[bu] 2 -\f[B]Linux and macOS:\f[R] \f[CB]SIGQUIT\f[R] thread dumps aren\[aq]t +\f[B]Linux and macOS:\f[R] \f[V]SIGQUIT\f[R] thread dumps aren\[aq]t available. .IP \[bu] 2 \f[B]Windows:\f[R] Ctrl + Break thread dumps aren\[aq]t available. .PP User code is responsible for causing shutdown hooks to run, for example, -by calling the \f[CB]System.exit()\f[R] when the JVM is to be terminated. +by calling the \f[V]System.exit()\f[R] when the JVM is to be terminated. .RE .TP -.B \f[CB]\-Xshare:\f[R]\f[I]mode\f[R] +\f[V]-Xshare:\f[R]\f[I]mode\f[R] Sets the class data sharing (CDS) mode. .RS .PP Possible \f[I]mode\f[R] arguments for this option include the following: .TP -.B \f[CB]auto\f[R] +\f[V]auto\f[R] Use shared class data if possible (default). -.RS -.RE .TP -.B \f[CB]on\f[R] +\f[V]on\f[R] Require using shared class data, otherwise fail. .RS -.RE -.RS .PP -\f[B]Note:\f[R] The \f[CB]\-Xshare:on\f[R] option is used for testing +\f[B]Note:\f[R] The \f[V]-Xshare:on\f[R] option is used for testing purposes only. -It may cause the VM to unexpectedly exit during start\-up when the CDS +It may cause the VM to unexpectedly exit during start-up when the CDS archive cannot be used (for example, when certain VM parameters are changed, or when a different JDK is used). This option should not be used in production environments. .RE .TP -.B \f[CB]off\f[R] +\f[V]off\f[R] Do not attempt to use shared class data. -.RS -.RE .RE .TP -.B \f[CB]\-XshowSettings\f[R] +\f[V]-XshowSettings\f[R] Shows all settings and then continues. -.RS -.RE .TP -.B \f[CB]\-XshowSettings:\f[R]\f[I]category\f[R] +\f[V]-XshowSettings:\f[R]\f[I]category\f[R] Shows settings and continues. Possible \f[I]category\f[R] arguments for this option include the following: .RS .TP -.B \f[CB]all\f[R] +\f[V]all\f[R] Shows all categories of settings. This is the default value. -.RS -.RE .TP -.B \f[CB]locale\f[R] +\f[V]locale\f[R] Shows settings related to locale. -.RS -.RE .TP -.B \f[CB]properties\f[R] +\f[V]properties\f[R] Shows settings related to system properties. -.RS -.RE .TP -.B \f[CB]vm\f[R] +\f[V]vm\f[R] Shows the settings of the JVM. -.RS -.RE .TP -.B \f[CB]system\f[R] +\f[V]system\f[R] \f[B]Linux:\f[R] Shows host system or container configuration and continues. -.RS -.RE .RE .TP -.B \f[CB]\-Xss\f[R] \f[I]size\f[R] +\f[V]-Xss\f[R] \f[I]size\f[R] Sets the thread stack size (in bytes). -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate KB, \f[CB]m\f[R] or -\f[CB]M\f[R] to indicate MB, or \f[CB]g\f[R] or \f[CB]G\f[R] to indicate GB. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate KB, \f[V]m\f[R] +or \f[V]M\f[R] to indicate MB, or \f[V]g\f[R] or \f[V]G\f[R] to indicate +GB. The actual size may be rounded up to a multiple of the system page size as required by the operating system. The default value depends on the platform: .RS .IP \[bu] 2 -Linux/x64 (64\-bit): 1024 KB +Linux/x64 (64-bit): 1024 KB .IP \[bu] 2 -macOS (64\-bit): 1024 KB +macOS (64-bit): 1024 KB .IP \[bu] 2 Windows: The default value depends on virtual memory .PP @@ -1173,75 +1094,57 @@ units: .IP .nf \f[CB] -\-Xss1m -\-Xss1024k -\-Xss1048576 +-Xss1m +-Xss1024k +-Xss1048576 \f[R] .fi .PP -This option is similar to \f[CB]\-XX:ThreadStackSize\f[R]. +This option is similar to \f[V]-XX:ThreadStackSize\f[R]. .RE .TP -.B \f[CB]\-\-add\-reads\f[R] \f[I]module\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R](\f[CB],\f[R]\f[I]target\-module\f[R])* -Updates \f[I]module\f[R] to read the \f[I]target\-module\f[R], regardless +\f[V]--add-reads\f[R] \f[I]module\f[R]\f[V]=\f[R]\f[I]target-module\f[R](\f[V],\f[R]\f[I]target-module\f[R])* +Updates \f[I]module\f[R] to read the \f[I]target-module\f[R], regardless of the module declaration. -\f[I]target\-module\f[R] can be all unnamed to read all unnamed modules. -.RS -.RE +\f[I]target-module\f[R] can be all unnamed to read all unnamed modules. .TP -.B \f[CB]\-\-add\-exports\f[R] \f[I]module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R](\f[CB],\f[R]\f[I]target\-module\f[R])* +\f[V]--add-exports\f[R] \f[I]module\f[R]\f[V]/\f[R]\f[I]package\f[R]\f[V]=\f[R]\f[I]target-module\f[R](\f[V],\f[R]\f[I]target-module\f[R])* Updates \f[I]module\f[R] to export \f[I]package\f[R] to -\f[I]target\-module\f[R], regardless of module declaration. -The \f[I]target\-module\f[R] can be all unnamed to export to all unnamed +\f[I]target-module\f[R], regardless of module declaration. +The \f[I]target-module\f[R] can be all unnamed to export to all unnamed modules. -.RS -.RE .TP -.B \f[CB]\-\-add\-opens\f[R] \f[I]module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R](\f[CB],\f[R]\f[I]target\-module\f[R])* +\f[V]--add-opens\f[R] \f[I]module\f[R]\f[V]/\f[R]\f[I]package\f[R]\f[V]=\f[R]\f[I]target-module\f[R](\f[V],\f[R]\f[I]target-module\f[R])* Updates \f[I]module\f[R] to open \f[I]package\f[R] to -\f[I]target\-module\f[R], regardless of module declaration. -.RS -.RE +\f[I]target-module\f[R], regardless of module declaration. .TP -.B \f[CB]\-\-limit\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...] +\f[V]--limit-modules\f[R] \f[I]module\f[R][\f[V],\f[R]\f[I]module\f[R]...] Specifies the limit of the universe of observable modules. -.RS -.RE .TP -.B \f[CB]\-\-patch\-module\f[R] \f[I]module\f[R]\f[CB]=\f[R]\f[I]file\f[R](\f[CB];\f[R]\f[I]file\f[R])* +\f[V]--patch-module\f[R] \f[I]module\f[R]\f[V]=\f[R]\f[I]file\f[R](\f[V];\f[R]\f[I]file\f[R])* Overrides or augments a module with classes and resources in JAR files or directories. -.RS -.RE .TP -.B \f[CB]\-\-source\f[R] \f[I]version\f[R] -Sets the version of the source in source\-file mode. -.RS -.RE +\f[V]--source\f[R] \f[I]version\f[R] +Sets the version of the source in source-file mode. .SH EXTRA OPTIONS FOR MACOS .PP The following extra options are macOS specific. .TP -.B \f[CB]\-XstartOnFirstThread\f[R] -Runs the \f[CB]main()\f[R] method on the first (AppKit) thread. -.RS -.RE +\f[V]-XstartOnFirstThread\f[R] +Runs the \f[V]main()\f[R] method on the first (AppKit) thread. .TP -.B \f[CB]\-Xdock:name=\f[R]\f[I]application_name\f[R] +\f[V]-Xdock:name=\f[R]\f[I]application_name\f[R] Overrides the default application name displayed in dock. -.RS -.RE .TP -.B \f[CB]\-Xdock:icon=\f[R]\f[I]path_to_icon_file\f[R] +\f[V]-Xdock:icon=\f[R]\f[I]path_to_icon_file\f[R] Overrides the default icon displayed in dock. -.RS -.RE .SH ADVANCED OPTIONS FOR JAVA .PP -These \f[CB]java\f[R] options can be used to enable other advanced +These \f[V]java\f[R] options can be used to enable other advanced options. .TP -.B \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R] +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R] Unlocks the options intended for diagnosing the JVM. By default, this option is disabled and diagnostic options aren\[aq]t available. @@ -1257,18 +1160,16 @@ It is also possible that any of these options may be removed or their behavior changed without any warning. .RE .TP -.B \f[CB]\-XX:+UnlockExperimentalVMOptions\f[R] +\f[V]-XX:+UnlockExperimentalVMOptions\f[R] Unlocks the options that provide experimental features in the JVM. By default, this option is disabled and experimental features aren\[aq]t available. -.RS -.RE .SH ADVANCED RUNTIME OPTIONS FOR JAVA .PP -These \f[CB]java\f[R] options control the runtime behavior of the Java +These \f[V]java\f[R] options control the runtime behavior of the Java HotSpot VM. .TP -.B \f[CB]\-XX:ActiveProcessorCount=\f[R]\f[I]x\f[R] +\f[V]-XX:ActiveProcessorCount=\f[R]\f[I]x\f[R] Overrides the number of CPUs that the VM will use to calculate the size of thread pools it will use for various operations such as Garbage Collection and ForkJoinPool. @@ -1278,17 +1179,17 @@ The VM normally determines the number of available processors from the operating system. This flag can be useful for partitioning CPU resources when running multiple Java processes in docker containers. -This flag is honored even if \f[CB]UseContainerSupport\f[R] is not +This flag is honored even if \f[V]UseContainerSupport\f[R] is not enabled. -See \f[CB]\-XX:\-UseContainerSupport\f[R] for a description of enabling -and disabling container support. +See \f[V]-XX:-UseContainerSupport\f[R] for a description of enabling and +disabling container support. .RE .TP -.B \f[CB]\-XX:AllocateHeapAt=\f[R]\f[I]path\f[R] +\f[V]-XX:AllocateHeapAt=\f[R]\f[I]path\f[R] Takes a path to the file system and uses memory mapping to allocate the object heap on the memory device. Using this option enables the HotSpot VM to allocate the Java object -heap on an alternative memory device, such as an NV\-DIMM, specified by +heap on an alternative memory device, such as an NV-DIMM, specified by the user. .RS .PP @@ -1298,27 +1199,26 @@ DRAM for the object heap without changing the existing application code. All other memory structures (such as the code heap, metaspace, and thread stacks) continue to reside in DRAM. .PP -Some operating systems expose non\-DRAM memory through the file system. -Memory\-mapped files in these file systems bypass the page cache and +Some operating systems expose non-DRAM memory through the file system. +Memory-mapped files in these file systems bypass the page cache and provide a direct mapping of virtual memory to the physical memory on the device. -The existing heap related flags (such as \f[CB]\-Xmx\f[R] and -\f[CB]\-Xms\f[R]) and garbage\-collection related flags continue to work -as before. +The existing heap related flags (such as \f[V]-Xmx\f[R] and +\f[V]-Xms\f[R]) and garbage-collection related flags continue to work as +before. .RE .TP -.B \f[CB]\-XX:\-CompactStrings\f[R] +\f[V]-XX:-CompactStrings\f[R] Disables the Compact Strings feature. By default, this option is enabled. -When this option is enabled, Java Strings containing only single\-byte +When this option is enabled, Java Strings containing only single-byte characters are internally represented and stored as -single\-byte\-per\-character Strings using ISO\-8859\-1 / Latin\-1 -encoding. +single-byte-per-character Strings using ISO-8859-1 / Latin-1 encoding. This reduces, by 50%, the amount of space required for Strings -containing only single\-byte characters. +containing only single-byte characters. For Java Strings containing at least one multibyte character: these are -represented and stored as 2 bytes per character using UTF\-16 encoding. -Disabling the Compact Strings feature forces the use of UTF\-16 encoding +represented and stored as 2 bytes per character using UTF-16 encoding. +Disabling the Compact Strings feature forces the use of UTF-16 encoding as the internal representation for all Java Strings. .RS .PP @@ -1335,36 +1235,37 @@ Strings introduces the regression In both of these scenarios, disabling Compact Strings makes sense. .RE .TP -.B \f[CB]\-XX:ErrorFile=\f[R]\f[I]filename\f[R] +\f[V]-XX:ErrorFile=\f[R]\f[I]filename\f[R] Specifies the path and file name to which error data is written when an irrecoverable error occurs. By default, this file is created in the current working directory and -named \f[CB]hs_err_pid\f[R]\f[I]pid\f[R]\f[CB]\&.log\f[R] where \f[I]pid\f[R] -is the identifier of the process that encountered the error. +named \f[V]hs_err_pid\f[R]\f[I]pid\f[R]\f[V].log\f[R] where +\f[I]pid\f[R] is the identifier of the process that encountered the +error. .RS .PP The following example shows how to set the default log file (note that -the identifier of the process is specified as \f[CB]%p\f[R]): +the identifier of the process is specified as \f[V]%p\f[R]): .RS .PP -\f[CB]\-XX:ErrorFile=./hs_err_pid%p.log\f[R] +\f[V]-XX:ErrorFile=./hs_err_pid%p.log\f[R] .RE .IP \[bu] 2 \f[B]Linux and macOS:\f[R] The following example shows how to set the -error log to \f[CB]/var/log/java/java_error.log\f[R]: +error log to \f[V]/var/log/java/java_error.log\f[R]: .RS 2 .RS .PP -\f[CB]\-XX:ErrorFile=/var/log/java/java_error.log\f[R] +\f[V]-XX:ErrorFile=/var/log/java/java_error.log\f[R] .RE .RE .IP \[bu] 2 \f[B]Windows:\f[R] The following example shows how to set the error log -file to \f[CB]C:/log/java/java_error.log\f[R]: +file to \f[V]C:/log/java/java_error.log\f[R]: .RS 2 .RS .PP -\f[CB]\-XX:ErrorFile=C:/log/java/java_error.log\f[R] +\f[V]-XX:ErrorFile=C:/log/java/java_error.log\f[R] .RE .RE .PP @@ -1373,117 +1274,97 @@ Otherwise, if the file can\[aq]t be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system: .IP \[bu] 2 -\f[B]Linux and macOS:\f[R] The temporary directory is \f[CB]/tmp\f[R]. +\f[B]Linux and macOS:\f[R] The temporary directory is \f[V]/tmp\f[R]. .IP \[bu] 2 \f[B]Windows:\f[R] The temporary directory is specified by the value of -the \f[CB]TMP\f[R] environment variable; if that environment variable -isn\[aq]t defined, then the value of the \f[CB]TEMP\f[R] environment +the \f[V]TMP\f[R] environment variable; if that environment variable +isn\[aq]t defined, then the value of the \f[V]TEMP\f[R] environment variable is used. .RE .TP -.B \f[CB]\-XX:+ExtensiveErrorReports\f[R] +\f[V]-XX:+ExtensiveErrorReports\f[R] Enables the reporting of more extensive error information in the -\f[CB]ErrorFile\f[R]. +\f[V]ErrorFile\f[R]. This option can be turned on in environments where maximal information -is desired \- even if the resulting logs may be quite large and/or +is desired - even if the resulting logs may be quite large and/or contain information that might be considered sensitive. The information can vary from release to release, and across different platforms. By default this option is disabled. -.RS -.RE .TP -.B \f[CB]\-XX:FlightRecorderOptions=\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] (or) \f[CB]\-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] +\f[V]-XX:FlightRecorderOptions=\f[R]\f[I]parameter\f[R]\f[V]=\f[R]\f[I]value\f[R] (or) \f[V]-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[V]=\f[R]\f[I]value\f[R] Sets the parameters that control the behavior of JFR. .RS .PP The following list contains the available JFR -\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] entries: +\f[I]parameter\f[R]\f[V]=\f[R]\f[I]value\f[R] entries: .TP -.B \f[CB]globalbuffersize=\f[R]\f[I]size\f[R] +\f[V]globalbuffersize=\f[R]\f[I]size\f[R] Specifies the total amount of primary memory used for data retention. The default value is based on the value specified for -\f[CB]memorysize\f[R]. -Change the \f[CB]memorysize\f[R] parameter to alter the size of global +\f[V]memorysize\f[R]. +Change the \f[V]memorysize\f[R] parameter to alter the size of global buffers. -.RS -.RE .TP -.B \f[CB]maxchunksize=\f[R]\f[I]size\f[R] +\f[V]maxchunksize=\f[R]\f[I]size\f[R] Specifies the maximum size (in bytes) of the data chunks in a recording. -Append \f[CB]m\f[R] or \f[CB]M\f[R] to specify the size in megabytes (MB), -or \f[CB]g\f[R] or \f[CB]G\f[R] to specify the size in gigabytes (GB). +Append \f[V]m\f[R] or \f[V]M\f[R] to specify the size in megabytes (MB), +or \f[V]g\f[R] or \f[V]G\f[R] to specify the size in gigabytes (GB). By default, the maximum size of data chunks is set to 12 MB. The minimum allowed is 1 MB. -.RS -.RE .TP -.B \f[CB]memorysize=\f[R]\f[I]size\f[R] +\f[V]memorysize=\f[R]\f[I]size\f[R] Determines how much buffer memory should be used, and sets the -\f[CB]globalbuffersize\f[R] and \f[CB]numglobalbuffers\f[R] parameters based -on the size specified. -Append \f[CB]m\f[R] or \f[CB]M\f[R] to specify the size in megabytes (MB), -or \f[CB]g\f[R] or \f[CB]G\f[R] to specify the size in gigabytes (GB). +\f[V]globalbuffersize\f[R] and \f[V]numglobalbuffers\f[R] parameters +based on the size specified. +Append \f[V]m\f[R] or \f[V]M\f[R] to specify the size in megabytes (MB), +or \f[V]g\f[R] or \f[V]G\f[R] to specify the size in gigabytes (GB). By default, the memory size is set to 10 MB. -.RS -.RE .TP -.B \f[CB]numglobalbuffers\f[R] +\f[V]numglobalbuffers\f[R] Specifies the number of global buffers used. The default value is based on the memory size specified. -Change the \f[CB]memorysize\f[R] parameter to alter the number of global +Change the \f[V]memorysize\f[R] parameter to alter the number of global buffers. -.RS -.RE .TP -.B \f[CB]old\-object\-queue\-size=number\-of\-objects\f[R] +\f[V]old-object-queue-size=number-of-objects\f[R] Maximum number of old objects to track. By default, the number of objects is set to 256. -.RS -.RE .TP -.B \f[CB]repository=\f[R]\f[I]path\f[R] +\f[V]repository=\f[R]\f[I]path\f[R] Specifies the repository (a directory) for temporary disk storage. By default, the system\[aq]s temporary directory is used. -.RS -.RE .TP -.B \f[CB]retransform=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]} +\f[V]retransform=\f[R]{\f[V]true\f[R]|\f[V]false\f[R]} Specifies whether event classes should be retransformed using JVMTI. If false, instrumentation is added when event classes are loaded. By default, this parameter is enabled. -.RS -.RE .TP -.B \f[CB]stackdepth=\f[R]\f[I]depth\f[R] +\f[V]stackdepth=\f[R]\f[I]depth\f[R] Stack depth for stack traces. By default, the depth is set to 64 method calls. The maximum is 2048. Values greater than 64 could create significant overhead and reduce performance. -.RS -.RE .TP -.B \f[CB]threadbuffersize=\f[R]\f[I]size\f[R] -Specifies the per\-thread local buffer size (in bytes). +\f[V]threadbuffersize=\f[R]\f[I]size\f[R] +Specifies the per-thread local buffer size (in bytes). By default, the local buffer size is set to 8 kilobytes, with a minimum value of 4 kilobytes. Overriding this parameter could reduce performance and is not recommended. -.RS -.RE .PP You can specify values for multiple parameters by separating them with a comma. .RE .TP -.B \f[CB]\-XX:LargePageSizeInBytes=\f[R]\f[I]size\f[R] +\f[V]-XX:LargePageSizeInBytes=\f[R]\f[I]size\f[R] Sets the maximum large page size (in bytes) used by the JVM. The \f[I]size\f[R] argument must be a valid page size supported by the environment to have any effect. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. By default, the size is set to 0, meaning that the JVM will use the default large page size for the environment as the maximum size for large pages. @@ -1494,18 +1375,18 @@ The following example describes how to set the large page size to 1 gigabyte (GB): .RS .PP -\f[CB]\-XX:LargePageSizeInBytes=1g\f[R] +\f[V]-XX:LargePageSizeInBytes=1g\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxDirectMemorySize=\f[R]\f[I]size\f[R] -Sets the maximum total size (in bytes) of the \f[CB]java.nio\f[R] package, -direct\-buffer allocations. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +\f[V]-XX:MaxDirectMemorySize=\f[R]\f[I]size\f[R] +Sets the maximum total size (in bytes) of the \f[V]java.nio\f[R] +package, direct-buffer allocations. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. If not set, the flag is ignored and the JVM chooses the size for NIO -direct\-buffer allocations automatically. +direct-buffer allocations automatically. .RS .PP The following examples illustrate how to set the NIO size to 1024 KB in @@ -1513,14 +1394,14 @@ different units: .IP .nf \f[CB] -\-XX:MaxDirectMemorySize=1m -\-XX:MaxDirectMemorySize=1024k -\-XX:MaxDirectMemorySize=1048576 +-XX:MaxDirectMemorySize=1m +-XX:MaxDirectMemorySize=1024k +-XX:MaxDirectMemorySize=1048576 \f[R] .fi .RE .TP -.B \f[CB]\-XX:\-MaxFDLimit\f[R] +\f[V]-XX:-MaxFDLimit\f[R] Disables the attempt to set the soft limit for the number of open file descriptors to the hard limit. By default, this option is enabled on all platforms, but is ignored on @@ -1528,61 +1409,53 @@ Windows. The only time that you may need to disable this is on Mac OS, where its use imposes a maximum of 10240, which is lower than the actual system maximum. -.RS -.RE .TP -.B \f[CB]\-XX:NativeMemoryTracking=\f[R]\f[I]mode\f[R] +\f[V]-XX:NativeMemoryTracking=\f[R]\f[I]mode\f[R] Specifies the mode for tracking JVM native memory usage. Possible \f[I]mode\f[R] arguments for this option include the following: .RS .TP -.B \f[CB]off\f[R] +\f[V]off\f[R] Instructs not to track JVM native memory usage. This is the default behavior if you don\[aq]t specify the -\f[CB]\-XX:NativeMemoryTracking\f[R] option. -.RS -.RE +\f[V]-XX:NativeMemoryTracking\f[R] option. .TP -.B \f[CB]summary\f[R] +\f[V]summary\f[R] Tracks memory usage only by JVM subsystems, such as Java heap, class, code, and thread. -.RS -.RE .TP -.B \f[CB]detail\f[R] +\f[V]detail\f[R] In addition to tracking memory usage by JVM subsystems, track memory -usage by individual \f[CB]CallSite\f[R], individual virtual memory region +usage by individual \f[V]CallSite\f[R], individual virtual memory region and its committed regions. -.RS -.RE .RE .TP -.B \f[CB]\-XX:+NeverActAsServerClassMachine\f[R] -Enable the "Client VM emulation" mode which only uses the C1 JIT +\f[V]-XX:+NeverActAsServerClassMachine\f[R] +Enable the \[dq]Client VM emulation\[dq] mode which only uses the C1 JIT compiler, a 32Mb CodeCache and the Serial GC. The maximum amount of memory that the JVM may use (controlled by the -\f[CB]\-XX:MaxRAM=n\f[R] flag) is set to 1GB by default. -The string "emulated\-client" is added to the JVM version string. +\f[V]-XX:MaxRAM=n\f[R] flag) is set to 1GB by default. +The string \[dq]emulated-client\[dq] is added to the JVM version string. .RS .PP -By default the flag is set to \f[CB]true\f[R] only on Windows in 32\-bit -mode and \f[CB]false\f[R] in all other cases. +By default the flag is set to \f[V]true\f[R] only on Windows in 32-bit +mode and \f[V]false\f[R] in all other cases. .PP -The "Client VM emulation" mode will not be enabled if any of the +The \[dq]Client VM emulation\[dq] mode will not be enabled if any of the following flags are used on the command line: .IP .nf \f[CB] -\-XX:{+|\-}TieredCompilation -\-XX:CompilationMode=mode -\-XX:TieredStopAtLevel=n -\-XX:{+|\-}EnableJVMCI -\-XX:{+|\-}UseJVMCICompiler +-XX:{+|-}TieredCompilation +-XX:CompilationMode=mode +-XX:TieredStopAtLevel=n +-XX:{+|-}EnableJVMCI +-XX:{+|-}UseJVMCICompiler \f[R] .fi .RE .TP -.B \f[CB]\-XX:ObjectAlignmentInBytes=\f[R]\f[I]alignment\f[R] +\f[V]-XX:ObjectAlignmentInBytes=\f[R]\f[I]alignment\f[R] Sets the memory alignment of Java objects (in bytes). By default, the value is set to 8 bytes. The specified value should be a power of 2, and must be within the range @@ -1594,7 +1467,7 @@ heap sizes. The heap size limit in bytes is calculated as: .RS .PP -\f[CB]4GB\ *\ ObjectAlignmentInBytes\f[R] +\f[V]4GB * ObjectAlignmentInBytes\f[R] .RE .RS .PP @@ -1605,97 +1478,87 @@ pointers with large Java heap sizes. .RE .RE .TP -.B \f[CB]\-XX:OnError=\f[R]\f[I]string\f[R] -Sets a custom command or a series of semicolon\-separated commands to -run when an irrecoverable error occurs. +\f[V]-XX:OnError=\f[R]\f[I]string\f[R] +Sets a custom command or a series of semicolon-separated commands to run +when an irrecoverable error occurs. If the string contains spaces, then it must be enclosed in quotation marks. .RS .IP \[bu] 2 \f[B]Linux and macOS:\f[R] The following example shows how the -\f[CB]\-XX:OnError\f[R] option can be used to run the \f[CB]gcore\f[R] -command to create a core image, and start the \f[CB]gdb\f[R] debugger to -attach to the process in case of an irrecoverable error (the \f[CB]%p\f[R] -designates the current process identifier): +\f[V]-XX:OnError\f[R] option can be used to run the \f[V]gcore\f[R] +command to create a core image, and start the \f[V]gdb\f[R] debugger to +attach to the process in case of an irrecoverable error (the +\f[V]%p\f[R] designates the current process identifier): .RS 2 .RS .PP -\f[CB]\-XX:OnError="gcore\ %p;gdb\ \-p\ %p"\f[R] +\f[V]-XX:OnError=\[dq]gcore %p;gdb -p %p\[dq]\f[R] .RE .RE .IP \[bu] 2 \f[B]Windows:\f[R] The following example shows how the -\f[CB]\-XX:OnError\f[R] option can be used to run the -\f[CB]userdump.exe\f[R] utility to obtain a crash dump in case of an -irrecoverable error (the \f[CB]%p\f[R] designates the current process +\f[V]-XX:OnError\f[R] option can be used to run the +\f[V]userdump.exe\f[R] utility to obtain a crash dump in case of an +irrecoverable error (the \f[V]%p\f[R] designates the current process identifier). -This example assumes that the path to the \f[CB]userdump.exe\f[R] utility -is specified in the \f[CB]PATH\f[R] environment variable: +This example assumes that the path to the \f[V]userdump.exe\f[R] utility +is specified in the \f[V]PATH\f[R] environment variable: .RS 2 .RS .PP -\f[CB]\-XX:OnError="userdump.exe\ %p"\f[R] +\f[V]-XX:OnError=\[dq]userdump.exe %p\[dq]\f[R] .RE .RE .RE .TP -.B \f[CB]\-XX:OnOutOfMemoryError=\f[R]\f[I]string\f[R] -Sets a custom command or a series of semicolon\-separated commands to -run when an \f[CB]OutOfMemoryError\f[R] exception is first thrown. +\f[V]-XX:OnOutOfMemoryError=\f[R]\f[I]string\f[R] +Sets a custom command or a series of semicolon-separated commands to run +when an \f[V]OutOfMemoryError\f[R] exception is first thrown. If the string contains spaces, then it must be enclosed in quotation marks. For an example of a command string, see the description of the -\f[CB]\-XX:OnError\f[R] option. -.RS -.RE +\f[V]-XX:OnError\f[R] option. .TP -.B \f[CB]\-XX:+PrintCommandLineFlags\f[R] +\f[V]-XX:+PrintCommandLineFlags\f[R] Enables printing of ergonomically selected JVM flags that appeared on the command line. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector. By default, this option is disabled and flags aren\[aq]t printed. -.RS -.RE .TP -.B \f[CB]\-XX:+PreserveFramePointer\f[R] +\f[V]-XX:+PreserveFramePointer\f[R] Selects between using the RBP register as a general purpose register -(\f[CB]\-XX:\-PreserveFramePointer\f[R]) and using the RBP register to -hold the frame pointer of the currently executing method -(\f[CB]\-XX:+PreserveFramePointer\f[R] . +(\f[V]-XX:-PreserveFramePointer\f[R]) and using the RBP register to hold +the frame pointer of the currently executing method +(\f[V]-XX:+PreserveFramePointer\f[R] . If the frame pointer is available, then external profiling tools (for example, Linux perf) can construct more accurate stack traces. -.RS -.RE .TP -.B \f[CB]\-XX:+PrintNMTStatistics\f[R] +\f[V]-XX:+PrintNMTStatistics\f[R] Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see -\f[CB]\-XX:NativeMemoryTracking\f[R]). +\f[V]-XX:NativeMemoryTracking\f[R]). By default, this option is disabled and native memory tracking data isn\[aq]t printed. -.RS -.RE .TP -.B \f[CB]\-XX:SharedArchiveFile=\f[R]\f[I]path\f[R] +\f[V]-XX:SharedArchiveFile=\f[R]\f[I]path\f[R] Specifies the path and name of the class data sharing (CDS) archive file .RS .PP See \f[B]Application Class Data Sharing\f[R]. .RE .TP -.B \f[CB]\-XX:SharedArchiveConfigFile=\f[R]\f[I]shared_config_file\f[R] +\f[V]-XX:SharedArchiveConfigFile=\f[R]\f[I]shared_config_file\f[R] Specifies additional shared data added to the archive file. -.RS -.RE .TP -.B \f[CB]\-XX:SharedClassListFile=\f[R]\f[I]file_name\f[R] +\f[V]-XX:SharedClassListFile=\f[R]\f[I]file_name\f[R] Specifies the text file that contains the names of the classes to store in the class data sharing (CDS) archive. This file contains the full name of one class per line, except slashes -(\f[CB]/\f[R]) replace dots (\f[CB]\&.\f[R]). -For example, to specify the classes \f[CB]java.lang.Object\f[R] and -\f[CB]hello.Main\f[R], create a text file that contains the following two +(\f[V]/\f[R]) replace dots (\f[V].\f[R]). +For example, to specify the classes \f[V]java.lang.Object\f[R] and +\f[V]hello.Main\f[R], create a text file that contains the following two lines: .RS .IP @@ -1714,135 +1577,117 @@ bootstrap class paths. See \f[B]Application Class Data Sharing\f[R]. .RE .TP -.B \f[CB]\-XX:+ShowCodeDetailsInExceptionMessages\f[R] -Enables printing of improved \f[CB]NullPointerException\f[R] messages. -When an application throws a \f[CB]NullPointerException\f[R], the option +\f[V]-XX:+ShowCodeDetailsInExceptionMessages\f[R] +Enables printing of improved \f[V]NullPointerException\f[R] messages. +When an application throws a \f[V]NullPointerException\f[R], the option enables the JVM to analyze the program\[aq]s bytecode instructions to -determine precisely which reference is \f[CB]null\f[R], and describes the -source with a null\-detail message. -The null\-detail message is calculated and returned by -\f[CB]NullPointerException.getMessage()\f[R], and will be printed as the +determine precisely which reference is \f[V]null\f[R], and describes the +source with a null-detail message. +The null-detail message is calculated and returned by +\f[V]NullPointerException.getMessage()\f[R], and will be printed as the exception message along with the method, filename, and line number. By default, this option is enabled. -.RS -.RE .TP -.B \f[CB]\-XX:+ShowMessageBoxOnError\f[R] +\f[V]-XX:+ShowMessageBoxOnError\f[R] Enables the display of a dialog box when the JVM experiences an irrecoverable error. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error. By default, this option is disabled. -.RS -.RE .TP -.B \f[CB]\-XX:StartFlightRecording=\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] +\f[V]-XX:StartFlightRecording=\f[R]\f[I]parameter\f[R]\f[V]=\f[R]\f[I]value\f[R] Starts a JFR recording for the Java application. -This option is equivalent to the \f[CB]JFR.start\f[R] diagnostic command +This option is equivalent to the \f[V]JFR.start\f[R] diagnostic command that starts a recording during runtime. -You can set the following \f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] +You can set the following \f[I]parameter\f[R]\f[V]=\f[R]\f[I]value\f[R] entries when starting a JFR recording: .RS .TP -.B \f[CB]delay=\f[R]\f[I]time\f[R] +\f[V]delay=\f[R]\f[I]time\f[R] Specifies the delay between the Java application launch time and the start of the recording. -Append \f[CB]s\f[R] to specify the time in seconds, \f[CB]m\f[R] for -minutes, \f[CB]h\f[R] for hours, or \f[CB]d\f[R] for days (for example, -specifying \f[CB]10m\f[R] means 10 minutes). +Append \f[V]s\f[R] to specify the time in seconds, \f[V]m\f[R] for +minutes, \f[V]h\f[R] for hours, or \f[V]d\f[R] for days (for example, +specifying \f[V]10m\f[R] means 10 minutes). By default, there\[aq]s no delay, and this parameter is set to 0. -.RS -.RE .TP -.B \f[CB]disk=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]} +\f[V]disk=\f[R]{\f[V]true\f[R]|\f[V]false\f[R]} Specifies whether to write data to disk while recording. By default, this parameter is enabled. -.RS -.RE .TP -.B \f[CB]dumponexit=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]} +\f[V]dumponexit=\f[R]{\f[V]true\f[R]|\f[V]false\f[R]} Specifies if the running recording is dumped when the JVM shuts down. -If enabled and a \f[CB]filename\f[R] is not entered, the recording is +If enabled and a \f[V]filename\f[R] is not entered, the recording is written to a file in the directory where the process was started. -The file name is a system\-generated name that contains the process ID, +The file name is a system-generated name that contains the process ID, recording ID, and current timestamp, similar to -\f[CB]hotspot\-pid\-47496\-id\-1\-2018_01_25_19_10_41.jfr\f[R]. +\f[V]hotspot-pid-47496-id-1-2018_01_25_19_10_41.jfr\f[R]. By default, this parameter is disabled. -.RS -.RE .TP -.B \f[CB]duration=\f[R]\f[I]time\f[R] +\f[V]duration=\f[R]\f[I]time\f[R] Specifies the duration of the recording. -Append \f[CB]s\f[R] to specify the time in seconds, \f[CB]m\f[R] for -minutes, \f[CB]h\f[R] for hours, or \f[CB]d\f[R] for days (for example, -specifying \f[CB]5h\f[R] means 5 hours). +Append \f[V]s\f[R] to specify the time in seconds, \f[V]m\f[R] for +minutes, \f[V]h\f[R] for hours, or \f[V]d\f[R] for days (for example, +specifying \f[V]5h\f[R] means 5 hours). By default, the duration isn\[aq]t limited, and this parameter is set to 0. -.RS -.RE .TP -.B \f[CB]filename=\f[R]\f[I]path\f[R] +\f[V]filename=\f[R]\f[I]path\f[R] Specifies the path and name of the file to which the recording is written when the recording is stopped, for example: .RS .IP \[bu] 2 -\f[CB]recording.jfr\f[R] +\f[V]recording.jfr\f[R] .IP \[bu] 2 -\f[CB]/home/user/recordings/recording.jfr\f[R] +\f[V]/home/user/recordings/recording.jfr\f[R] .IP \[bu] 2 -\f[CB]c:\\recordings\\recording.jfr\f[R] +\f[V]c:\[rs]recordings\[rs]recording.jfr\f[R] .RE .TP -.B \f[CB]name=\f[R]\f[I]identifier\f[R] +\f[V]name=\f[R]\f[I]identifier\f[R] Takes both the name and the identifier of a recording. -.RS -.RE .TP -.B \f[CB]maxage=\f[R]\f[I]time\f[R] +\f[V]maxage=\f[R]\f[I]time\f[R] Specifies the maximum age of disk data to keep for the recording. -This parameter is valid only when the \f[CB]disk\f[R] parameter is set to -\f[CB]true\f[R]. -Append \f[CB]s\f[R] to specify the time in seconds, \f[CB]m\f[R] for -minutes, \f[CB]h\f[R] for hours, or \f[CB]d\f[R] for days (for example, -specifying \f[CB]30s\f[R] means 30 seconds). +This parameter is valid only when the \f[V]disk\f[R] parameter is set to +\f[V]true\f[R]. +Append \f[V]s\f[R] to specify the time in seconds, \f[V]m\f[R] for +minutes, \f[V]h\f[R] for hours, or \f[V]d\f[R] for days (for example, +specifying \f[V]30s\f[R] means 30 seconds). By default, the maximum age isn\[aq]t limited, and this parameter is set -to \f[CB]0s\f[R]. -.RS -.RE +to \f[V]0s\f[R]. .TP -.B \f[CB]maxsize=\f[R]\f[I]size\f[R] +\f[V]maxsize=\f[R]\f[I]size\f[R] Specifies the maximum size (in bytes) of disk data to keep for the recording. -This parameter is valid only when the \f[CB]disk\f[R] parameter is set to -\f[CB]true\f[R]. -The value must not be less than the value for the \f[CB]maxchunksize\f[R] -parameter set with \f[CB]\-XX:FlightRecorderOptions\f[R]. -Append \f[CB]m\f[R] or \f[CB]M\f[R] to specify the size in megabytes, or -\f[CB]g\f[R] or \f[CB]G\f[R] to specify the size in gigabytes. +This parameter is valid only when the \f[V]disk\f[R] parameter is set to +\f[V]true\f[R]. +The value must not be less than the value for the \f[V]maxchunksize\f[R] +parameter set with \f[V]-XX:FlightRecorderOptions\f[R]. +Append \f[V]m\f[R] or \f[V]M\f[R] to specify the size in megabytes, or +\f[V]g\f[R] or \f[V]G\f[R] to specify the size in gigabytes. By default, the maximum size of disk data isn\[aq]t limited, and this -parameter is set to \f[CB]0\f[R]. -.RS -.RE +parameter is set to \f[V]0\f[R]. .TP -.B \f[CB]path\-to\-gc\-roots=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]} +\f[V]path-to-gc-roots=\f[R]{\f[V]true\f[R]|\f[V]false\f[R]} Specifies whether to collect the path to garbage collection (GC) roots at the end of a recording. By default, this parameter is disabled. .RS .PP The path to GC roots is useful for finding memory leaks, but collecting -it is time\-consuming. +it is time-consuming. Enable this option only when you start a recording for an application that you suspect has a memory leak. -If the \f[CB]settings\f[R] parameter is set to \f[CB]profile\f[R], the stack -trace from where the potential leaking object was allocated is included -in the information collected. +If the \f[V]settings\f[R] parameter is set to \f[V]profile\f[R], the +stack trace from where the potential leaking object was allocated is +included in the information collected. .RE .TP -.B \f[CB]settings=\f[R]\f[I]path\f[R] +\f[V]settings=\f[R]\f[I]path\f[R] Specifies the path and name of the event settings file (of type JFC). -By default, the \f[CB]default.jfc\f[R] file is used, which is located in -\f[CB]JAVA_HOME/lib/jfr\f[R]. +By default, the \f[V]default.jfc\f[R] file is used, which is located in +\f[V]JAVA_HOME/lib/jfr\f[R]. This default settings file collects a predefined set of information with low overhead, so it has minimal impact on performance and can be used with recordings that run continuously. @@ -1860,18 +1705,14 @@ comma. Event settings and .jfc options can be specified using the following syntax: .TP -.B \f[CB]option=\f[R]\f[I]value\f[R] +\f[V]option=\f[R]\f[I]value\f[R] Specifies the option value to modify. -To list available options, use the \f[CB]JAVA_HOME\f[R]/bin/jfr tool. -.RS -.RE +To list available options, use the \f[V]JAVA_HOME\f[R]/bin/jfr tool. .TP -.B \f[CB]event\-setting=\f[R]\f[I]value\f[R] +\f[V]event-setting=\f[R]\f[I]value\f[R] Specifies the event setting value to modify. -Use the form: \f[CB]#=\f[R]. +Use the form: \f[V]#=\f[R]. To add a new event setting, prefix the event name with \[aq]+\[aq]. -.RS -.RE .PP You can specify values for multiple event settings and .jfc options by separating them with a comma. @@ -1883,17 +1724,17 @@ For more information about the settings syntax, see Javadoc of the jdk.jfr package. .RE .TP -.B \f[CB]\-XX:ThreadStackSize=\f[R]\f[I]size\f[R] +\f[V]-XX:ThreadStackSize=\f[R]\f[I]size\f[R] Sets the Java thread stack size (in kilobytes). -Use of a scaling suffix, such as \f[CB]k\f[R], results in the scaling of -the kilobytes value so that \f[CB]\-XX:ThreadStackSize=1k\f[R] sets the +Use of a scaling suffix, such as \f[V]k\f[R], results in the scaling of +the kilobytes value so that \f[V]-XX:ThreadStackSize=1k\f[R] sets the Java thread stack size to 1024*1024 bytes or 1 megabyte. The default value depends on the platform: .RS .IP \[bu] 2 -Linux/x64 (64\-bit): 1024 KB +Linux/x64 (64-bit): 1024 KB .IP \[bu] 2 -macOS (64\-bit): 1024 KB +macOS (64-bit): 1024 KB .IP \[bu] 2 Windows: The default value depends on virtual memory .PP @@ -1902,15 +1743,15 @@ megabyte in different units: .IP .nf \f[CB] -\-XX:ThreadStackSize=1k -\-XX:ThreadStackSize=1024 +-XX:ThreadStackSize=1k +-XX:ThreadStackSize=1024 \f[R] .fi .PP -This option is similar to \f[CB]\-Xss\f[R]. +This option is similar to \f[V]-Xss\f[R]. .RE .TP -.B \f[CB]\-XX:\-UseCompressedOops\f[R] +\f[V]-XX:-UseCompressedOops\f[R] Disables the use of compressed pointers. By default, this option is enabled, and compressed pointers are used. This will automatically limit the maximum ergonomically determined Java @@ -1920,50 +1761,50 @@ By default this range is 32 GB. .RS .PP With compressed oops enabled, object references are represented as -32\-bit offsets instead of 64\-bit pointers, which typically increases +32-bit offsets instead of 64-bit pointers, which typically increases performance when running the application with Java heap sizes smaller than the compressed oops pointer range. -This option works only for 64\-bit JVMs. +This option works only for 64-bit JVMs. .PP It\[aq]s possible to use compressed pointers with Java heap sizes greater than 32 GB. -See the \f[CB]\-XX:ObjectAlignmentInBytes\f[R] option. +See the \f[V]-XX:ObjectAlignmentInBytes\f[R] option. .RE .TP -.B \f[CB]\-XX:\-UseContainerSupport\f[R] +\f[V]-XX:-UseContainerSupport\f[R] The VM now provides automatic container detection support, which allows the VM to determine the amount of memory and number of processors that are available to a Java process running in docker containers. It uses this information to allocate system resources. This support is only available on Linux x64 platforms. -If supported, the default for this flag is \f[CB]true\f[R], and container +If supported, the default for this flag is \f[V]true\f[R], and container support is enabled by default. -It can be disabled with \f[CB]\-XX:\-UseContainerSupport\f[R]. +It can be disabled with \f[V]-XX:-UseContainerSupport\f[R]. .RS .PP Unified Logging is available to help to diagnose issues related to this support. .PP -Use \f[CB]\-Xlog:os+container=trace\f[R] for maximum logging of container +Use \f[V]-Xlog:os+container=trace\f[R] for maximum logging of container information. -See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R] for a -description of using Unified Logging. +See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R] for +a description of using Unified Logging. .RE .TP -.B \f[CB]\-XX:+UseHugeTLBFS\f[R] +\f[V]-XX:+UseHugeTLBFS\f[R] \f[B]Linux only:\f[R] This option is the equivalent of specifying -\f[CB]\-XX:+UseLargePages\f[R]. +\f[V]-XX:+UseLargePages\f[R]. This option is disabled by default. -This option pre\-allocates all large pages up\-front, when memory is +This option pre-allocates all large pages up-front, when memory is reserved; consequently the JVM can\[aq]t dynamically grow or shrink -large pages memory areas; see \f[CB]\-XX:UseTransparentHugePages\f[R] if +large pages memory areas; see \f[V]-XX:UseTransparentHugePages\f[R] if you want this behavior. .RS .PP See \f[B]Large Pages\f[R]. .RE .TP -.B \f[CB]\-XX:+UseLargePages\f[R] +\f[V]-XX:+UseLargePages\f[R] Enables the use of large page memory. By default, this option is disabled and large page memory isn\[aq]t used. @@ -1972,32 +1813,26 @@ used. See \f[B]Large Pages\f[R]. .RE .TP -.B \f[CB]\-XX:+UseTransparentHugePages\f[R] -\f[B]Linux only:\f[R] Enables the use of large pages that can dynamically -grow or shrink. +\f[V]-XX:+UseTransparentHugePages\f[R] +\f[B]Linux only:\f[R] Enables the use of large pages that can +dynamically grow or shrink. This option is disabled by default. You may encounter performance problems with transparent huge pages as the OS moves other pages around to create huge pages; this option is made available for experimentation. -.RS -.RE .TP -.B \f[CB]\-XX:+AllowUserSignalHandlers\f[R] +\f[V]-XX:+AllowUserSignalHandlers\f[R] Enables installation of signal handlers by the application. By default, this option is disabled and the application isn\[aq]t allowed to install signal handlers. -.RS -.RE .TP -.B \f[CB]\-XX:VMOptionsFile=\f[R]\f[I]filename\f[R] +\f[V]-XX:VMOptionsFile=\f[R]\f[I]filename\f[R] Allows user to specify VM options in a file, for example, -\f[CB]java\ \-XX:VMOptionsFile=/var/my_vm_options\ HelloWorld\f[R]. -.RS -.RE +\f[V]java -XX:VMOptionsFile=/var/my_vm_options HelloWorld\f[R]. .TP -.B \f[CB]\-XX:UseBranchProtection=\f[R]\f[I]mode\f[R] +\f[V]-XX:UseBranchProtection=\f[R]\f[I]mode\f[R] \f[B]Linux AArch64 only:\f[R] Specifies the branch protection mode. -All options other than \f[CB]none\f[R] require the VM to have been built +All options other than \f[V]none\f[R] require the VM to have been built with branch protection enabled. In addition, for full protection, any native libraries provided by applications should be compiled with the same level of protection. @@ -2005,40 +1840,34 @@ applications should be compiled with the same level of protection. .PP Possible \f[I]mode\f[R] arguments for this option include the following: .TP -.B \f[CB]none\f[R] +\f[V]none\f[R] Do not use branch protection. This is the default value. -.RS -.RE .TP -.B \f[CB]standard\f[R] +\f[V]standard\f[R] Enables all branch protection modes available on the current platform. -.RS -.RE .TP -.B \f[CB]pac\-ret\f[R] +\f[V]pac-ret\f[R] Enables protection against ROP based attacks. (AArch64 8.3+ only) -.RS -.RE .RE .SH ADVANCED JIT COMPILER OPTIONS FOR JAVA .PP -These \f[CB]java\f[R] options control the dynamic just\-in\-time (JIT) +These \f[V]java\f[R] options control the dynamic just-in-time (JIT) compilation performed by the Java HotSpot VM. .TP -.B \f[CB]\-XX:AllocateInstancePrefetchLines=\f[R]\f[I]lines\f[R] +\f[V]-XX:AllocateInstancePrefetchLines=\f[R]\f[I]lines\f[R] Sets the number of lines to prefetch ahead of the instance allocation pointer. By default, the number of lines to prefetch is set to 1: .RS .RS .PP -\f[CB]\-XX:AllocateInstancePrefetchLines=1\f[R] +\f[V]-XX:AllocateInstancePrefetchLines=1\f[R] .RE .RE .TP -.B \f[CB]\-XX:AllocatePrefetchDistance=\f[R]\f[I]size\f[R] +\f[V]-XX:AllocatePrefetchDistance=\f[R]\f[I]size\f[R] Sets the size (in bytes) of the prefetch distance for object allocation. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated @@ -2049,20 +1878,20 @@ Each Java thread has its own allocation point. Negative values denote that prefetch distance is chosen based on the platform. Positive values are bytes to prefetch. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. -The default value is set to \-1. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. +The default value is set to -1. .PP The following example shows how to set the prefetch distance to 1024 bytes: .RS .PP -\f[CB]\-XX:AllocatePrefetchDistance=1024\f[R] +\f[V]-XX:AllocatePrefetchDistance=1024\f[R] .RE .RE .TP -.B \f[CB]\-XX:AllocatePrefetchInstr=\f[R]\f[I]instruction\f[R] +\f[V]-XX:AllocatePrefetchInstr=\f[R]\f[I]instruction\f[R] Sets the prefetch instruction to prefetch ahead of the allocation pointer. Possible values are from 0 to 3. @@ -2071,11 +1900,11 @@ By default, the prefetch instruction is set to 0: .RS .RS .PP -\f[CB]\-XX:AllocatePrefetchInstr=0\f[R] +\f[V]-XX:AllocatePrefetchInstr=0\f[R] .RE .RE .TP -.B \f[CB]\-XX:AllocatePrefetchLines=\f[R]\f[I]lines\f[R] +\f[V]-XX:AllocatePrefetchLines=\f[R]\f[I]lines\f[R] Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code. The default value is 1 if the last allocated object was an instance, and @@ -2086,61 +1915,51 @@ The following example shows how to set the number of loaded cache lines to 5: .RS .PP -\f[CB]\-XX:AllocatePrefetchLines=5\f[R] +\f[V]-XX:AllocatePrefetchLines=5\f[R] .RE .RE .TP -.B \f[CB]\-XX:AllocatePrefetchStepSize=\f[R]\f[I]size\f[R] +\f[V]-XX:AllocatePrefetchStepSize=\f[R]\f[I]size\f[R] Sets the step size (in bytes) for sequential prefetch instructions. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, \f[CB]g\f[R] or \f[CB]G\f[R] -to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. By default, the step size is set to 16 bytes: .RS .RS .PP -\f[CB]\-XX:AllocatePrefetchStepSize=16\f[R] +\f[V]-XX:AllocatePrefetchStepSize=16\f[R] .RE .RE .TP -.B \f[CB]\-XX:AllocatePrefetchStyle=\f[R]\f[I]style\f[R] +\f[V]-XX:AllocatePrefetchStyle=\f[R]\f[I]style\f[R] Sets the generated code style for prefetch instructions. The \f[I]style\f[R] argument is an integer from 0 to 3: .RS .TP -.B \f[CB]0\f[R] +\f[V]0\f[R] Don\[aq]t generate prefetch instructions. -.RS -.RE .TP -.B \f[CB]1\f[R] +\f[V]1\f[R] Execute prefetch instructions after each allocation. This is the default setting. -.RS -.RE .TP -.B \f[CB]2\f[R] -Use the thread\-local allocation block (TLAB) watermark pointer to +\f[V]2\f[R] +Use the thread-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed. -.RS -.RE .TP -.B \f[CB]3\f[R] +\f[V]3\f[R] Generate one prefetch instruction per cache line. -.RS -.RE .RE .TP -.B \f[CB]\-XX:+BackgroundCompilation\f[R] +\f[V]-XX:+BackgroundCompilation\f[R] Enables background compilation. This option is enabled by default. To disable background compilation, specify -\f[CB]\-XX:\-BackgroundCompilation\f[R] (this is equivalent to specifying -\f[CB]\-Xbatch\f[R]). -.RS -.RE +\f[V]-XX:-BackgroundCompilation\f[R] (this is equivalent to specifying +\f[V]-Xbatch\f[R]). .TP -.B \f[CB]\-XX:CICompilerCount=\f[R]\f[I]threads\f[R] +\f[V]-XX:CICompilerCount=\f[R]\f[I]threads\f[R] Sets the number of compiler threads to use for compilation. By default, the number of compiler threads is selected automatically depending on the number of CPUs and memory available for compiled code. @@ -2148,35 +1967,33 @@ The following example shows how to set the number of threads to 2: .RS .RS .PP -\f[CB]\-XX:CICompilerCount=2\f[R] +\f[V]-XX:CICompilerCount=2\f[R] .RE .RE .TP -.B \f[CB]\-XX:+UseDynamicNumberOfCompilerThreads\f[R] +\f[V]-XX:+UseDynamicNumberOfCompilerThreads\f[R] Dynamically create compiler thread up to the limit specified by -\f[CB]\-XX:CICompilerCount\f[R]. +\f[V]-XX:CICompilerCount\f[R]. This option is enabled by default. -.RS -.RE .TP -.B \f[CB]\-XX:CompileCommand=\f[R]\f[I]command\f[R]\f[CB],\f[R]\f[I]method\f[R][\f[CB],\f[R]\f[I]option\f[R]] +\f[V]-XX:CompileCommand=\f[R]\f[I]command\f[R]\f[V],\f[R]\f[I]method\f[R][\f[V],\f[R]\f[I]option\f[R]] Specifies a \f[I]command\f[R] to perform on a \f[I]method\f[R]. -For example, to exclude the \f[CB]indexOf()\f[R] method of the -\f[CB]String\f[R] class from being compiled, use the following: +For example, to exclude the \f[V]indexOf()\f[R] method of the +\f[V]String\f[R] class from being compiled, use the following: .RS .RS .PP -\f[CB]\-XX:CompileCommand=exclude,java/lang/String.indexOf\f[R] +\f[V]-XX:CompileCommand=exclude,java/lang/String.indexOf\f[R] .RE .PP Note that the full class name is specified, including all packages and -subpackages separated by a slash (\f[CB]/\f[R]). -For easier cut\-and\-paste operations, it\[aq]s also possible to use the -method name format produced by the \f[CB]\-XX:+PrintCompilation\f[R] and -\f[CB]\-XX:+LogCompilation\f[R] options: +subpackages separated by a slash (\f[V]/\f[R]). +For easier cut-and-paste operations, it\[aq]s also possible to use the +method name format produced by the \f[V]-XX:+PrintCompilation\f[R] and +\f[V]-XX:+LogCompilation\f[R] options: .RS .PP -\f[CB]\-XX:CompileCommand=exclude,java.lang.String::indexOf\f[R] +\f[V]-XX:CompileCommand=exclude,java.lang.String::indexOf\f[R] .RE .PP If the method is specified without the signature, then the command is @@ -2185,188 +2002,173 @@ However, you can also specify the signature of the method in the class file format. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as a command end. -For example, if you want to exclude only the \f[CB]indexOf(String)\f[R] -method of the \f[CB]String\f[R] class from being compiled, use the +For example, if you want to exclude only the \f[V]indexOf(String)\f[R] +method of the \f[V]String\f[R] class from being compiled, use the following: .RS .PP -\f[CB]\-XX:CompileCommand="exclude,java/lang/String.indexOf,(Ljava/lang/String;)I"\f[R] +\f[V]-XX:CompileCommand=\[dq]exclude,java/lang/String.indexOf,(Ljava/lang/String;)I\[dq]\f[R] .RE .PP You can also use the asterisk (*) as a wildcard for class and method names. -For example, to exclude all \f[CB]indexOf()\f[R] methods in all classes +For example, to exclude all \f[V]indexOf()\f[R] methods in all classes from being compiled, use the following: .RS .PP -\f[CB]\-XX:CompileCommand=exclude,*.indexOf\f[R] +\f[V]-XX:CompileCommand=exclude,*.indexOf\f[R] .RE .PP The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell. -You can pass arguments to \f[CB]\-XX:CompileCommand\f[R] using spaces as +You can pass arguments to \f[V]-XX:CompileCommand\f[R] using spaces as separators by enclosing the argument in quotation marks: .RS .PP -\f[CB]\-XX:CompileCommand="exclude\ java/lang/String\ indexOf"\f[R] +\f[V]-XX:CompileCommand=\[dq]exclude java/lang/String indexOf\[dq]\f[R] .RE .PP Note that after parsing the commands passed on the command line using -the \f[CB]\-XX:CompileCommand\f[R] options, the JIT compiler then reads -commands from the \f[CB]\&.hotspot_compiler\f[R] file. +the \f[V]-XX:CompileCommand\f[R] options, the JIT compiler then reads +commands from the \f[V].hotspot_compiler\f[R] file. You can add commands to this file or specify a different file using the -\f[CB]\-XX:CompileCommandFile\f[R] option. +\f[V]-XX:CompileCommandFile\f[R] option. .PP -To add several commands, either specify the \f[CB]\-XX:CompileCommand\f[R] +To add several commands, either specify the \f[V]-XX:CompileCommand\f[R] option multiple times, or separate each argument with the new line -separator (\f[CB]\\n\f[R]). +separator (\f[V]\[rs]n\f[R]). The following commands are available: .TP -.B \f[CB]break\f[R] +\f[V]break\f[R] Sets a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method. -.RS -.RE .TP -.B \f[CB]compileonly\f[R] +\f[V]compileonly\f[R] Excludes all methods from compilation except for the specified method. -As an alternative, you can use the \f[CB]\-XX:CompileOnly\f[R] option, +As an alternative, you can use the \f[V]-XX:CompileOnly\f[R] option, which lets you specify several methods. -.RS -.RE .TP -.B \f[CB]dontinline\f[R] +\f[V]dontinline\f[R] Prevents inlining of the specified method. -.RS -.RE .TP -.B \f[CB]exclude\f[R] +\f[V]exclude\f[R] Excludes the specified method from compilation. -.RS -.RE .TP -.B \f[CB]help\f[R] -Prints a help message for the \f[CB]\-XX:CompileCommand\f[R] option. -.RS -.RE +\f[V]help\f[R] +Prints a help message for the \f[V]-XX:CompileCommand\f[R] option. .TP -.B \f[CB]inline\f[R] +\f[V]inline\f[R] Attempts to inline the specified method. -.RS -.RE .TP -.B \f[CB]log\f[R] -Excludes compilation logging (with the \f[CB]\-XX:+LogCompilation\f[R] +\f[V]log\f[R] +Excludes compilation logging (with the \f[V]-XX:+LogCompilation\f[R] option) for all methods except for the specified method. By default, logging is performed for all compiled methods. -.RS -.RE .TP -.B \f[CB]option\f[R] +\f[V]option\f[R] Passes a JIT compilation option to the specified method in place of the -last argument (\f[CB]option\f[R]). +last argument (\f[V]option\f[R]). The compilation option is set at the end, after the method name. -For example, to enable the \f[CB]BlockLayoutByFrequency\f[R] option for -the \f[CB]append()\f[R] method of the \f[CB]StringBuffer\f[R] class, use the -following: +For example, to enable the \f[V]BlockLayoutByFrequency\f[R] option for +the \f[V]append()\f[R] method of the \f[V]StringBuffer\f[R] class, use +the following: .RS .RS .PP -\f[CB]\-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency\f[R] +\f[V]-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency\f[R] .RE .PP You can specify multiple compilation options, separated by commas or spaces. .RE .TP -.B \f[CB]print\f[R] +\f[V]print\f[R] Prints generated assembler code after compilation of the specified method. -.RS -.RE .TP -.B \f[CB]quiet\f[R] +\f[V]quiet\f[R] Instructs not to print the compile commands. By default, the commands that you specify with the -\f[CB]\-XX:CompileCommand\f[R] option are printed; for example, if you -exclude from compilation the \f[CB]indexOf()\f[R] method of the -\f[CB]String\f[R] class, then the following is printed to standard output: +\f[V]-XX:CompileCommand\f[R] option are printed; for example, if you +exclude from compilation the \f[V]indexOf()\f[R] method of the +\f[V]String\f[R] class, then the following is printed to standard +output: .RS .RS .PP -\f[CB]CompilerOracle:\ exclude\ java/lang/String.indexOf\f[R] +\f[V]CompilerOracle: exclude java/lang/String.indexOf\f[R] .RE .PP You can suppress this by specifying the -\f[CB]\-XX:CompileCommand=quiet\f[R] option before other -\f[CB]\-XX:CompileCommand\f[R] options. +\f[V]-XX:CompileCommand=quiet\f[R] option before other +\f[V]-XX:CompileCommand\f[R] options. .RE .RE .TP -.B \f[CB]\-XX:CompileCommandFile=\f[R]\f[I]filename\f[R] +\f[V]-XX:CompileCommandFile=\f[R]\f[I]filename\f[R] Sets the file from which JIT compiler commands are read. -By default, the \f[CB]\&.hotspot_compiler\f[R] file is used to store +By default, the \f[V].hotspot_compiler\f[R] file is used to store commands performed by the JIT compiler. .RS .PP Each line in the command file represents a command, a class name, and a method name for which the command is used. -For example, this line prints assembly code for the \f[CB]toString()\f[R] -method of the \f[CB]String\f[R] class: +For example, this line prints assembly code for the \f[V]toString()\f[R] +method of the \f[V]String\f[R] class: .RS .PP -\f[CB]print\ java/lang/String\ toString\f[R] +\f[V]print java/lang/String toString\f[R] .RE .PP If you\[aq]re using commands for the JIT compiler to perform on methods, -then see the \f[CB]\-XX:CompileCommand\f[R] option. +then see the \f[V]-XX:CompileCommand\f[R] option. .RE .TP -.B \f[CB]\-XX:CompilerDirectivesFile=\f[R]\f[I]file\f[R] +\f[V]-XX:CompilerDirectivesFile=\f[R]\f[I]file\f[R] Adds directives from a file to the directives stack when a program starts. See \f[B]Compiler Control\f[R] -[https://docs.oracle.com/en/java/javase/12/vm/compiler\-control1.html#GUID\-94AD8194\-786A\-4F19\-BFFF\-278F8E237F3A]. +[https://docs.oracle.com/en/java/javase/12/vm/compiler-control1.html#GUID-94AD8194-786A-4F19-BFFF-278F8E237F3A]. .RS .PP -The \f[CB]\-XX:CompilerDirectivesFile\f[R] option has to be used together -with the \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks +The \f[V]-XX:CompilerDirectivesFile\f[R] option has to be used together +with the \f[V]-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic JVM options. .RE .TP -.B \f[CB]\-XX:+CompilerDirectivesPrint\f[R] +\f[V]-XX:+CompilerDirectivesPrint\f[R] Prints the directives stack when the program starts or when a new directive is added. .RS .PP -The \f[CB]\-XX:+CompilerDirectivesPrint\f[R] option has to be used -together with the \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that +The \f[V]-XX:+CompilerDirectivesPrint\f[R] option has to be used +together with the \f[V]-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic JVM options. .RE .TP -.B \f[CB]\-XX:CompileOnly=\f[R]\f[I]methods\f[R] +\f[V]-XX:CompileOnly=\f[R]\f[I]methods\f[R] Sets the list of methods (separated by commas) to which compilation should be restricted. Only the specified methods are compiled. Specify each method with the full class name (including the packages and subpackages). -For example, to compile only the \f[CB]length()\f[R] method of the -\f[CB]String\f[R] class and the \f[CB]size()\f[R] method of the -\f[CB]List\f[R] class, use the following: +For example, to compile only the \f[V]length()\f[R] method of the +\f[V]String\f[R] class and the \f[V]size()\f[R] method of the +\f[V]List\f[R] class, use the following: .RS .RS .PP -\f[CB]\-XX:CompileOnly=java/lang/String.length,java/util/List.size\f[R] +\f[V]-XX:CompileOnly=java/lang/String.length,java/util/List.size\f[R] .RE .PP Note that the full class name is specified, including all packages and -subpackages separated by a slash (\f[CB]/\f[R]). +subpackages separated by a slash (\f[V]/\f[R]). For easier cut and paste operations, it\[aq]s also possible to use the -method name format produced by the \f[CB]\-XX:+PrintCompilation\f[R] and -\f[CB]\-XX:+LogCompilation\f[R] options: +method name format produced by the \f[V]-XX:+PrintCompilation\f[R] and +\f[V]-XX:+LogCompilation\f[R] options: .RS .PP -\f[CB]\-XX:CompileOnly=java.lang.String::length,java.util.List::size\f[R] +\f[V]-XX:CompileOnly=java.lang.String::length,java.util.List::size\f[R] .RE .PP Although wildcards aren\[aq]t supported, you can specify only the class @@ -2376,41 +2178,37 @@ class: .IP .nf \f[CB] -\-XX:CompileOnly=java/lang/String -\-XX:CompileOnly=java/lang -\-XX:CompileOnly=.length +-XX:CompileOnly=java/lang/String +-XX:CompileOnly=java/lang +-XX:CompileOnly=.length \f[R] .fi .RE .TP -.B \f[CB]\-XX:CompileThresholdScaling=\f[R]\f[I]scale\f[R] +\f[V]-XX:CompileThresholdScaling=\f[R]\f[I]scale\f[R] Provides unified control of first compilation. This option controls when methods are first compiled for both the tiered and the nontiered modes of operation. -The \f[CB]CompileThresholdScaling\f[R] option has a floating point value +The \f[V]CompileThresholdScaling\f[R] option has a floating point value between 0 and +Inf and scales the thresholds corresponding to the current mode of operation (both tiered and nontiered). -Setting \f[CB]CompileThresholdScaling\f[R] to a value less than 1.0 +Setting \f[V]CompileThresholdScaling\f[R] to a value less than 1.0 results in earlier compilation while values greater than 1.0 delay compilation. -Setting \f[CB]CompileThresholdScaling\f[R] to 0 is equivalent to disabling -compilation. -.RS -.RE +Setting \f[V]CompileThresholdScaling\f[R] to 0 is equivalent to +disabling compilation. .TP -.B \f[CB]\-XX:+DoEscapeAnalysis\f[R] +\f[V]-XX:+DoEscapeAnalysis\f[R] Enables the use of escape analysis. This option is enabled by default. To disable the use of escape analysis, specify -\f[CB]\-XX:\-DoEscapeAnalysis\f[R]. -.RS -.RE +\f[V]-XX:-DoEscapeAnalysis\f[R]. .TP -.B \f[CB]\-XX:InitialCodeCacheSize=\f[R]\f[I]size\f[R] +\f[V]-XX:InitialCodeCacheSize=\f[R]\f[I]size\f[R] Sets the initial code cache size (in bytes). -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value depends on the platform. The initial code cache size shouldn\[aq]t be less than the system\[aq]s minimal memory page size. @@ -2419,130 +2217,128 @@ KB: .RS .RS .PP -\f[CB]\-XX:InitialCodeCacheSize=32k\f[R] +\f[V]-XX:InitialCodeCacheSize=32k\f[R] .RE .RE .TP -.B \f[CB]\-XX:+Inline\f[R] +\f[V]-XX:+Inline\f[R] Enables method inlining. This option is enabled by default to increase performance. -To disable method inlining, specify \f[CB]\-XX:\-Inline\f[R]. -.RS -.RE +To disable method inlining, specify \f[V]-XX:-Inline\f[R]. .TP -.B \f[CB]\-XX:InlineSmallCode=\f[R]\f[I]size\f[R] +\f[V]-XX:InlineSmallCode=\f[R]\f[I]size\f[R] Sets the maximum code size (in bytes) for already compiled methods that may be inlined. This flag only applies to the C2 compiler. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value depends on the platform and on whether tiered compilation is enabled. In the following example it is set to 1000 bytes: .RS .RS .PP -\f[CB]\-XX:InlineSmallCode=1000\f[R] +\f[V]-XX:InlineSmallCode=1000\f[R] .RE .RE .TP -.B \f[CB]\-XX:+LogCompilation\f[R] +\f[V]-XX:+LogCompilation\f[R] Enables logging of compilation activity to a file named -\f[CB]hotspot.log\f[R] in the current working directory. +\f[V]hotspot.log\f[R] in the current working directory. You can specify a different log file path and name using the -\f[CB]\-XX:LogFile\f[R] option. +\f[V]-XX:LogFile\f[R] option. .RS .PP By default, this option is disabled and compilation activity isn\[aq]t logged. -The \f[CB]\-XX:+LogCompilation\f[R] option has to be used together with -the \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks +The \f[V]-XX:+LogCompilation\f[R] option has to be used together with +the \f[V]-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic JVM options. .PP You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the -\f[CB]\-XX:+PrintCompilation\f[R] option. +\f[V]-XX:+PrintCompilation\f[R] option. .RE .TP -.B \f[CB]\-XX:FreqInlineSize=\f[R]\f[I]size\f[R] +\f[V]-XX:FreqInlineSize=\f[R]\f[I]size\f[R] Sets the maximum bytecode size (in bytes) of a hot method to be inlined. This flag only applies to the C2 compiler. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value depends on the platform. In the following example it is set to 325 bytes: .RS .RS .PP -\f[CB]\-XX:FreqInlineSize=325\f[R] +\f[V]-XX:FreqInlineSize=325\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxInlineSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MaxInlineSize=\f[R]\f[I]size\f[R] Sets the maximum bytecode size (in bytes) of a cold method to be inlined. This flag only applies to the C2 compiler. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. By default, the maximum bytecode size is set to 35 bytes: .RS .RS .PP -\f[CB]\-XX:MaxInlineSize=35\f[R] +\f[V]-XX:MaxInlineSize=35\f[R] .RE .RE .TP -.B \f[CB]\-XX:C1MaxInlineSize=\f[R]\f[I]size\f[R] +\f[V]-XX:C1MaxInlineSize=\f[R]\f[I]size\f[R] Sets the maximum bytecode size (in bytes) of a cold method to be inlined. This flag only applies to the C1 compiler. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. By default, the maximum bytecode size is set to 35 bytes: .RS .RS .PP -\f[CB]\-XX:MaxInlineSize=35\f[R] +\f[V]-XX:MaxInlineSize=35\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxTrivialSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MaxTrivialSize=\f[R]\f[I]size\f[R] Sets the maximum bytecode size (in bytes) of a trivial method to be inlined. This flag only applies to the C2 compiler. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. By default, the maximum bytecode size of a trivial method is set to 6 bytes: .RS .RS .PP -\f[CB]\-XX:MaxTrivialSize=6\f[R] +\f[V]-XX:MaxTrivialSize=6\f[R] .RE .RE .TP -.B \f[CB]\-XX:C1MaxTrivialSize=\f[R]\f[I]size\f[R] +\f[V]-XX:C1MaxTrivialSize=\f[R]\f[I]size\f[R] Sets the maximum bytecode size (in bytes) of a trivial method to be inlined. This flag only applies to the C1 compiler. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. By default, the maximum bytecode size of a trivial method is set to 6 bytes: .RS .RS .PP -\f[CB]\-XX:MaxTrivialSize=6\f[R] +\f[V]-XX:MaxTrivialSize=6\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxNodeLimit=\f[R]\f[I]nodes\f[R] +\f[V]-XX:MaxNodeLimit=\f[R]\f[I]nodes\f[R] Sets the maximum number of nodes to be used during single method compilation. By default the value depends on the features enabled. @@ -2550,56 +2346,50 @@ In the following example the maximum number of nodes is set to 100,000: .RS .RS .PP -\f[CB]\-XX:MaxNodeLimit=100000\f[R] +\f[V]-XX:MaxNodeLimit=100000\f[R] .RE .RE .TP -.B \f[CB]\-XX:NonNMethodCodeHeapSize=\f[R]\f[I]size\f[R] +\f[V]-XX:NonNMethodCodeHeapSize=\f[R]\f[I]size\f[R] Sets the size in bytes of the code segment containing nonmethod code. .RS .PP A nonmethod code segment containing nonmethod code, such as compiler buffers and the bytecode interpreter. This code type stays in the code cache forever. -This flag is used only if \f[CB]\-XX:SegmentedCodeCache\f[R] is enabled. +This flag is used only if \f[V]-XX:SegmentedCodeCache\f[R] is enabled. .RE .TP -.B \f[CB]\-XX:NonProfiledCodeHeapSize=\f[R]\f[I]size\f[R] +\f[V]-XX:NonProfiledCodeHeapSize=\f[R]\f[I]size\f[R] Sets the size in bytes of the code segment containing nonprofiled methods. -This flag is used only if \f[CB]\-XX:SegmentedCodeCache\f[R] is enabled. -.RS -.RE +This flag is used only if \f[V]-XX:SegmentedCodeCache\f[R] is enabled. .TP -.B \f[CB]\-XX:+OptimizeStringConcat\f[R] -Enables the optimization of \f[CB]String\f[R] concatenation operations. +\f[V]-XX:+OptimizeStringConcat\f[R] +Enables the optimization of \f[V]String\f[R] concatenation operations. This option is enabled by default. -To disable the optimization of \f[CB]String\f[R] concatenation operations, -specify \f[CB]\-XX:\-OptimizeStringConcat\f[R]. -.RS -.RE +To disable the optimization of \f[V]String\f[R] concatenation +operations, specify \f[V]-XX:-OptimizeStringConcat\f[R]. .TP -.B \f[CB]\-XX:+PrintAssembly\f[R] +\f[V]-XX:+PrintAssembly\f[R] Enables printing of assembly code for bytecoded and native methods by -using the external \f[CB]hsdis\-.so\f[R] or \f[CB]\&.dll\f[R] library. -For 64\-bit VM on Windows, it\[aq]s \f[CB]hsdis\-amd64.dll\f[R]. +using the external \f[V]hsdis-.so\f[R] or \f[V].dll\f[R] library. +For 64-bit VM on Windows, it\[aq]s \f[V]hsdis-amd64.dll\f[R]. This lets you to see the generated code, which may help you to diagnose performance issues. .RS .PP By default, this option is disabled and assembly code isn\[aq]t printed. -The \f[CB]\-XX:+PrintAssembly\f[R] option has to be used together with the -\f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic +The \f[V]-XX:+PrintAssembly\f[R] option has to be used together with the +\f[V]-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic JVM options. .RE .TP -.B \f[CB]\-XX:ProfiledCodeHeapSize=\f[R]\f[I]size\f[R] +\f[V]-XX:ProfiledCodeHeapSize=\f[R]\f[I]size\f[R] Sets the size in bytes of the code segment containing profiled methods. -This flag is used only if \f[CB]\-XX:SegmentedCodeCache\f[R] is enabled. -.RS -.RE +This flag is used only if \f[V]-XX:SegmentedCodeCache\f[R] is enabled. .TP -.B \f[CB]\-XX:+PrintCompilation\f[R] +\f[V]-XX:+PrintCompilation\f[R] Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled. This lets you to see which methods actually get compiled. @@ -2608,62 +2398,56 @@ printed. .RS .PP You can also log compilation activity to a file by using the -\f[CB]\-XX:+LogCompilation\f[R] option. +\f[V]-XX:+LogCompilation\f[R] option. .RE .TP -.B \f[CB]\-XX:+PrintInlining\f[R] +\f[V]-XX:+PrintInlining\f[R] Enables printing of inlining decisions. This let\[aq]s you see which methods are getting inlined. .RS .PP By default, this option is disabled and inlining information isn\[aq]t printed. -The \f[CB]\-XX:+PrintInlining\f[R] option has to be used together with the -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic +The \f[V]-XX:+PrintInlining\f[R] option has to be used together with the +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic JVM options. .RE .TP -.B \f[CB]\-XX:ReservedCodeCacheSize=\f[R]\f[I]size\f[R] -Sets the maximum code cache size (in bytes) for JIT\-compiled code. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +\f[V]-XX:ReservedCodeCacheSize=\f[R]\f[I]size\f[R] +Sets the maximum code cache size (in bytes) for JIT-compiled code. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default maximum code cache size is 240 MB; if you disable tiered -compilation with the option \f[CB]\-XX:\-TieredCompilation\f[R], then the +compilation with the option \f[V]-XX:-TieredCompilation\f[R], then the default size is 48 MB. This option has a limit of 2 GB; otherwise, an error is generated. The maximum code cache size shouldn\[aq]t be less than the initial code -cache size; see the option \f[CB]\-XX:InitialCodeCacheSize\f[R]. -.RS -.RE +cache size; see the option \f[V]-XX:InitialCodeCacheSize\f[R]. .TP -.B \f[CB]\-XX:RTMAbortRatio=\f[R]\f[I]abort_ratio\f[R] +\f[V]-XX:RTMAbortRatio=\f[R]\f[I]abort_ratio\f[R] Specifies the RTM abort ratio is specified as a percentage (%) of all executed RTM transactions. If a number of aborted transactions becomes greater than this ratio, then the compiled code is deoptimized. -This ratio is used when the \f[CB]\-XX:+UseRTMDeopt\f[R] option is +This ratio is used when the \f[V]-XX:+UseRTMDeopt\f[R] option is enabled. The default value of this option is 50. This means that the compiled code is deoptimized if 50% of all transactions are aborted. -.RS -.RE .TP -.B \f[CB]\-XX:RTMRetryCount=\f[R]\f[I]number_of_retries\f[R] +\f[V]-XX:RTMRetryCount=\f[R]\f[I]number_of_retries\f[R] Specifies the number of times that the RTM locking code is retried, when it is aborted or busy, before falling back to the normal locking mechanism. The default value for this option is 5. -The \f[CB]\-XX:UseRTMLocking\f[R] option must be enabled. -.RS -.RE +The \f[V]-XX:UseRTMLocking\f[R] option must be enabled. .TP -.B \f[CB]\-XX:+SegmentedCodeCache\f[R] +\f[V]-XX:+SegmentedCodeCache\f[R] Enables segmentation of the code cache, without which the code cache consists of one large segment. -With \f[CB]\-XX:+SegmentedCodeCache\f[R], separate segments will be used -for non\-method, profiled method, and non\-profiled method code. +With \f[V]-XX:+SegmentedCodeCache\f[R], separate segments will be used +for non-method, profiled method, and non-profiled method code. The segments are not resized at runtime. The advantages are better control of the memory footprint, reduced code fragmentation, and better CPU iTLB (instruction translation lookaside @@ -2671,276 +2455,221 @@ buffer) and instruction cache behavior due to improved locality. .RS .PP The feature is enabled by default if tiered compilation is enabled -(\f[CB]\-XX:+TieredCompilation\f[R] ) and the reserved code cache size -(\f[CB]\-XX:ReservedCodeCacheSize\f[R]) is at least 240 MB. +(\f[V]-XX:+TieredCompilation\f[R] ) and the reserved code cache size +(\f[V]-XX:ReservedCodeCacheSize\f[R]) is at least 240 MB. .RE .TP -.B \f[CB]\-XX:StartAggressiveSweepingAt=\f[R]\f[I]percent\f[R] +\f[V]-XX:StartAggressiveSweepingAt=\f[R]\f[I]percent\f[R] Forces stack scanning of active methods to aggressively remove unused code when only the given percentage of the code cache is free. The default value is 10%. -.RS -.RE .TP -.B \f[CB]\-XX:\-TieredCompilation\f[R] +\f[V]-XX:-TieredCompilation\f[R] Disables the use of tiered compilation. By default, this option is enabled. -.RS -.RE .TP -.B \f[CB]\-XX:UseSSE=\f[R]\f[I]version\f[R] +\f[V]-XX:UseSSE=\f[R]\f[I]version\f[R] Enables the use of SSE instruction set of a specified version. Is set by default to the highest supported version available (x86 only). -.RS -.RE .TP -.B \f[CB]\-XX:UseAVX=\f[R]\f[I]version\f[R] +\f[V]-XX:UseAVX=\f[R]\f[I]version\f[R] Enables the use of AVX instruction set of a specified version. Is set by default to the highest supported version available (x86 only). -.RS -.RE .TP -.B \f[CB]\-XX:+UseAES\f[R] -Enables hardware\-based AES intrinsics for hardware that supports it. +\f[V]-XX:+UseAES\f[R] +Enables hardware-based AES intrinsics for hardware that supports it. This option is on by default on hardware that has the necessary instructions. -The \f[CB]\-XX:+UseAES\f[R] is used in conjunction with -\f[CB]UseAESIntrinsics\f[R]. +The \f[V]-XX:+UseAES\f[R] is used in conjunction with +\f[V]UseAESIntrinsics\f[R]. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseAESIntrinsics\f[R] +\f[V]-XX:+UseAESIntrinsics\f[R] Enables AES intrinsics. -Specifying \f[CB]\-XX:+UseAESIntrinsics\f[R] is equivalent to also -enabling \f[CB]\-XX:+UseAES\f[R]. -To disable hardware\-based AES intrinsics, specify -\f[CB]\-XX:\-UseAES\ \-XX:\-UseAESIntrinsics\f[R]. +Specifying \f[V]-XX:+UseAESIntrinsics\f[R] is equivalent to also +enabling \f[V]-XX:+UseAES\f[R]. +To disable hardware-based AES intrinsics, specify +\f[V]-XX:-UseAES -XX:-UseAESIntrinsics\f[R]. For example, to enable hardware AES, use the following flags: .RS .RS .PP -\f[CB]\-XX:+UseAES\ \-XX:+UseAESIntrinsics\f[R] +\f[V]-XX:+UseAES -XX:+UseAESIntrinsics\f[R] .RE .PP Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .RE .TP -.B \f[CB]\-XX:+UseAESCTRIntrinsics\f[R] -Analogous to \f[CB]\-XX:+UseAESIntrinsics\f[R] enables AES/CTR intrinsics. -.RS -.RE +\f[V]-XX:+UseAESCTRIntrinsics\f[R] +Analogous to \f[V]-XX:+UseAESIntrinsics\f[R] enables AES/CTR intrinsics. .TP -.B \f[CB]\-XX:+UseGHASHIntrinsics\f[R] +\f[V]-XX:+UseGHASHIntrinsics\f[R] Controls the use of GHASH intrinsics. Enabled by default on platforms that support the corresponding instructions. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseBASE64Intrinsics\f[R] +\f[V]-XX:+UseBASE64Intrinsics\f[R] Controls the use of accelerated BASE64 encoding routines for -\f[CB]java.util.Base64\f[R]. +\f[V]java.util.Base64\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseAdler32Intrinsics\f[R] +\f[V]-XX:+UseAdler32Intrinsics\f[R] Controls the use of Adler32 checksum algorithm intrinsic for -\f[CB]java.util.zip.Adler32\f[R]. +\f[V]java.util.zip.Adler32\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseCRC32Intrinsics\f[R] -Controls the use of CRC32 intrinsics for \f[CB]java.util.zip.CRC32\f[R]. +\f[V]-XX:+UseCRC32Intrinsics\f[R] +Controls the use of CRC32 intrinsics for \f[V]java.util.zip.CRC32\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseCRC32CIntrinsics\f[R] -Controls the use of CRC32C intrinsics for \f[CB]java.util.zip.CRC32C\f[R]. +\f[V]-XX:+UseCRC32CIntrinsics\f[R] +Controls the use of CRC32C intrinsics for +\f[V]java.util.zip.CRC32C\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseSHA\f[R] -Enables hardware\-based intrinsics for SHA crypto hash functions for -some hardware. -The \f[CB]UseSHA\f[R] option is used in conjunction with the -\f[CB]UseSHA1Intrinsics\f[R], \f[CB]UseSHA256Intrinsics\f[R], and -\f[CB]UseSHA512Intrinsics\f[R] options. +\f[V]-XX:+UseSHA\f[R] +Enables hardware-based intrinsics for SHA crypto hash functions for some +hardware. +The \f[V]UseSHA\f[R] option is used in conjunction with the +\f[V]UseSHA1Intrinsics\f[R], \f[V]UseSHA256Intrinsics\f[R], and +\f[V]UseSHA512Intrinsics\f[R] options. .RS .PP -The \f[CB]UseSHA\f[R] and \f[CB]UseSHA*Intrinsics\f[R] flags are enabled by -default on machines that support the corresponding instructions. +The \f[V]UseSHA\f[R] and \f[V]UseSHA*Intrinsics\f[R] flags are enabled +by default on machines that support the corresponding instructions. .PP This feature is applicable only when using the -\f[CB]sun.security.provider.Sun\f[R] provider for SHA operations. +\f[V]sun.security.provider.Sun\f[R] provider for SHA operations. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .PP -To disable all hardware\-based SHA intrinsics, specify the -\f[CB]\-XX:\-UseSHA\f[R]. +To disable all hardware-based SHA intrinsics, specify the +\f[V]-XX:-UseSHA\f[R]. To disable only a particular SHA intrinsic, use the appropriate corresponding option. -For example: \f[CB]\-XX:\-UseSHA256Intrinsics\f[R]. +For example: \f[V]-XX:-UseSHA256Intrinsics\f[R]. .RE .TP -.B \f[CB]\-XX:+UseSHA1Intrinsics\f[R] -Enables intrinsics for SHA\-1 crypto hash function. +\f[V]-XX:+UseSHA1Intrinsics\f[R] +Enables intrinsics for SHA-1 crypto hash function. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseSHA256Intrinsics\f[R] -Enables intrinsics for SHA\-224 and SHA\-256 crypto hash functions. +\f[V]-XX:+UseSHA256Intrinsics\f[R] +Enables intrinsics for SHA-224 and SHA-256 crypto hash functions. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseSHA512Intrinsics\f[R] -Enables intrinsics for SHA\-384 and SHA\-512 crypto hash functions. +\f[V]-XX:+UseSHA512Intrinsics\f[R] +Enables intrinsics for SHA-384 and SHA-512 crypto hash functions. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseMathExactIntrinsics\f[R] -Enables intrinsification of various \f[CB]java.lang.Math.*Exact()\f[R] +\f[V]-XX:+UseMathExactIntrinsics\f[R] +Enables intrinsification of various \f[V]java.lang.Math.*Exact()\f[R] functions. Enabled by default. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseMultiplyToLenIntrinsic\f[R] -Enables intrinsification of \f[CB]BigInteger.multiplyToLen()\f[R]. +\f[V]-XX:+UseMultiplyToLenIntrinsic\f[R] +Enables intrinsification of \f[V]BigInteger.multiplyToLen()\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \-XX:+UseSquareToLenIntrinsic -Enables intrinsification of \f[CB]BigInteger.squareToLen()\f[R]. +-XX:+UseSquareToLenIntrinsic +Enables intrinsification of \f[V]BigInteger.squareToLen()\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \-XX:+UseMulAddIntrinsic -Enables intrinsification of \f[CB]BigInteger.mulAdd()\f[R]. +-XX:+UseMulAddIntrinsic +Enables intrinsification of \f[V]BigInteger.mulAdd()\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \-XX:+UseMontgomeryMultiplyIntrinsic -Enables intrinsification of \f[CB]BigInteger.montgomeryMultiply()\f[R]. +-XX:+UseMontgomeryMultiplyIntrinsic +Enables intrinsification of \f[V]BigInteger.montgomeryMultiply()\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \-XX:+UseMontgomerySquareIntrinsic -Enables intrinsification of \f[CB]BigInteger.montgomerySquare()\f[R]. +-XX:+UseMontgomerySquareIntrinsic +Enables intrinsification of \f[V]BigInteger.montgomerySquare()\f[R]. Enabled by default on platforms that support it. Flags that control intrinsics now require the option -\f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]. -.RS -.RE +\f[V]-XX:+UnlockDiagnosticVMOptions\f[R]. .TP -.B \f[CB]\-XX:+UseCMoveUnconditionally\f[R] +\f[V]-XX:+UseCMoveUnconditionally\f[R] Generates CMove (scalar and vector) instructions regardless of profitability analysis. -.RS -.RE .TP -.B \f[CB]\-XX:+UseCodeCacheFlushing\f[R] +\f[V]-XX:+UseCodeCacheFlushing\f[R] Enables flushing of the code cache before shutting down the compiler. This option is enabled by default. To disable flushing of the code cache before shutting down the compiler, -specify \f[CB]\-XX:\-UseCodeCacheFlushing\f[R]. -.RS -.RE +specify \f[V]-XX:-UseCodeCacheFlushing\f[R]. .TP -.B \f[CB]\-XX:+UseCondCardMark\f[R] +\f[V]-XX:+UseCondCardMark\f[R] Enables checking if the card is already marked before updating the card table. This option is disabled by default. It should be used only on machines with multiple sockets, where it increases the performance of Java applications that rely on concurrent operations. -.RS -.RE .TP -.B \f[CB]\-XX:+UseCountedLoopSafepoints\f[R] +\f[V]-XX:+UseCountedLoopSafepoints\f[R] Keeps safepoints in counted loops. Its default value depends on whether the selected garbage collector requires low latency safepoints. -.RS -.RE .TP -.B \f[CB]\-XX:LoopStripMiningIter=\f[R]\f[I]number_of_iterations\f[R] +\f[V]-XX:LoopStripMiningIter=\f[R]\f[I]number_of_iterations\f[R] Controls the number of iterations in the inner strip mined loop. Strip mining transforms counted loops into two level nested loops. Safepoints are kept in the outer loop while the inner loop can execute at full speed. This option controls the maximum number of iterations in the inner loop. The default value is 1,000. -.RS -.RE .TP -.B \f[CB]\-XX:LoopStripMiningIterShortLoop=\f[R]\f[I]number_of_iterations\f[R] +\f[V]-XX:LoopStripMiningIterShortLoop=\f[R]\f[I]number_of_iterations\f[R] Controls loop strip mining optimization. Loops with the number of iterations less than specified will not have safepoints in them. -Default value is 1/10th of \f[CB]\-XX:LoopStripMiningIter\f[R]. -.RS -.RE +Default value is 1/10th of \f[V]-XX:LoopStripMiningIter\f[R]. .TP -.B \f[CB]\-XX:+UseFMA\f[R] -Enables hardware\-based FMA intrinsics for hardware where FMA +\f[V]-XX:+UseFMA\f[R] +Enables hardware-based FMA intrinsics for hardware where FMA instructions are available (such as, Intel and ARM64). FMA intrinsics are generated for the -\f[CB]java.lang.Math.fma(\f[R]\f[I]a\f[R]\f[CB],\f[R] \f[I]b\f[R]\f[CB],\f[R] -\f[I]c\f[R]\f[CB])\f[R] methods that calculate the value of \f[CB](\f[R] -\f[I]a\f[R] \f[CB]*\f[R] \f[I]b\f[R] \f[CB]+\f[R] \f[I]c\f[R] \f[CB])\f[R] -expressions. -.RS -.RE +\f[V]java.lang.Math.fma(\f[R]\f[I]a\f[R]\f[V],\f[R] +\f[I]b\f[R]\f[V],\f[R] \f[I]c\f[R]\f[V])\f[R] methods that calculate the +value of \f[V](\f[R] \f[I]a\f[R] \f[V]*\f[R] \f[I]b\f[R] \f[V]+\f[R] +\f[I]c\f[R] \f[V])\f[R] expressions. .TP -.B \f[CB]\-XX:+UseRTMDeopt\f[R] +\f[V]-XX:+UseRTMDeopt\f[R] Autotunes RTM locking depending on the abort ratio. -This ratio is specified by the \f[CB]\-XX:RTMAbortRatio\f[R] option. +This ratio is specified by the \f[V]-XX:RTMAbortRatio\f[R] option. If the number of aborted transactions exceeds the abort ratio, then the method containing the lock is deoptimized and recompiled with all locks as normal locks. This option is disabled by default. -The \f[CB]\-XX:+UseRTMLocking\f[R] option must be enabled. -.RS -.RE +The \f[V]-XX:+UseRTMLocking\f[R] option must be enabled. .TP -.B \f[CB]\-XX:+UseRTMLocking\f[R] +\f[V]-XX:+UseRTMLocking\f[R] Generates Restricted Transactional Memory (RTM) locking code for all inflated locks, with the normal locking mechanism as the fallback handler. @@ -2951,15 +2680,15 @@ Transactional Synchronization Extensions (TSX). .PP RTM is part of Intel\[aq]s TSX, which is an x86 instruction set extension and facilitates the creation of multithreaded applications. -RTM introduces the new instructions \f[CB]XBEGIN\f[R], \f[CB]XABORT\f[R], -\f[CB]XEND\f[R], and \f[CB]XTEST\f[R]. -The \f[CB]XBEGIN\f[R] and \f[CB]XEND\f[R] instructions enclose a set of +RTM introduces the new instructions \f[V]XBEGIN\f[R], \f[V]XABORT\f[R], +\f[V]XEND\f[R], and \f[V]XTEST\f[R]. +The \f[V]XBEGIN\f[R] and \f[V]XEND\f[R] instructions enclose a set of instructions to run as a transaction. If no conflict is found when running the transaction, then the memory -and register modifications are committed together at the \f[CB]XEND\f[R] +and register modifications are committed together at the \f[V]XEND\f[R] instruction. -The \f[CB]XABORT\f[R] instruction can be used to explicitly abort a -transaction and the \f[CB]XTEST\f[R] instruction checks if a set of +The \f[V]XABORT\f[R] instruction can be used to explicitly abort a +transaction and the \f[V]XTEST\f[R] instruction checks if a set of instructions is being run in a transaction. .PP A lock on a transaction is inflated when another thread tries to access @@ -2972,15 +2701,16 @@ An RTM lock is a lock that has been delegated to the TSX\[aq]s system. RTM improves performance for highly contended locks with low conflict in a critical region (which is code that must not be accessed by more than one thread concurrently). -RTM also improves the performance of coarse\-grain locking, which +RTM also improves the performance of coarse-grain locking, which typically doesn\[aq]t perform well in multithreaded applications. -(Coarse\-grain locking is the strategy of holding locks for long periods +(Coarse-grain locking is the strategy of holding locks for long periods to minimize the overhead of taking and releasing locks, while -fine\-grained locking is the strategy of trying to achieve maximum +fine-grained locking is the strategy of trying to achieve maximum parallelism by locking only when necessary and unlocking as soon as -possible.) Also, for lightly contended locks that are used by different -threads, RTM can reduce false cache line sharing, also known as cache -line ping\-pong. +possible.) +Also, for lightly contended locks that are used by different threads, +RTM can reduce false cache line sharing, also known as cache line +ping-pong. This occurs when multiple threads from different processors are accessing different resources, but the resources share the same cache line. @@ -2989,25 +2719,23 @@ other processors, which forces them to read from main memory instead of their cache. .RE .TP -.B \f[CB]\-XX:+UseSuperWord\f[R] +\f[V]-XX:+UseSuperWord\f[R] Enables the transformation of scalar operations into superword operations. Superword is a vectorization optimization. This option is enabled by default. To disable the transformation of scalar operations into superword -operations, specify \f[CB]\-XX:\-UseSuperWord\f[R]. -.RS -.RE +operations, specify \f[V]-XX:-UseSuperWord\f[R]. .SH ADVANCED SERVICEABILITY OPTIONS FOR JAVA .PP -These \f[CB]java\f[R] options provide the ability to gather system +These \f[V]java\f[R] options provide the ability to gather system information and perform extensive debugging. .TP -.B \f[CB]\-XX:+DisableAttachMechanism\f[R] +\f[V]-XX:+DisableAttachMechanism\f[R] Disables the mechanism that lets tools attach to the JVM. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use diagnostics and troubleshooting tools such as -\f[CB]jcmd\f[R], \f[CB]jstack\f[R], \f[CB]jmap\f[R], and \f[CB]jinfo\f[R]. +\f[V]jcmd\f[R], \f[V]jstack\f[R], \f[V]jmap\f[R], and \f[V]jinfo\f[R]. .RS .RS .PP @@ -3018,188 +2746,173 @@ different JDK version. .RE .RE .TP -.B \f[CB]\-XX:+DTraceAllocProbes\f[R] -\f[B]Linux and macOS:\f[R] Enable \f[CB]dtrace\f[R] tool probes for object -allocation. -.RS -.RE +\f[V]-XX:+DTraceAllocProbes\f[R] +\f[B]Linux and macOS:\f[R] Enable \f[V]dtrace\f[R] tool probes for +object allocation. .TP -.B \f[CB]\-XX:+DTraceMethodProbes\f[R] -\f[B]Linux and macOS:\f[R] Enable \f[CB]dtrace\f[R] tool probes for -method\-entry and method\-exit. -.RS -.RE +\f[V]-XX:+DTraceMethodProbes\f[R] +\f[B]Linux and macOS:\f[R] Enable \f[V]dtrace\f[R] tool probes for +method-entry and method-exit. .TP -.B \f[CB]\-XX:+DTraceMonitorProbes\f[R] -\f[B]Linux and macOS:\f[R] Enable \f[CB]dtrace\f[R] tool probes for monitor -events. -.RS -.RE +\f[V]-XX:+DTraceMonitorProbes\f[R] +\f[B]Linux and macOS:\f[R] Enable \f[V]dtrace\f[R] tool probes for +monitor events. .TP -.B \f[CB]\-XX:+HeapDumpOnOutOfMemoryError\f[R] +\f[V]-XX:+HeapDumpOnOutOfMemoryError\f[R] Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a -\f[CB]java.lang.OutOfMemoryError\f[R] exception is thrown. +\f[V]java.lang.OutOfMemoryError\f[R] exception is thrown. You can explicitly set the heap dump file path and name using the -\f[CB]\-XX:HeapDumpPath\f[R] option. +\f[V]-XX:HeapDumpPath\f[R] option. By default, this option is disabled and the heap isn\[aq]t dumped when -an \f[CB]OutOfMemoryError\f[R] exception is thrown. -.RS -.RE +an \f[V]OutOfMemoryError\f[R] exception is thrown. .TP -.B \f[CB]\-XX:HeapDumpPath=\f[R]\f[I]path\f[R] +\f[V]-XX:HeapDumpPath=\f[R]\f[I]path\f[R] Sets the path and file name for writing the heap dump provided by the -heap profiler (HPROF) when the \f[CB]\-XX:+HeapDumpOnOutOfMemoryError\f[R] +heap profiler (HPROF) when the \f[V]-XX:+HeapDumpOnOutOfMemoryError\f[R] option is set. By default, the file is created in the current working directory, and -it\[aq]s named \f[CB]java_pid.hprof\f[R] where \f[CB]\f[R] is the -identifier of the process that caused the error. +it\[aq]s named \f[V]java_pid.hprof\f[R] where \f[V]\f[R] is +the identifier of the process that caused the error. The following example shows how to set the default file explicitly -(\f[CB]%p\f[R] represents the current process identifier): +(\f[V]%p\f[R] represents the current process identifier): .RS .RS .PP -\f[CB]\-XX:HeapDumpPath=./java_pid%p.hprof\f[R] +\f[V]-XX:HeapDumpPath=./java_pid%p.hprof\f[R] .RE .IP \[bu] 2 \f[B]Linux and macOS:\f[R] The following example shows how to set the -heap dump file to \f[CB]/var/log/java/java_heapdump.hprof\f[R]: +heap dump file to \f[V]/var/log/java/java_heapdump.hprof\f[R]: .RS 2 .RS .PP -\f[CB]\-XX:HeapDumpPath=/var/log/java/java_heapdump.hprof\f[R] +\f[V]-XX:HeapDumpPath=/var/log/java/java_heapdump.hprof\f[R] .RE .RE .IP \[bu] 2 \f[B]Windows:\f[R] The following example shows how to set the heap dump -file to \f[CB]C:/log/java/java_heapdump.log\f[R]: +file to \f[V]C:/log/java/java_heapdump.log\f[R]: .RS 2 .RS .PP -\f[CB]\-XX:HeapDumpPath=C:/log/java/java_heapdump.log\f[R] +\f[V]-XX:HeapDumpPath=C:/log/java/java_heapdump.log\f[R] .RE .RE .RE .TP -.B \f[CB]\-XX:LogFile=\f[R]\f[I]path\f[R] +\f[V]-XX:LogFile=\f[R]\f[I]path\f[R] Sets the path and file name to where log data is written. By default, the file is created in the current working directory, and -it\[aq]s named \f[CB]hotspot.log\f[R]. +it\[aq]s named \f[V]hotspot.log\f[R]. .RS .IP \[bu] 2 -\f[B]Linux and macOS:\f[R] The following example shows how to set the log -file to \f[CB]/var/log/java/hotspot.log\f[R]: +\f[B]Linux and macOS:\f[R] The following example shows how to set the +log file to \f[V]/var/log/java/hotspot.log\f[R]: .RS 2 .RS .PP -\f[CB]\-XX:LogFile=/var/log/java/hotspot.log\f[R] +\f[V]-XX:LogFile=/var/log/java/hotspot.log\f[R] .RE .RE .IP \[bu] 2 -\f[B]Windows:\f[R] The following example shows how to set the log file to -\f[CB]C:/log/java/hotspot.log\f[R]: +\f[B]Windows:\f[R] The following example shows how to set the log file +to \f[V]C:/log/java/hotspot.log\f[R]: .RS 2 .RS .PP -\f[CB]\-XX:LogFile=C:/log/java/hotspot.log\f[R] +\f[V]-XX:LogFile=C:/log/java/hotspot.log\f[R] .RE .RE .RE .TP -.B \f[CB]\-XX:+PrintClassHistogram\f[R] +\f[V]-XX:+PrintClassHistogram\f[R] Enables printing of a class instance histogram after one of the following events: .RS .IP \[bu] 2 -\f[B]Linux and macOS:\f[R] \f[CB]Control+Break\f[R] +\f[B]Linux and macOS:\f[R] \f[V]Control+Break\f[R] .IP \[bu] 2 -\f[B]Windows:\f[R] \f[CB]Control+C\f[R] (\f[CB]SIGTERM\f[R]) +\f[B]Windows:\f[R] \f[V]Control+C\f[R] (\f[V]SIGTERM\f[R]) .PP By default, this option is disabled. .PP -Setting this option is equivalent to running the \f[CB]jmap\ \-histo\f[R] -command, or the \f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]GC.class_histogram\f[R] -command, where \f[I]pid\f[R] is the current Java process identifier. +Setting this option is equivalent to running the \f[V]jmap -histo\f[R] +command, or the \f[V]jcmd\f[R] \f[I]pid\f[R] +\f[V]GC.class_histogram\f[R] command, where \f[I]pid\f[R] is the current +Java process identifier. .RE .TP -.B \f[CB]\-XX:+PrintConcurrentLocks\f[R] -Enables printing of \f[CB]java.util.concurrent\f[R] locks after one of the -following events: +\f[V]-XX:+PrintConcurrentLocks\f[R] +Enables printing of \f[V]java.util.concurrent\f[R] locks after one of +the following events: .RS .IP \[bu] 2 -\f[B]Linux and macOS:\f[R] \f[CB]Control+Break\f[R] +\f[B]Linux and macOS:\f[R] \f[V]Control+Break\f[R] .IP \[bu] 2 -\f[B]Windows:\f[R] \f[CB]Control+C\f[R] (\f[CB]SIGTERM\f[R]) +\f[B]Windows:\f[R] \f[V]Control+C\f[R] (\f[V]SIGTERM\f[R]) .PP By default, this option is disabled. .PP -Setting this option is equivalent to running the \f[CB]jstack\ \-l\f[R] -command or the \f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]Thread.print\ \-l\f[R] +Setting this option is equivalent to running the \f[V]jstack -l\f[R] +command or the \f[V]jcmd\f[R] \f[I]pid\f[R] \f[V]Thread.print -l\f[R] command, where \f[I]pid\f[R] is the current Java process identifier. .RE .TP -.B \f[CB]\-XX:+PrintFlagsRanges\f[R] +\f[V]-XX:+PrintFlagsRanges\f[R] Prints the range specified and allows automatic testing of the values. See \f[B]Validate Java Virtual Machine Flag Arguments\f[R]. -.RS -.RE .TP -.B \f[CB]\-XX:+PerfDataSaveToFile\f[R] +\f[V]-XX:+PerfDataSaveToFile\f[R] If enabled, saves \f[B]jstat\f[R] binary data when the Java application exits. This binary data is saved in a file named -\f[CB]hsperfdata_\f[R]\f[I]pid\f[R], where \f[I]pid\f[R] is the process +\f[V]hsperfdata_\f[R]\f[I]pid\f[R], where \f[I]pid\f[R] is the process identifier of the Java application that you ran. -Use the \f[CB]jstat\f[R] command to display the performance data contained -in this file as follows: +Use the \f[V]jstat\f[R] command to display the performance data +contained in this file as follows: .RS .RS .PP -\f[CB]jstat\ \-class\ file:///\f[R]\f[I]path\f[R]\f[CB]/hsperfdata_\f[R]\f[I]pid\f[R] +\f[V]jstat -class file:///\f[R]\f[I]path\f[R]\f[V]/hsperfdata_\f[R]\f[I]pid\f[R] .RE .RS .PP -\f[CB]jstat\ \-gc\ file:///\f[R]\f[I]path\f[R]\f[CB]/hsperfdata_\f[R]\f[I]pid\f[R] +\f[V]jstat -gc file:///\f[R]\f[I]path\f[R]\f[V]/hsperfdata_\f[R]\f[I]pid\f[R] .RE .RE .TP -.B \f[CB]\-XX:+UsePerfData\f[R] -Enables the \f[CB]perfdata\f[R] feature. +\f[V]-XX:+UsePerfData\f[R] +Enables the \f[V]perfdata\f[R] feature. This option is enabled by default to allow JVM monitoring and performance testing. -Disabling it suppresses the creation of the \f[CB]hsperfdata_userid\f[R] +Disabling it suppresses the creation of the \f[V]hsperfdata_userid\f[R] directories. -To disable the \f[CB]perfdata\f[R] feature, specify -\f[CB]\-XX:\-UsePerfData\f[R]. -.RS -.RE +To disable the \f[V]perfdata\f[R] feature, specify +\f[V]-XX:-UsePerfData\f[R]. .SH ADVANCED GARBAGE COLLECTION OPTIONS FOR JAVA .PP -These \f[CB]java\f[R] options control how garbage collection (GC) is +These \f[V]java\f[R] options control how garbage collection (GC) is performed by the Java HotSpot VM. .TP -.B \f[CB]\-XX:+AggressiveHeap\f[R] +\f[V]-XX:+AggressiveHeap\f[R] Enables Java heap optimization. -This sets various parameters to be optimal for long\-running jobs with +This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU). By default, the option is disabled and the heap sizes are configured less aggressively. -.RS -.RE .TP -.B \f[CB]\-XX:+AlwaysPreTouch\f[R] +\f[V]-XX:+AlwaysPreTouch\f[R] Requests the VM to touch every page on the Java heap after requesting it from the operating system and before handing memory out to the application. By default, this option is disabled and all pages are committed as the application uses the heap space. -.RS -.RE .TP -.B \f[CB]\-XX:ConcGCThreads=\f[R]\f[I]threads\f[R] +\f[V]-XX:ConcGCThreads=\f[R]\f[I]threads\f[R] Sets the number of threads used for concurrent GC. -Sets \f[I]\f[CI]threads\f[I]\f[R] to approximately 1/4 of the number of +Sets \f[I]\f[VI]threads\f[I]\f[R] to approximately 1/4 of the number of parallel garbage collection threads. The default value depends on the number of CPUs available to the JVM. .RS @@ -3208,42 +2921,36 @@ For example, to set the number of threads for concurrent GC to 2, specify the following option: .RS .PP -\f[CB]\-XX:ConcGCThreads=2\f[R] +\f[V]-XX:ConcGCThreads=2\f[R] .RE .RE .TP -.B \f[CB]\-XX:+DisableExplicitGC\f[R] +\f[V]-XX:+DisableExplicitGC\f[R] Enables the option that disables processing of calls to the -\f[CB]System.gc()\f[R] method. +\f[V]System.gc()\f[R] method. This option is disabled by default, meaning that calls to -\f[CB]System.gc()\f[R] are processed. -If processing of calls to \f[CB]System.gc()\f[R] is disabled, then the JVM -still performs GC when necessary. -.RS -.RE +\f[V]System.gc()\f[R] are processed. +If processing of calls to \f[V]System.gc()\f[R] is disabled, then the +JVM still performs GC when necessary. .TP -.B \f[CB]\-XX:+ExplicitGCInvokesConcurrent\f[R] -Enables invoking of concurrent GC by using the \f[CB]System.gc()\f[R] +\f[V]-XX:+ExplicitGCInvokesConcurrent\f[R] +Enables invoking of concurrent GC by using the \f[V]System.gc()\f[R] request. This option is disabled by default and can be enabled only with the -\f[CB]\-XX:+UseG1GC\f[R] option. -.RS -.RE +\f[V]-XX:+UseG1GC\f[R] option. .TP -.B \f[CB]\-XX:G1AdaptiveIHOPNumInitialSamples=\f[R]\f[I]number\f[R] -When \f[CB]\-XX:UseAdaptiveIHOP\f[R] is enabled, this option sets the +\f[V]-XX:G1AdaptiveIHOPNumInitialSamples=\f[R]\f[I]number\f[R] +When \f[V]-XX:UseAdaptiveIHOP\f[R] is enabled, this option sets the number of completed marking cycles used to gather samples until G1 adaptively determines the optimum value of -\f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R]. +\f[V]-XX:InitiatingHeapOccupancyPercent\f[R]. Before, G1 uses the value of -\f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R] directly for this purpose. +\f[V]-XX:InitiatingHeapOccupancyPercent\f[R] directly for this purpose. The default value is 3. -.RS -.RE .TP -.B \f[CB]\-XX:G1HeapRegionSize=\f[R]\f[I]size\f[R] +\f[V]-XX:G1HeapRegionSize=\f[R]\f[I]size\f[R] Sets the size of the regions into which the Java heap is subdivided when -using the garbage\-first (G1) collector. +using the garbage-first (G1) collector. The value is a power of 2 and can range from 1 MB to 32 MB. The default region size is determined ergonomically based on the heap size with a goal of approximately 2048 regions. @@ -3252,39 +2959,35 @@ size with a goal of approximately 2048 regions. The following example sets the size of the subdivisions to 16 MB: .RS .PP -\f[CB]\-XX:G1HeapRegionSize=16m\f[R] +\f[V]-XX:G1HeapRegionSize=16m\f[R] .RE .RE .TP -.B \f[CB]\-XX:G1HeapWastePercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:G1HeapWastePercent=\f[R]\f[I]percent\f[R] Sets the percentage of heap that you\[aq]re willing to waste. The Java HotSpot VM doesn\[aq]t initiate the mixed garbage collection cycle when the reclaimable percentage is less than the heap waste percentage. The default is 5 percent. -.RS -.RE .TP -.B \f[CB]\-XX:G1MaxNewSizePercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:G1MaxNewSizePercent=\f[R]\f[I]percent\f[R] Sets the percentage of the heap size to use as the maximum for the young generation size. The default value is 60 percent of your Java heap. .RS .PP This is an experimental flag. -This setting replaces the \f[CB]\-XX:DefaultMaxNewGenPercent\f[R] setting. +This setting replaces the \f[V]-XX:DefaultMaxNewGenPercent\f[R] setting. .RE .TP -.B \f[CB]\-XX:G1MixedGCCountTarget=\f[R]\f[I]number\f[R] +\f[V]-XX:G1MixedGCCountTarget=\f[R]\f[I]number\f[R] Sets the target number of mixed garbage collections after a marking cycle to collect old regions with at most -\f[CB]G1MixedGCLIveThresholdPercent\f[R] live data. +\f[V]G1MixedGCLIveThresholdPercent\f[R] live data. The default is 8 mixed garbage collections. The goal for mixed collections is to be within this target number. -.RS -.RE .TP -.B \f[CB]\-XX:G1MixedGCLiveThresholdPercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:G1MixedGCLiveThresholdPercent=\f[R]\f[I]percent\f[R] Sets the occupancy threshold for an old region to be included in a mixed garbage collection cycle. The default occupancy is 85 percent. @@ -3292,27 +2995,25 @@ The default occupancy is 85 percent. .PP This is an experimental flag. This setting replaces the -\f[CB]\-XX:G1OldCSetRegionLiveThresholdPercent\f[R] setting. +\f[V]-XX:G1OldCSetRegionLiveThresholdPercent\f[R] setting. .RE .TP -.B \f[CB]\-XX:G1NewSizePercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:G1NewSizePercent=\f[R]\f[I]percent\f[R] Sets the percentage of the heap to use as the minimum for the young generation size. The default value is 5 percent of your Java heap. .RS .PP This is an experimental flag. -This setting replaces the \f[CB]\-XX:DefaultMinNewGenPercent\f[R] setting. +This setting replaces the \f[V]-XX:DefaultMinNewGenPercent\f[R] setting. .RE .TP -.B \f[CB]\-XX:G1OldCSetRegionThresholdPercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:G1OldCSetRegionThresholdPercent=\f[R]\f[I]percent\f[R] Sets an upper limit on the number of old regions to be collected during a mixed garbage collection cycle. The default is 10 percent of the Java heap. -.RS -.RE .TP -.B \f[CB]\-XX:G1ReservePercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:G1ReservePercent=\f[R]\f[I]percent\f[R] Sets the percentage of the heap (0 to 50) that\[aq]s reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector. @@ -3324,33 +3025,33 @@ By default, this option is set to 10%. The following example sets the reserved heap to 20%: .RS .PP -\f[CB]\-XX:G1ReservePercent=20\f[R] +\f[V]-XX:G1ReservePercent=20\f[R] .RE .RE .TP -.B \f[CB]\-XX:+G1UseAdaptiveIHOP\f[R] +\f[V]-XX:+G1UseAdaptiveIHOP\f[R] Controls adaptive calculation of the old generation occupancy to start background work preparing for an old generation collection. -If enabled, G1 uses \f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R] for the +If enabled, G1 uses \f[V]-XX:InitiatingHeapOccupancyPercent\f[R] for the first few times as specified by the value of -\f[CB]\-XX:G1AdaptiveIHOPNumInitialSamples\f[R], and after that adaptively +\f[V]-XX:G1AdaptiveIHOPNumInitialSamples\f[R], and after that adaptively calculates a new optimum value for the initiating occupancy automatically. Otherwise, the old generation collection process always starts at the old generation occupancy determined by -\f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R]. +\f[V]-XX:InitiatingHeapOccupancyPercent\f[R]. .RS .PP The default is enabled. .RE .TP -.B \f[CB]\-XX:InitialHeapSize=\f[R]\f[I]size\f[R] +\f[V]-XX:InitialHeapSize=\f[R]\f[I]size\f[R] Sets the initial size (in bytes) of the memory allocation pool. This value must be either 0, or a multiple of 1024 and greater than 1 MB. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value is selected at run time based on the system configuration. .RS @@ -3360,27 +3061,27 @@ MB using various units: .IP .nf \f[CB] -\-XX:InitialHeapSize=6291456 -\-XX:InitialHeapSize=6144k -\-XX:InitialHeapSize=6m +-XX:InitialHeapSize=6291456 +-XX:InitialHeapSize=6144k +-XX:InitialHeapSize=6m \f[R] .fi .PP If you set this option to 0, then the initial size is set as the sum of the sizes allocated for the old generation and the young generation. The size of the heap for the young generation can be set using the -\f[CB]\-XX:NewSize\f[R] option. -Note that the \f[CB]\-Xms\f[R] option sets both the minimum and the +\f[V]-XX:NewSize\f[R] option. +Note that the \f[V]-Xms\f[R] option sets both the minimum and the initial heap size of the heap. -If \f[CB]\-Xms\f[R] appears after \f[CB]\-XX:InitialHeapSize\f[R] on the +If \f[V]-Xms\f[R] appears after \f[V]-XX:InitialHeapSize\f[R] on the command line, then the initial heap size gets set to the value specified -with \f[CB]\-Xms\f[R]. +with \f[V]-Xms\f[R]. .RE .TP -.B \f[CB]\-XX:InitialRAMPercentage=\f[R]\f[I]percent\f[R] +\f[V]-XX:InitialRAMPercentage=\f[R]\f[I]percent\f[R] Sets the initial amount of memory that the JVM will use for the Java heap before applying ergonomics heuristics as a percentage of the -maximum amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] +maximum amount determined as described in the \f[V]-XX:MaxRAM\f[R] option. The default value is 1.5625 percent. .RS @@ -3389,20 +3090,20 @@ The following example shows how to set the percentage of the initial amount of memory used for the Java heap: .RS .PP -\f[CB]\-XX:InitialRAMPercentage=5\f[R] +\f[V]-XX:InitialRAMPercentage=5\f[R] .RE .RE .TP -.B \f[CB]\-XX:InitialSurvivorRatio=\f[R]\f[I]ratio\f[R] +\f[V]-XX:InitialSurvivorRatio=\f[R]\f[I]ratio\f[R] Sets the initial survivor space ratio used by the throughput garbage -collector (which is enabled by the \f[CB]\-XX:+UseParallelGC\f[R] option). +collector (which is enabled by the \f[V]-XX:+UseParallelGC\f[R] option). Adaptive sizing is enabled by default with the throughput garbage -collector by using the \f[CB]\-XX:+UseParallelGC\f[R] option, and the +collector by using the \f[V]-XX:+UseParallelGC\f[R] option, and the survivor space is resized according to the application behavior, starting with the initial value. If adaptive sizing is disabled (using the -\f[CB]\-XX:\-UseAdaptiveSizePolicy\f[R] option), then the -\f[CB]\-XX:SurvivorRatio\f[R] option should be used to set the size of the +\f[V]-XX:-UseAdaptiveSizePolicy\f[R] option), then the +\f[V]-XX:SurvivorRatio\f[R] option should be used to set the size of the survivor space for the entire execution of the application. .RS .PP @@ -3411,7 +3112,7 @@ survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R): .RS .PP -\f[CB]S=Y/(R+2)\f[R] +\f[V]S=Y/(R+2)\f[R] .RE .PP The 2 in the equation denotes two survivor spaces. @@ -3426,11 +3127,11 @@ The following example shows how to set the initial survivor space ratio to 4: .RS .PP -\f[CB]\-XX:InitialSurvivorRatio=4\f[R] +\f[V]-XX:InitialSurvivorRatio=4\f[R] .RE .RE .TP -.B \f[CB]\-XX:InitiatingHeapOccupancyPercent=\f[R]\f[I]percent\f[R] +\f[V]-XX:InitiatingHeapOccupancyPercent=\f[R]\f[I]percent\f[R] Sets the percentage of the old generation occupancy (0 to 100) at which to start the first few concurrent marking cycles for the G1 garbage collector. @@ -3440,18 +3141,18 @@ By default, the initiating value is set to 45%. A value of 0 implies nonstop concurrent GC cycles from the beginning until G1 adaptively sets this value. .PP -See also the \f[CB]\-XX:G1UseAdaptiveIHOP\f[R] and -\f[CB]\-XX:G1AdaptiveIHOPNumInitialSamples\f[R] options. +See also the \f[V]-XX:G1UseAdaptiveIHOP\f[R] and +\f[V]-XX:G1AdaptiveIHOPNumInitialSamples\f[R] options. .PP The following example shows how to set the initiating heap occupancy to 75%: .RS .PP -\f[CB]\-XX:InitiatingHeapOccupancyPercent=75\f[R] +\f[V]-XX:InitiatingHeapOccupancyPercent=75\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxGCPauseMillis=\f[R]\f[I]time\f[R] +\f[V]-XX:MaxGCPauseMillis=\f[R]\f[I]time\f[R] Sets a target for the maximum GC pause time (in milliseconds). This is a soft goal, and the JVM will make its best effort to achieve it. @@ -3465,20 +3166,20 @@ The following example shows how to set the maximum target pause time to 500 ms: .RS .PP -\f[CB]\-XX:MaxGCPauseMillis=500\f[R] +\f[V]-XX:MaxGCPauseMillis=500\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxHeapSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MaxHeapSize=\f[R]\f[I]size\f[R] Sets the maximum size (in byes) of the memory allocation pool. This value must be a multiple of 1024 and greater than 2 MB. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value is selected at run time based on the system configuration. -For server deployments, the options \f[CB]\-XX:InitialHeapSize\f[R] and -\f[CB]\-XX:MaxHeapSize\f[R] are often set to the same value. +For server deployments, the options \f[V]-XX:InitialHeapSize\f[R] and +\f[V]-XX:MaxHeapSize\f[R] are often set to the same value. .RS .PP The following examples show how to set the maximum allowed size of @@ -3486,16 +3187,16 @@ allocated memory to 80 MB using various units: .IP .nf \f[CB] -\-XX:MaxHeapSize=83886080 -\-XX:MaxHeapSize=81920k -\-XX:MaxHeapSize=80m +-XX:MaxHeapSize=83886080 +-XX:MaxHeapSize=81920k +-XX:MaxHeapSize=80m \f[R] .fi .PP -The \f[CB]\-XX:MaxHeapSize\f[R] option is equivalent to \f[CB]\-Xmx\f[R]. +The \f[V]-XX:MaxHeapSize\f[R] option is equivalent to \f[V]-Xmx\f[R]. .RE .TP -.B \f[CB]\-XX:MaxHeapFreeRatio=\f[R]\f[I]percent\f[R] +\f[V]-XX:MaxHeapFreeRatio=\f[R]\f[I]percent\f[R] Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event. If free heap space expands above this value, then the heap is shrunk. @@ -3503,29 +3204,29 @@ By default, this value is set to 70%. .RS .PP Minimize the Java heap size by lowering the values of the parameters -\f[CB]MaxHeapFreeRatio\f[R] (default value is 70%) and -\f[CB]MinHeapFreeRatio\f[R] (default value is 40%) with the command\-line -options \f[CB]\-XX:MaxHeapFreeRatio\f[R] and -\f[CB]\-XX:MinHeapFreeRatio\f[R]. -Lowering \f[CB]MaxHeapFreeRatio\f[R] to as low as 10% and -\f[CB]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size +\f[V]MaxHeapFreeRatio\f[R] (default value is 70%) and +\f[V]MinHeapFreeRatio\f[R] (default value is 40%) with the command-line +options \f[V]-XX:MaxHeapFreeRatio\f[R] and +\f[V]-XX:MinHeapFreeRatio\f[R]. +Lowering \f[V]MaxHeapFreeRatio\f[R] to as low as 10% and +\f[V]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size without too much performance regression; however, results may vary greatly depending on your application. Try different values for these parameters until they\[aq]re as low as possible yet still retain acceptable performance. .RS .PP -\f[CB]\-XX:MaxHeapFreeRatio=10\ \-XX:MinHeapFreeRatio=5\f[R] +\f[V]-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5\f[R] .RE .PP Customers trying to keep the heap small should also add the option -\f[CB]\-XX:\-ShrinkHeapInSteps\f[R]. -See \f[B]Performance Tuning Examples\f[R] for a description of using this -option to keep the Java heap small by reducing the dynamic footprint for -embedded applications. +\f[V]-XX:-ShrinkHeapInSteps\f[R]. +See \f[B]Performance Tuning Examples\f[R] for a description of using +this option to keep the Java heap small by reducing the dynamic +footprint for embedded applications. .RE .TP -.B \f[CB]\-XX:MaxMetaspaceSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MaxMetaspaceSize=\f[R]\f[I]size\f[R] Sets the maximum amount of native memory that can be allocated for class metadata. By default, the size isn\[aq]t limited. @@ -3538,18 +3239,16 @@ The following example shows how to set the maximum class metadata size to 256 MB: .RS .PP -\f[CB]\-XX:MaxMetaspaceSize=256m\f[R] +\f[V]-XX:MaxMetaspaceSize=256m\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxNewSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MaxNewSize=\f[R]\f[I]size\f[R] Sets the maximum size (in bytes) of the heap for the young generation (nursery). The default value is set ergonomically. -.RS -.RE .TP -.B \f[CB]\-XX:MaxRAM=\f[R]\f[I]size\f[R] +\f[V]-XX:MaxRAM=\f[R]\f[I]size\f[R] Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics. The default value is the maximum amount of available memory to the JVM @@ -3565,21 +3264,21 @@ Specifying this option disables automatic use of compressed oops if the combined result of this and other options influencing the maximum amount of memory is larger than the range of memory addressable by compressed oops. -See \f[CB]\-XX:UseCompressedOops\f[R] for further information about +See \f[V]-XX:UseCompressedOops\f[R] for further information about compressed oops. .PP The following example shows how to set the maximum amount of available memory for sizing the Java heap to 2 GB: .RS .PP -\f[CB]\-XX:MaxRAM=2G\f[R] +\f[V]-XX:MaxRAM=2G\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxRAMPercentage=\f[R]\f[I]percent\f[R] +\f[V]-XX:MaxRAMPercentage=\f[R]\f[I]percent\f[R] Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum -amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option. +amount determined as described in the \f[V]-XX:MaxRAM\f[R] option. The default value is 25 percent. .RS .PP @@ -3587,21 +3286,21 @@ Specifying this option disables automatic use of compressed oops if the combined result of this and other options influencing the maximum amount of memory is larger than the range of memory addressable by compressed oops. -See \f[CB]\-XX:UseCompressedOops\f[R] for further information about +See \f[V]-XX:UseCompressedOops\f[R] for further information about compressed oops. .PP The following example shows how to set the percentage of the maximum amount of memory used for the Java heap: .RS .PP -\f[CB]\-XX:MaxRAMPercentage=75\f[R] +\f[V]-XX:MaxRAMPercentage=75\f[R] .RE .RE .TP -.B \f[CB]\-XX:MinRAMPercentage=\f[R]\f[I]percent\f[R] +\f[V]-XX:MinRAMPercentage=\f[R]\f[I]percent\f[R] Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum -amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option for +amount determined as described in the \f[V]-XX:MaxRAM\f[R] option for small heaps. A small heap is a heap of approximately 125 MB. The default value is 50 percent. @@ -3611,11 +3310,11 @@ The following example shows how to set the percentage of the maximum amount of memory used for the Java heap for small heaps: .RS .PP -\f[CB]\-XX:MinRAMPercentage=75\f[R] +\f[V]-XX:MinRAMPercentage=75\f[R] .RE .RE .TP -.B \f[CB]\-XX:MaxTenuringThreshold=\f[R]\f[I]threshold\f[R] +\f[V]-XX:MaxTenuringThreshold=\f[R]\f[I]threshold\f[R] Sets the maximum tenuring threshold for use in adaptive GC sizing. The largest value is 15. The default value is 15 for the parallel (throughput) collector. @@ -3625,20 +3324,18 @@ The following example shows how to set the maximum tenuring threshold to 10: .RS .PP -\f[CB]\-XX:MaxTenuringThreshold=10\f[R] +\f[V]-XX:MaxTenuringThreshold=10\f[R] .RE .RE .TP -.B \f[CB]\-XX:MetaspaceSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MetaspaceSize=\f[R]\f[I]size\f[R] Sets the size of the allocated class metadata space that triggers a garbage collection the first time it\[aq]s exceeded. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used. The default size depends on the platform. -.RS -.RE .TP -.B \f[CB]\-XX:MinHeapFreeRatio=\f[R]\f[I]percent\f[R] +\f[V]-XX:MinHeapFreeRatio=\f[R]\f[I]percent\f[R] Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event. If free heap space falls below this value, then the heap is expanded. @@ -3646,35 +3343,35 @@ By default, this value is set to 40%. .RS .PP Minimize Java heap size by lowering the values of the parameters -\f[CB]MaxHeapFreeRatio\f[R] (default value is 70%) and -\f[CB]MinHeapFreeRatio\f[R] (default value is 40%) with the command\-line -options \f[CB]\-XX:MaxHeapFreeRatio\f[R] and -\f[CB]\-XX:MinHeapFreeRatio\f[R]. -Lowering \f[CB]MaxHeapFreeRatio\f[R] to as low as 10% and -\f[CB]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size +\f[V]MaxHeapFreeRatio\f[R] (default value is 70%) and +\f[V]MinHeapFreeRatio\f[R] (default value is 40%) with the command-line +options \f[V]-XX:MaxHeapFreeRatio\f[R] and +\f[V]-XX:MinHeapFreeRatio\f[R]. +Lowering \f[V]MaxHeapFreeRatio\f[R] to as low as 10% and +\f[V]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size without too much performance regression; however, results may vary greatly depending on your application. Try different values for these parameters until they\[aq]re as low as possible, yet still retain acceptable performance. .RS .PP -\f[CB]\-XX:MaxHeapFreeRatio=10\ \-XX:MinHeapFreeRatio=5\f[R] +\f[V]-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5\f[R] .RE .PP Customers trying to keep the heap small should also add the option -\f[CB]\-XX:\-ShrinkHeapInSteps\f[R]. -See \f[B]Performance Tuning Examples\f[R] for a description of using this -option to keep the Java heap small by reducing the dynamic footprint for -embedded applications. +\f[V]-XX:-ShrinkHeapInSteps\f[R]. +See \f[B]Performance Tuning Examples\f[R] for a description of using +this option to keep the Java heap small by reducing the dynamic +footprint for embedded applications. .RE .TP -.B \f[CB]\-XX:MinHeapSize=\f[R]\f[I]size\f[R] +\f[V]-XX:MinHeapSize=\f[R]\f[I]size\f[R] Sets the minimum size (in bytes) of the memory allocation pool. This value must be either 0, or a multiple of 1024 and greater than 1 MB. -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. The default value is selected at run time based on the system configuration. .RS @@ -3684,9 +3381,9 @@ memory to 6 MB using various units: .IP .nf \f[CB] -\-XX:MinHeapSize=6291456 -\-XX:MinHeapSize=6144k -\-XX:MinHeapSize=6m +-XX:MinHeapSize=6291456 +-XX:MinHeapSize=6144k +-XX:MinHeapSize=6m \f[R] .fi .PP @@ -3694,23 +3391,23 @@ If you set this option to 0, then the minimum size is set to the same value as the initial size. .RE .TP -.B \f[CB]\-XX:NewRatio=\f[R]\f[I]ratio\f[R] +\f[V]-XX:NewRatio=\f[R]\f[I]ratio\f[R] Sets the ratio between young and old generation sizes. By default, this option is set to 2. -The following example shows how to set the young\-to\-old ratio to 1: +The following example shows how to set the young-to-old ratio to 1: .RS .RS .PP -\f[CB]\-XX:NewRatio=1\f[R] +\f[V]-XX:NewRatio=1\f[R] .RE .RE .TP -.B \f[CB]\-XX:NewSize=\f[R]\f[I]size\f[R] +\f[V]-XX:NewSize=\f[R]\f[I]size\f[R] Sets the initial size (in bytes) of the heap for the young generation (nursery). -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. .RS .PP The young generation region of the heap is used for new objects. @@ -3727,17 +3424,17 @@ generation to 256 MB using various units: .IP .nf \f[CB] -\-XX:NewSize=256m -\-XX:NewSize=262144k -\-XX:NewSize=268435456 +-XX:NewSize=256m +-XX:NewSize=262144k +-XX:NewSize=268435456 \f[R] .fi .PP -The \f[CB]\-XX:NewSize\f[R] option is equivalent to \f[CB]\-Xmn\f[R]. +The \f[V]-XX:NewSize\f[R] option is equivalent to \f[V]-Xmn\f[R]. .RE .TP -.B \f[CB]\-XX:ParallelGCThreads=\f[R]\f[I]threads\f[R] -Sets the number of the stop\-the\-world (STW) worker threads. +\f[V]-XX:ParallelGCThreads=\f[R]\f[I]threads\f[R] +Sets the number of the stop-the-world (STW) worker threads. The default value depends on the number of CPUs available to the JVM and the garbage collector selected. .RS @@ -3746,23 +3443,19 @@ For example, to set the number of threads for G1 GC to 2, specify the following option: .RS .PP -\f[CB]\-XX:ParallelGCThreads=2\f[R] +\f[V]-XX:ParallelGCThreads=2\f[R] .RE .RE .TP -.B \f[CB]\-XX:+ParallelRefProcEnabled\f[R] +\f[V]-XX:+ParallelRefProcEnabled\f[R] Enables parallel reference processing. By default, this option is disabled. -.RS -.RE .TP -.B \f[CB]\-XX:+PrintAdaptiveSizePolicy\f[R] -Enables printing of information about adaptive\-generation sizing. +\f[V]-XX:+PrintAdaptiveSizePolicy\f[R] +Enables printing of information about adaptive-generation sizing. By default, this option is disabled. -.RS -.RE .TP -.B \f[CB]\-XX:+ScavengeBeforeFullGC\f[R] +\f[V]-XX:+ScavengeBeforeFullGC\f[R] Enables GC of the young generation before each full GC. This option is enabled by default. It is recommended that you \f[I]don\[aq]t\f[R] disable it, because @@ -3770,34 +3463,32 @@ scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space. To disable GC of the young generation before each full GC, specify the -option \f[CB]\-XX:\-ScavengeBeforeFullGC\f[R]. -.RS -.RE +option \f[V]-XX:-ScavengeBeforeFullGC\f[R]. .TP -.B \f[CB]\-XX:SoftRefLRUPolicyMSPerMB=\f[R]\f[I]time\f[R] +\f[V]-XX:SoftRefLRUPolicyMSPerMB=\f[R]\f[I]time\f[R] Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced. The default value is one second of lifetime per free megabyte in the heap. -The \f[CB]\-XX:SoftRefLRUPolicyMSPerMB\f[R] option accepts integer values +The \f[V]-XX:SoftRefLRUPolicyMSPerMB\f[R] option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM). This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references. -In the latter case, the value of the \f[CB]\-Xmx\f[R] option has a +In the latter case, the value of the \f[V]-Xmx\f[R] option has a significant effect on how quickly soft references are garbage collected. .RS .PP The following example shows how to set the value to 2.5 seconds: .PP -\f[CB]\-XX:SoftRefLRUPolicyMSPerMB=2500\f[R] +\f[V]-XX:SoftRefLRUPolicyMSPerMB=2500\f[R] .RE .TP -.B \f[CB]\-XX:\-ShrinkHeapInSteps\f[R] +\f[V]-XX:-ShrinkHeapInSteps\f[R] Incrementally reduces the Java heap to the target size, specified by the -option \f[CB]\-XX:MaxHeapFreeRatio\f[R]. +option \f[V]-XX:MaxHeapFreeRatio\f[R]. This option is enabled by default. If disabled, then it immediately reduces the Java heap to the target size instead of requiring multiple garbage collection cycles. @@ -3807,12 +3498,12 @@ disabled. .RS .PP See \f[B]Performance Tuning Examples\f[R] for a description of using the -\f[CB]MaxHeapFreeRatio\f[R] option to keep the Java heap small by reducing -the dynamic footprint for embedded applications. +\f[V]MaxHeapFreeRatio\f[R] option to keep the Java heap small by +reducing the dynamic footprint for embedded applications. .RE .TP -.B \f[CB]\-XX:StringDeduplicationAgeThreshold=\f[R]\f[I]threshold\f[R] -Identifies \f[CB]String\f[R] objects reaching the specified age that are +\f[V]-XX:StringDeduplicationAgeThreshold=\f[R]\f[I]threshold\f[R] +Identifies \f[V]String\f[R] objects reaching the specified age that are considered candidates for deduplication. An object\[aq]s age is a measure of how many times it has survived garbage collection. @@ -3820,15 +3511,15 @@ This is sometimes referred to as tenuring. .RS .RS .PP -\f[B]Note:\f[R] \f[CB]String\f[R] objects that are promoted to an old heap -region before this age has been reached are always considered candidates -for deduplication. -The default value for this option is \f[CB]3\f[R]. -See the \f[CB]\-XX:+UseStringDeduplication\f[R] option. +\f[B]Note:\f[R] \f[V]String\f[R] objects that are promoted to an old +heap region before this age has been reached are always considered +candidates for deduplication. +The default value for this option is \f[V]3\f[R]. +See the \f[V]-XX:+UseStringDeduplication\f[R] option. .RE .RE .TP -.B \f[CB]\-XX:SurvivorRatio=\f[R]\f[I]ratio\f[R] +\f[V]-XX:SurvivorRatio=\f[R]\f[I]ratio\f[R] Sets the ratio between eden space size and survivor space size. By default, this option is set to 8. The following example shows how to set the eden/survivor space ratio to @@ -3836,11 +3527,11 @@ The following example shows how to set the eden/survivor space ratio to .RS .RS .PP -\f[CB]\-XX:SurvivorRatio=4\f[R] +\f[V]-XX:SurvivorRatio=4\f[R] .RE .RE .TP -.B \f[CB]\-XX:TargetSurvivorRatio=\f[R]\f[I]percent\f[R] +\f[V]-XX:TargetSurvivorRatio=\f[R]\f[I]percent\f[R] Sets the desired percentage of survivor space (0 to 100) used after young garbage collection. By default, this option is set to 50%. @@ -3850,16 +3541,16 @@ The following example shows how to set the target survivor space ratio to 30%: .RS .PP -\f[CB]\-XX:TargetSurvivorRatio=30\f[R] +\f[V]-XX:TargetSurvivorRatio=30\f[R] .RE .RE .TP -.B \f[CB]\-XX:TLABSize=\f[R]\f[I]size\f[R] -Sets the initial size (in bytes) of a thread\-local allocation buffer +\f[V]-XX:TLABSize=\f[R]\f[I]size\f[R] +Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB). -Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes, -\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or -\f[CB]G\f[R] to indicate gigabytes. +Append the letter \f[V]k\f[R] or \f[V]K\f[R] to indicate kilobytes, +\f[V]m\f[R] or \f[V]M\f[R] to indicate megabytes, or \f[V]g\f[R] or +\f[V]G\f[R] to indicate gigabytes. If this option is set to 0, then the JVM selects the initial size automatically. .RS @@ -3867,23 +3558,21 @@ automatically. The following example shows how to set the initial TLAB size to 512 KB: .RS .PP -\f[CB]\-XX:TLABSize=512k\f[R] +\f[V]-XX:TLABSize=512k\f[R] .RE .RE .TP -.B \f[CB]\-XX:+UseAdaptiveSizePolicy\f[R] +\f[V]-XX:+UseAdaptiveSizePolicy\f[R] Enables the use of adaptive generation sizing. This option is enabled by default. To disable adaptive generation sizing, specify -\f[CB]\-XX:\-UseAdaptiveSizePolicy\f[R] and set the size of the memory +\f[V]-XX:-UseAdaptiveSizePolicy\f[R] and set the size of the memory allocation pool explicitly. -See the \f[CB]\-XX:SurvivorRatio\f[R] option. -.RS -.RE +See the \f[V]-XX:SurvivorRatio\f[R] option. .TP -.B \f[CB]\-XX:+UseG1GC\f[R] -Enables the use of the garbage\-first (G1) garbage collector. -It\[aq]s a server\-style garbage collector, targeted for multiprocessor +\f[V]-XX:+UseG1GC\f[R] +Enables the use of the garbage-first (G1) garbage collector. +It\[aq]s a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM. This option meets GC pause time goals with high probability, while maintaining good throughput. @@ -3892,34 +3581,28 @@ The G1 collector is recommended for applications requiring large heaps stable and predictable pause time below 0.5 seconds). By default, this option is enabled and G1 is used as the default garbage collector. -.RS -.RE .TP -.B \f[CB]\-XX:+UseGCOverheadLimit\f[R] +\f[V]-XX:+UseGCOverheadLimit\f[R] Enables the use of a policy that limits the proportion of time spent by -the JVM on GC before an \f[CB]OutOfMemoryError\f[R] exception is thrown. +the JVM on GC before an \f[V]OutOfMemoryError\f[R] exception is thrown. This option is enabled, by default, and the parallel GC will throw an -\f[CB]OutOfMemoryError\f[R] if more than 98% of the total time is spent on -garbage collection and less than 2% of the heap is recovered. +\f[V]OutOfMemoryError\f[R] if more than 98% of the total time is spent +on garbage collection and less than 2% of the heap is recovered. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress. To disable this option, specify the option -\f[CB]\-XX:\-UseGCOverheadLimit\f[R]. -.RS -.RE +\f[V]-XX:-UseGCOverheadLimit\f[R]. .TP -.B \f[CB]\-XX:+UseNUMA\f[R] +\f[V]-XX:+UseNUMA\f[R] Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\[aq]s use of lower latency memory. By default, this option is disabled and no optimization for NUMA is made. The option is available only when the parallel garbage collector is used -(\f[CB]\-XX:+UseParallelGC\f[R]). -.RS -.RE +(\f[V]-XX:+UseParallelGC\f[R]). .TP -.B \f[CB]\-XX:+UseParallelGC\f[R] +\f[V]-XX:+UseParallelGC\f[R] Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors. @@ -3928,15 +3611,13 @@ application by leveraging multiple processors. By default, this option is disabled and the default collector is used. .RE .TP -.B \f[CB]\-XX:+UseSerialGC\f[R] +\f[V]-XX:+UseSerialGC\f[R] Enables the use of the serial garbage collector. This is generally the best choice for small and simple applications that don\[aq]t require any special functionality from garbage collection. By default, this option is disabled and the default collector is used. -.RS -.RE .TP -.B \f[CB]\-XX:+UseSHM\f[R] +\f[V]-XX:+UseSHM\f[R] \f[B]Linux only:\f[R] Enables the JVM to use shared memory to set up large pages. .RS @@ -3944,63 +3625,53 @@ large pages. See \f[B]Large Pages\f[R] for setting up large pages. .RE .TP -.B \f[CB]\-XX:+UseStringDeduplication\f[R] +\f[V]-XX:+UseStringDeduplication\f[R] Enables string deduplication. By default, this option is disabled. -To use this option, you must enable the garbage\-first (G1) garbage +To use this option, you must enable the garbage-first (G1) garbage collector. .RS .PP -String deduplication reduces the memory footprint of \f[CB]String\f[R] +String deduplication reduces the memory footprint of \f[V]String\f[R] objects on the Java heap by taking advantage of the fact that many -\f[CB]String\f[R] objects are identical. -Instead of each \f[CB]String\f[R] object pointing to its own character -array, identical \f[CB]String\f[R] objects can point to and share the same -character array. +\f[V]String\f[R] objects are identical. +Instead of each \f[V]String\f[R] object pointing to its own character +array, identical \f[V]String\f[R] objects can point to and share the +same character array. .RE .TP -.B \f[CB]\-XX:+UseTLAB\f[R] -Enables the use of thread\-local allocation blocks (TLABs) in the young +\f[V]-XX:+UseTLAB\f[R] +Enables the use of thread-local allocation blocks (TLABs) in the young generation space. This option is enabled by default. -To disable the use of TLABs, specify the option \f[CB]\-XX:\-UseTLAB\f[R]. -.RS -.RE +To disable the use of TLABs, specify the option \f[V]-XX:-UseTLAB\f[R]. .TP -.B \f[CB]\-XX:+UseZGC\f[R] +\f[V]-XX:+UseZGC\f[R] Enables the use of the Z garbage collector (ZGC). This is a low latency garbage collector, providing max pause times of a few milliseconds, at some throughput cost. Pause times are independent of what heap size is used. Supports heap sizes from 8MB to 16TB. -.RS -.RE .TP -.B \f[CB]\-XX:ZAllocationSpikeTolerance=\f[R]\f[I]factor\f[R] +\f[V]-XX:ZAllocationSpikeTolerance=\f[R]\f[I]factor\f[R] Sets the allocation spike tolerance for ZGC. By default, this option is set to 2.0. This factor describes the level of allocation spikes to expect. For example, using a factor of 3.0 means the current allocation rate can be expected to triple at any time. -.RS -.RE .TP -.B \f[CB]\-XX:ZCollectionInterval=\f[R]\f[I]seconds\f[R] +\f[V]-XX:ZCollectionInterval=\f[R]\f[I]seconds\f[R] Sets the maximum interval (in seconds) between two GC cycles when using ZGC. By default, this option is set to 0 (disabled). -.RS -.RE .TP -.B \f[CB]\-XX:ZFragmentationLimit=\f[R]\f[I]percent\f[R] +\f[V]-XX:ZFragmentationLimit=\f[R]\f[I]percent\f[R] Sets the maximum acceptable heap fragmentation (in percent) for ZGC. By default, this option is set to 25. Using a lower value will cause the heap to be compacted more aggressively, to reclaim more memory at the cost of using more CPU time. -.RS -.RE .TP -.B \f[CB]\-XX:+ZProactive\f[R] +\f[V]-XX:+ZProactive\f[R] Enables proactive GC cycles when using ZGC. By default, this option is enabled. ZGC will start a proactive GC cycle if doing so is expected to have @@ -4009,77 +3680,67 @@ This is useful if the application is mostly idle or allocates very few objects, but you still want to keep the heap size down and allow reference processing to happen even when there are a lot of free space on the heap. -.RS -.RE .TP -.B \f[CB]\-XX:+ZUncommit\f[R] +\f[V]-XX:+ZUncommit\f[R] Enables uncommitting of unused heap memory when using ZGC. By default, this option is enabled. Uncommitting unused heap memory will lower the memory footprint of the JVM, and make that memory available for other processes to use. -.RS -.RE .TP -.B \f[CB]\-XX:ZUncommitDelay=\f[R]\f[I]seconds\f[R] +\f[V]-XX:ZUncommitDelay=\f[R]\f[I]seconds\f[R] Sets the amount of time (in seconds) that heap memory must have been unused before being uncommitted. By default, this option is set to 300 (5 minutes). Committing and uncommitting memory are relatively expensive operations. Using a lower value will cause heap memory to be uncommitted earlier, at the risk of soon having to commit it again. -.RS -.RE .SH DEPRECATED JAVA OPTIONS .PP -These \f[CB]java\f[R] options are deprecated and might be removed in a +These \f[V]java\f[R] options are deprecated and might be removed in a future JDK release. They\[aq]re still accepted and acted upon, but a warning is issued when they\[aq]re used. .TP -.B \f[CB]\-Xfuture\f[R] -Enables strict class\-file format checks that enforce close conformance -to the class\-file format specification. +\f[V]-Xfuture\f[R] +Enables strict class-file format checks that enforce close conformance +to the class-file format specification. Developers should use this flag when developing new code. Stricter checks may become the default in future releases. -.RS -.RE .TP -.B \f[CB]\-Xloggc:\f[R]\f[I]filename\f[R] +\f[V]-Xloggc:\f[R]\f[I]filename\f[R] Sets the file to which verbose GC events information should be redirected for logging. -The \f[CB]\-Xloggc\f[R] option overrides \f[CB]\-verbose:gc\f[R] if both are +The \f[V]-Xloggc\f[R] option overrides \f[V]-verbose:gc\f[R] if both are given with the same java command. -\f[CB]\-Xloggc:\f[R]\f[I]filename\f[R] is replaced by -\f[CB]\-Xlog:gc:\f[R]\f[I]filename\f[R]. +\f[V]-Xloggc:\f[R]\f[I]filename\f[R] is replaced by +\f[V]-Xlog:gc:\f[R]\f[I]filename\f[R]. See Enable Logging with the JVM Unified Logging Framework. .RS .PP Example: .PP -\f[CB]\-Xlog:gc:garbage\-collection.log\f[R] +\f[V]-Xlog:gc:garbage-collection.log\f[R] .RE .TP -.B \f[CB]\-XX:+FlightRecorder\f[R] +\f[V]-XX:+FlightRecorder\f[R] Enables the use of Java Flight Recorder (JFR) during the runtime of the application. Since JDK 8u40 this option has not been required to use JFR. -.RS -.RE .TP -.B \f[CB]\-XX:InitialRAMFraction=\f[R]\f[I]ratio\f[R] +\f[V]-XX:InitialRAMFraction=\f[R]\f[I]ratio\f[R] Sets the initial amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a ratio of the maximum amount -determined as described in the \f[CB]\-XX:MaxRAM\f[R] option. +determined as described in the \f[V]-XX:MaxRAM\f[R] option. The default value is 64. .RS .PP -Use the option \f[CB]\-XX:InitialRAMPercentage\f[R] instead. +Use the option \f[V]-XX:InitialRAMPercentage\f[R] instead. .RE .TP -.B \f[CB]\-XX:MaxRAMFraction=\f[R]\f[I]ratio\f[R] +\f[V]-XX:MaxRAMFraction=\f[R]\f[I]ratio\f[R] Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a fraction of the maximum -amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option. +amount determined as described in the \f[V]-XX:MaxRAM\f[R] option. The default value is 4. .RS .PP @@ -4087,47 +3748,44 @@ Specifying this option disables automatic use of compressed oops if the combined result of this and other options influencing the maximum amount of memory is larger than the range of memory addressable by compressed oops. -See \f[CB]\-XX:UseCompressedOops\f[R] for further information about +See \f[V]-XX:UseCompressedOops\f[R] for further information about compressed oops. .PP -Use the option \f[CB]\-XX:MaxRAMPercentage\f[R] instead. +Use the option \f[V]-XX:MaxRAMPercentage\f[R] instead. .RE .TP -.B \f[CB]\-XX:MinRAMFraction=\f[R]\f[I]ratio\f[R] +\f[V]-XX:MinRAMFraction=\f[R]\f[I]ratio\f[R] Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a fraction of the maximum -amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option for +amount determined as described in the \f[V]-XX:MaxRAM\f[R] option for small heaps. A small heap is a heap of approximately 125 MB. The default value is 2. .RS .PP -Use the option \f[CB]\-XX:MinRAMPercentage\f[R] instead. +Use the option \f[V]-XX:MinRAMPercentage\f[R] instead. .RE .SH OBSOLETE JAVA OPTIONS .PP -These \f[CB]java\f[R] options are still accepted but ignored, and a +These \f[V]java\f[R] options are still accepted but ignored, and a warning is issued when they\[aq]re used. .TP -.B \f[CB]\-\-illegal\-access=\f[R]\f[I]parameter\f[R] -Controlled \f[I]relaxed strong encapsulation\f[R], as defined in \f[B]JEP -261\f[R] [https://openjdk.org/jeps/261#Relaxed\-strong\-encapsulation]. +\f[V]--illegal-access=\f[R]\f[I]parameter\f[R] +Controlled \f[I]relaxed strong encapsulation\f[R], as defined in +\f[B]JEP 261\f[R] +[https://openjdk.org/jeps/261#Relaxed-strong-encapsulation]. This option was deprecated in JDK 16 by \f[B]JEP 396\f[R] [https://openjdk.org/jeps/396] and made obsolete in JDK 17 by \f[B]JEP 403\f[R] [https://openjdk.org/jeps/403]. -.RS -.RE .TP -.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R] -\f[B]Linux and macOS:\f[R] Enables additional \f[CB]dtrace\f[R] tool probes -that affect performance. -By default, this option is disabled and \f[CB]dtrace\f[R] performs only +\f[V]-XX:+ExtendedDTraceProbes\f[R] +\f[B]Linux and macOS:\f[R] Enables additional \f[V]dtrace\f[R] tool +probes that affect performance. +By default, this option is disabled and \f[V]dtrace\f[R] performs only standard probes. Use the combination of these flags instead: -\f[CB]\-XX:+DTraceMethodProbes\f[R], \f[CB]\-XX:+DTraceAllocProbes\f[R], -\f[CB]\-XX:+DTraceMonitorProbes\f[R]. -.RS -.RE +\f[V]-XX:+DTraceMethodProbes\f[R], \f[V]-XX:+DTraceAllocProbes\f[R], +\f[V]-XX:+DTraceMonitorProbes\f[R]. .SH REMOVED JAVA OPTIONS .PP No documented java options have been removed in JDK 20. @@ -4135,32 +3793,32 @@ No documented java options have been removed in JDK 20. For the lists and descriptions of options removed in previous releases see the \f[I]Removed Java Options\f[R] section in: .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 19\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 19\f[R] [https://docs.oracle.com/en/java/javase/19/docs/specs/man/java.html] .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 18\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 18\f[R] [https://docs.oracle.com/en/java/javase/18/docs/specs/man/java.html] .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 17\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 17\f[R] [https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html] .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 16\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 16\f[R] [https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html] .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 15\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 15\f[R] [https://docs.oracle.com/en/java/javase/15/docs/specs/man/java.html] .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 14\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 14\f[R] [https://docs.oracle.com/en/java/javase/14/docs/specs/man/java.html] .IP \[bu] 2 -\f[B]The \f[BC]java\f[B] Command, Release 13\f[R] +\f[B]The \f[VB]java\f[B] Command, Release 13\f[R] [https://docs.oracle.com/en/java/javase/13/docs/specs/man/java.html] .IP \[bu] 2 \f[B]Java Platform, Standard Edition Tools Reference, Release 12\f[R] -[https://docs.oracle.com/en/java/javase/12/tools/java.html#GUID\-3B1CE181\-CD30\-4178\-9602\-230B800D4FAE] +[https://docs.oracle.com/en/java/javase/12/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE] .IP \[bu] 2 \f[B]Java Platform, Standard Edition Tools Reference, Release 11\f[R] -[https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID\-741FC470\-AA3E\-494A\-8D2B\-1B1FE4A990D1] +[https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-741FC470-AA3E-494A-8D2B-1B1FE4A990D1] .IP \[bu] 2 \f[B]Java Platform, Standard Edition Tools Reference, Release 10\f[R] [https://docs.oracle.com/javase/10/tools/java.htm#JSWOR624] @@ -4175,31 +3833,33 @@ Oracle JDK on Windows\f[R] \f[B]Java Platform, Standard Edition Tools Reference, Release 8 for Oracle JDK on Solaris, Linux, and macOS\f[R] [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BGBCIEFC] -.SH JAVA COMMAND\-LINE ARGUMENT FILES +.SH JAVA COMMAND-LINE ARGUMENT FILES .PP -You can shorten or simplify the \f[CB]java\f[R] command by using -\f[CB]\@\f[R] argument files to specify one or more text files that +You can shorten or simplify the \f[V]java\f[R] command by using +\f[V]\[at]\f[R] argument files to specify one or more text files that contain arguments, such as options and class names, which are passed to -the \f[CB]java\f[R] command. -This let\[aq]s you to create \f[CB]java\f[R] commands of any length on any -operating system. +the \f[V]java\f[R] command. +This let\[aq]s you to create \f[V]java\f[R] commands of any length on +any operating system. .PP -In the command line, use the at sign (\f[CB]\@\f[R]) prefix to identify an -argument file that contains \f[CB]java\f[R] options and class names. -When the \f[CB]java\f[R] command encounters a file beginning with the at -sign (\f[CB]\@\f[R]), it expands the contents of that file into an +In the command line, use the at sign (\f[V]\[at]\f[R]) prefix to +identify an argument file that contains \f[V]java\f[R] options and class +names. +When the \f[V]java\f[R] command encounters a file beginning with the at +sign (\f[V]\[at]\f[R]), it expands the contents of that file into an argument list just as they would be specified on the command line. .PP -The \f[CB]java\f[R] launcher expands the argument file contents until it -encounters the \f[CB]\-\-disable\-\@files\f[R] option. -You can use the \f[CB]\-\-disable\-\@files\f[R] option anywhere on the -command line, including in an argument file, to stop \f[CB]\@\f[R] +The \f[V]java\f[R] launcher expands the argument file contents until it +encounters the \f[V]--disable-\[at]files\f[R] option. +You can use the \f[V]--disable-\[at]files\f[R] option anywhere on the +command line, including in an argument file, to stop \f[V]\[at]\f[R] argument files expansion. .PP -The following items describe the syntax of \f[CB]java\f[R] argument files: +The following items describe the syntax of \f[V]java\f[R] argument +files: .IP \[bu] 2 The argument file must contain only ASCII characters or characters in -system default encoding that\[aq]s ASCII friendly, such as UTF\-8. +system default encoding that\[aq]s ASCII friendly, such as UTF-8. .IP \[bu] 2 The argument file size must not exceed MAXINT (2,147,483,647) bytes. .IP \[bu] 2 @@ -4209,22 +3869,23 @@ argument file. Use white space or new line characters to separate arguments included in the file. .IP \[bu] 2 -White space includes a white space character, \f[CB]\\t\f[R], -\f[CB]\\n\f[R], \f[CB]\\r\f[R], and \f[CB]\\f\f[R]. +White space includes a white space character, \f[V]\[rs]t\f[R], +\f[V]\[rs]n\f[R], \f[V]\[rs]r\f[R], and \f[V]\[rs]f\f[R]. .RS 2 .PP For example, it is possible to have a path with a space, such as -\f[CB]c:\\Program\ Files\f[R] that can be specified as either -\f[CB]"c:\\\\Program\ Files"\f[R] or, to avoid an escape, -\f[CB]c:\\Program"\ "Files\f[R]. +\f[V]c:\[rs]Program Files\f[R] that can be specified as either +\f[V]\[dq]c:\[rs]\[rs]Program Files\[dq]\f[R] or, to avoid an escape, +\f[V]c:\[rs]Program\[dq] \[dq]Files\f[R]. .RE .IP \[bu] 2 Any option that contains spaces, such as a path component, must be -within quotation marks using quotation (\[aq]"\[aq]) characters in its -entirety. +within quotation marks using quotation (\[aq]\[dq]\[aq]) characters in +its entirety. .IP \[bu] 2 -A string within quotation marks may contain the characters \f[CB]\\n\f[R], -\f[CB]\\r\f[R], \f[CB]\\t\f[R], and \f[CB]\\f\f[R]. +A string within quotation marks may contain the characters +\f[V]\[rs]n\f[R], \f[V]\[rs]r\f[R], \f[V]\[rs]t\f[R], and +\f[V]\[rs]f\f[R]. They are converted to their respective ASCII codes. .IP \[bu] 2 If a file name contains embedded spaces, then put the whole file name in @@ -4233,34 +3894,34 @@ double quotation marks. File names in an argument file are relative to the current directory, not to the location of the argument file. .IP \[bu] 2 -Use the number sign \f[CB]#\f[R] in the argument file to identify +Use the number sign \f[V]#\f[R] in the argument file to identify comments. -All characters following the \f[CB]#\f[R] are ignored until the end of +All characters following the \f[V]#\f[R] are ignored until the end of line. .IP \[bu] 2 -Additional at sign \f[CB]\@\f[R] prefixes to \f[CB]\@\f[R] prefixed options -act as an escape, (the first \f[CB]\@\f[R] is removed and the rest of the -arguments are presented to the launcher literally). +Additional at sign \f[V]\[at]\f[R] prefixes to \f[V]\[at]\f[R] prefixed +options act as an escape, (the first \f[V]\[at]\f[R] is removed and the +rest of the arguments are presented to the launcher literally). .IP \[bu] 2 -Lines may be continued using the continuation character (\f[CB]\\\f[R]) at -the end\-of\-line. +Lines may be continued using the continuation character +(\f[V]\[rs]\f[R]) at the end-of-line. The two lines are concatenated with the leading white spaces trimmed. To prevent trimming the leading white spaces, a continuation character -(\f[CB]\\\f[R]) may be placed at the first column. +(\f[V]\[rs]\f[R]) may be placed at the first column. .IP \[bu] 2 -Because backslash (\\) is an escape character, a backslash character +Because backslash (\[rs]) is an escape character, a backslash character must be escaped with another backslash character. .IP \[bu] 2 -Partial quote is allowed and is closed by an end\-of\-file. +Partial quote is allowed and is closed by an end-of-file. .IP \[bu] 2 -An open quote stops at end\-of\-line unless \f[CB]\\\f[R] is the last +An open quote stops at end-of-line unless \f[V]\[rs]\f[R] is the last character, which then joins the next line by removing all leading white space characters. .IP \[bu] 2 Wildcards (*) aren\[aq]t allowed in these lists (such as specifying -\f[CB]*.java\f[R]). +\f[V]*.java\f[R]). .IP \[bu] 2 -Use of the at sign (\f[CB]\@\f[R]) to recursively interpret files +Use of the at sign (\f[V]\[at]\f[R]) to recursively interpret files isn\[aq]t supported. .SS Example of Open or Partial Quotes in an Argument File .PP @@ -4268,7 +3929,7 @@ In the argument file, .IP .nf \f[CB] -\-cp\ "lib/ +-cp \[dq]lib/ cool/ app/ jars @@ -4278,38 +3939,36 @@ jars this is interpreted as: .RS .PP -\f[CB]\-cp\ lib/cool/app/jars\f[R] +\f[V]-cp lib/cool/app/jars\f[R] .RE -.SS Example of a Backslash Character Escaped with Another Backslash -Character in an Argument File +.SS Example of a Backslash Character Escaped with Another Backslash Character in an Argument File .PP To output the following: .RS .PP -\f[CB]\-cp\ c:\\Program\ Files\ (x86)\\Java\\jre\\lib\\ext;c:\\Program\ Files\\Java\\jre9\\lib\\ext\f[R] +\f[V]-cp c:\[rs]Program Files (x86)\[rs]Java\[rs]jre\[rs]lib\[rs]ext;c:\[rs]Program Files\[rs]Java\[rs]jre9\[rs]lib\[rs]ext\f[R] .RE .PP The backslash character must be specified in the argument file as: .RS .PP -\f[CB]\-cp\ "c:\\\\Program\ Files\ (x86)\\\\Java\\\\jre\\\\lib\\\\ext;c:\\\\Program\ Files\\\\Java\\\\jre9\\\\lib\\\\ext"\f[R] +\f[V]-cp \[dq]c:\[rs]\[rs]Program Files (x86)\[rs]\[rs]Java\[rs]\[rs]jre\[rs]\[rs]lib\[rs]\[rs]ext;c:\[rs]\[rs]Program Files\[rs]\[rs]Java\[rs]\[rs]jre9\[rs]\[rs]lib\[rs]\[rs]ext\[dq]\f[R] .RE -.SS Example of an EOL Escape Used to Force Concatenation of Lines in an -Argument File +.SS Example of an EOL Escape Used to Force Concatenation of Lines in an Argument File .PP In the argument file, .IP .nf \f[CB] -\-cp\ "/lib/cool\ app/jars:\\ -\ \ \ \ /lib/another\ app/jars" +-cp \[dq]/lib/cool app/jars:\[rs] + /lib/another app/jars\[dq] \f[R] .fi .PP This is interpreted as: .RS .PP -\f[CB]\-cp\ /lib/cool\ app/jars:/lib/another\ app/jars\f[R] +\f[V]-cp /lib/cool app/jars:/lib/another app/jars\f[R] .RE .SS Example of Line Continuation with Leading Spaces in an Argument File .PP @@ -4317,34 +3976,34 @@ In the argument file, .IP .nf \f[CB] -\-cp\ "/lib/cool\\ -\\app/jars" +-cp \[dq]/lib/cool\[rs] +\[rs]app/jars\[dq] \f[R] .fi .PP This is interpreted as: .PP -\f[CB]\-cp\ /lib/cool\ app/jars\f[R] +\f[V]-cp /lib/cool app/jars\f[R] .SS Examples of Using Single Argument File .PP -You can use a single argument file, such as \f[CB]myargumentfile\f[R] in -the following example, to hold all required \f[CB]java\f[R] arguments: +You can use a single argument file, such as \f[V]myargumentfile\f[R] in +the following example, to hold all required \f[V]java\f[R] arguments: .RS .PP -\f[CB]java\ \@myargumentfile\f[R] +\f[V]java \[at]myargumentfile\f[R] .RE .SS Examples of Using Argument Files with Paths .PP You can include relative paths in argument files; however, they\[aq]re relative to the current working directory and not to the paths of the argument files themselves. -In the following example, \f[CB]path1/options\f[R] and -\f[CB]path2/options\f[R] represent argument files with different paths. +In the following example, \f[V]path1/options\f[R] and +\f[V]path2/options\f[R] represent argument files with different paths. Any relative paths that they contain are relative to the current working directory and not to the argument files: .RS .PP -\f[CB]java\ \@path1/options\ \@path2/classes\f[R] +\f[V]java \[at]path1/options \[at]path2/classes\f[R] .RE .SH CODE HEAP STATE ANALYTICS .SS Overview @@ -4359,20 +4018,20 @@ Where has all the code heap space gone? Why is the method sweeper not working effectively? .PP To provide this insight, a code heap state analytics feature has been -implemented that enables on\-the\-fly analysis of the code heap. +implemented that enables on-the-fly analysis of the code heap. The analytics process is divided into two parts. The first part examines the entire code heap and aggregates all information that is believed to be useful or important. The second part consists of several independent steps that print the collected information with an emphasis on different aspects of the data. -Data collection and printing are done on an "on request" basis. +Data collection and printing are done on an \[dq]on request\[dq] basis. .SS Syntax .PP -Requests for real\-time, on\-the\-fly analysis can be issued with the +Requests for real-time, on-the-fly analysis can be issued with the following command: .RS .PP -\f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]Compiler.CodeHeap_Analytics\f[R] +\f[V]jcmd\f[R] \f[I]pid\f[R] \f[V]Compiler.CodeHeap_Analytics\f[R] [\f[I]function\f[R]] [\f[I]granularity\f[R]] .RE .PP @@ -4380,14 +4039,14 @@ If you are only interested in how the code heap looks like after running a sample workload, you can use the command line option: .RS .PP -\f[CB]\-Xlog:codecache=Trace\f[R] +\f[V]-Xlog:codecache=Trace\f[R] .RE .PP -To see the code heap state when a "CodeCache full" condition exists, -start the VM with the command line option: +To see the code heap state when a \[dq]CodeCache full\[dq] condition +exists, start the VM with the command line option: .RS .PP -\f[CB]\-Xlog:codecache=Debug\f[R] +\f[V]-Xlog:codecache=Debug\f[R] .RE .PP See \f[B]CodeHeap State Analytics (OpenJDK)\f[R] @@ -4396,49 +4055,39 @@ for a detailed description of the code heap state analytics feature, the supported functions, and the granularity options. .SH ENABLE LOGGING WITH THE JVM UNIFIED LOGGING FRAMEWORK .PP -You use the \f[CB]\-Xlog\f[R] option to configure or enable logging with +You use the \f[V]-Xlog\f[R] option to configure or enable logging with the Java Virtual Machine (JVM) unified logging framework. .SS Synopsis .RS .PP -\f[CB]\-Xlog\f[R][\f[CB]:\f[R][\f[I]what\f[R]][\f[CB]:\f[R][\f[I]output\f[R]][\f[CB]:\f[R][\f[I]decorators\f[R]][\f[CB]:\f[R]\f[I]output\-options\f[R][\f[CB],\f[R]...]]]]] +\f[V]-Xlog\f[R][\f[V]:\f[R][\f[I]what\f[R]][\f[V]:\f[R][\f[I]output\f[R]][\f[V]:\f[R][\f[I]decorators\f[R]][\f[V]:\f[R]\f[I]output-options\f[R][\f[V],\f[R]...]]]]] .PP -\f[CB]\-Xlog:\f[R]\f[I]directive\f[R] +\f[V]-Xlog:\f[R]\f[I]directive\f[R] .RE .TP -.B \f[I]what\f[R] +\f[I]what\f[R] Specifies a combination of tags and levels of the form -\f[I]tag1\f[R][\f[CB]+\f[R]\f[I]tag2\f[R]...][\f[CB]*\f[R]][\f[CB]=\f[R]\f[I]level\f[R]][\f[CB],\f[R]...]. -Unless the wildcard (\f[CB]*\f[R]) is specified, only log messages tagged +\f[I]tag1\f[R][\f[V]+\f[R]\f[I]tag2\f[R]...][\f[V]*\f[R]][\f[V]=\f[R]\f[I]level\f[R]][\f[V],\f[R]...]. +Unless the wildcard (\f[V]*\f[R]) is specified, only log messages tagged with exactly the tags specified are matched. -See \f[B]\-Xlog Tags and Levels\f[R]. -.RS -.RE +See \f[B]-Xlog Tags and Levels\f[R]. .TP -.B \f[I]output\f[R] +\f[I]output\f[R] Sets the type of output. -Omitting the \f[I]output\f[R] type defaults to \f[CB]stdout\f[R]. -See \f[B]\-Xlog Output\f[R]. -.RS -.RE +Omitting the \f[I]output\f[R] type defaults to \f[V]stdout\f[R]. +See \f[B]-Xlog Output\f[R]. .TP -.B \f[I]decorators\f[R] +\f[I]decorators\f[R] Configures the output to use a custom set of decorators. -Omitting \f[I]decorators\f[R] defaults to \f[CB]uptime\f[R], -\f[CB]level\f[R], and \f[CB]tags\f[R]. +Omitting \f[I]decorators\f[R] defaults to \f[V]uptime\f[R], +\f[V]level\f[R], and \f[V]tags\f[R]. See \f[B]Decorations\f[R]. -.RS -.RE .TP -.B \f[I]output\-options\f[R] -Sets the \f[CB]\-Xlog\f[R] logging output options. -.RS -.RE +\f[I]output-options\f[R] +Sets the \f[V]-Xlog\f[R] logging output options. .TP -.B \f[I]directive\f[R] +\f[I]directive\f[R] A global option or subcommand: help, disable, async -.RS -.RE .SS Description .PP The Java Virtual Machine (JVM) unified logging framework provides a @@ -4453,77 +4102,72 @@ The mapping of legacy runtime logging flags to the corresponding new Xlog configuration is described in \f[B]Convert Runtime Logging Flags to Xlog\f[R]. .PP -The following provides quick reference to the \f[CB]\-Xlog\f[R] command +The following provides quick reference to the \f[V]-Xlog\f[R] command and syntax for options: .TP -.B \f[CB]\-Xlog\f[R] -Enables JVM logging on an \f[CB]info\f[R] level. -.RS -.RE +\f[V]-Xlog\f[R] +Enables JVM logging on an \f[V]info\f[R] level. .TP -.B \f[CB]\-Xlog:help\f[R] -Prints \f[CB]\-Xlog\f[R] usage syntax and available tags, levels, and +\f[V]-Xlog:help\f[R] +Prints \f[V]-Xlog\f[R] usage syntax and available tags, levels, and decorators along with example command lines with explanations. -.RS -.RE .TP -.B \f[CB]\-Xlog:disable\f[R] +\f[V]-Xlog:disable\f[R] Turns off all logging and clears all configuration of the logging framework including the default configuration for warnings and errors. -.RS -.RE .TP -.B \f[CB]\-Xlog\f[R][\f[CB]:\f[R]\f[I]option\f[R]] +\f[V]-Xlog\f[R][\f[V]:\f[R]\f[I]option\f[R]] Applies multiple arguments in the order that they appear on the command line. -Multiple \f[CB]\-Xlog\f[R] arguments for the same output override each +Multiple \f[V]-Xlog\f[R] arguments for the same output override each other in their given order. .RS .PP The \f[I]option\f[R] is set as: .RS .PP -[\f[I]tag\-selection\f[R]][\f[CB]:\f[R][\f[I]output\f[R]][\f[CB]:\f[R][\f[I]decorators\f[R]][\f[CB]:\f[R]\f[I]output\-options\f[R]]]] +[\f[I]tag-selection\f[R]][\f[V]:\f[R][\f[I]output\f[R]][\f[V]:\f[R][\f[I]decorators\f[R]][\f[V]:\f[R]\f[I]output-options\f[R]]]] .RE .PP -Omitting the \f[I]tag\-selection\f[R] defaults to a tag\-set of -\f[CB]all\f[R] and a level of \f[CB]info\f[R]. +Omitting the \f[I]tag-selection\f[R] defaults to a tag-set of +\f[V]all\f[R] and a level of \f[V]info\f[R]. .RS .PP -\f[I]tag\f[R][\f[CB]+\f[R]...] \f[CB]all\f[R] +\f[I]tag\f[R][\f[V]+\f[R]...] +\f[V]all\f[R] .RE .PP -The \f[CB]all\f[R] tag is a meta tag consisting of all tag\-sets +The \f[V]all\f[R] tag is a meta tag consisting of all tag-sets available. -The asterisk \f[CB]*\f[R] in a tag set definition denotes a wildcard tag +The asterisk \f[V]*\f[R] in a tag set definition denotes a wildcard tag match. Matching with a wildcard selects all tag sets that contain \f[I]at least\f[R] the specified tags. Without the wildcard, only exact matches of the specified tag sets are selected. .PP -\f[I]output\-options\f[R] is +\f[I]output-options\f[R] is .RS .PP -\f[CB]filecount=\f[R]\f[I]file\-count\f[R] \f[CB]filesize=\f[R]\f[I]file size -with optional K, M or G suffix\f[R] -\f[CB]foldmultilines=\f[R]\f[I]\f[R] +\f[V]filecount=\f[R]\f[I]file-count\f[R] \f[V]filesize=\f[R]\f[I]file +size with optional K, M or G suffix\f[R] +\f[V]foldmultilines=\f[R]\f[I]\f[R] .RE .PP -When \f[CB]foldmultilines\f[R] is true, a log event that consists of +When \f[V]foldmultilines\f[R] is true, a log event that consists of multiple lines will be folded into a single line by replacing newline -characters with the sequence \f[CB]\[aq]\\\[aq]\f[R] and -\f[CB]\[aq]n\[aq]\f[R] in the output. +characters with the sequence \f[V]\[aq]\[rs]\[aq]\f[R] and +\f[V]\[aq]n\[aq]\f[R] in the output. Existing single backslash characters will also be replaced with a sequence of two backslashes so that the conversion can be reversed. -This option is safe to use with UTF\-8 character encodings, but other +This option is safe to use with UTF-8 character encodings, but other encodings may not work. -For example, it may incorrectly convert multi\-byte sequences in Shift +For example, it may incorrectly convert multi-byte sequences in Shift JIS and BIG5. .RE .SS Default Configuration .PP -When the \f[CB]\-Xlog\f[R] option and nothing else is specified on the +When the \f[V]-Xlog\f[R] option and nothing else is specified on the command line, the default configuration is used. The default configuration logs all messages with a level that matches either warning or error regardless of what tags the message is @@ -4532,22 +4176,22 @@ The default configuration is equivalent to entering the following on the command line: .RS .PP -\f[CB]\-Xlog:all=warning:stdout:uptime,level,tags\f[R] +\f[V]-Xlog:all=warning:stdout:uptime,level,tags\f[R] .RE .SS Controlling Logging at Runtime .PP Logging can also be controlled at run time through Diagnostic Commands (with the \f[B]jcmd\f[R] utility). Everything that can be specified on the command line can also be -specified dynamically with the \f[CB]VM.log\f[R] command. +specified dynamically with the \f[V]VM.log\f[R] command. As the diagnostic commands are automatically exposed as MBeans, you can use JMX to change logging configuration at run time. -.SS \-Xlog Tags and Levels +.SS -Xlog Tags and Levels .PP Each log message has a level and a tag set associated with it. The level of the message corresponds to its details, and the tag set corresponds to what the message contains or which JVM component it -involves (such as, \f[CB]gc\f[R], \f[CB]jit\f[R], or \f[CB]os\f[R]). +involves (such as, \f[V]gc\f[R], \f[V]jit\f[R], or \f[V]os\f[R]). Mapping GC flags to the Xlog configuration is described in \f[B]Convert GC Logging Flags to Xlog\f[R]. Mapping legacy runtime logging flags to the corresponding Xlog @@ -4556,70 +4200,68 @@ Xlog\f[R]. .PP \f[B]Available log levels:\f[R] .IP \[bu] 2 -\f[CB]off\f[R] +\f[V]off\f[R] .IP \[bu] 2 -\f[CB]trace\f[R] +\f[V]trace\f[R] .IP \[bu] 2 -\f[CB]debug\f[R] +\f[V]debug\f[R] .IP \[bu] 2 -\f[CB]info\f[R] +\f[V]info\f[R] .IP \[bu] 2 -\f[CB]warning\f[R] +\f[V]warning\f[R] .IP \[bu] 2 -\f[CB]error\f[R] +\f[V]error\f[R] .PP \f[B]Available log tags:\f[R] .PP There are literally dozens of log tags, which in the right combinations, will enable a range of logging output. The full set of available log tags can be seen using -\f[CB]\-Xlog:help\f[R]. -Specifying \f[CB]all\f[R] instead of a tag combination matches all tag +\f[V]-Xlog:help\f[R]. +Specifying \f[V]all\f[R] instead of a tag combination matches all tag combinations. -.SS \-Xlog Output +.SS -Xlog Output .PP -The \f[CB]\-Xlog\f[R] option supports the following types of outputs: +The \f[V]-Xlog\f[R] option supports the following types of outputs: .IP \[bu] 2 -\f[CB]stdout\f[R] \-\-\- Sends output to stdout +\f[V]stdout\f[R] --- Sends output to stdout .IP \[bu] 2 -\f[CB]stderr\f[R] \-\-\- Sends output to stderr +\f[V]stderr\f[R] --- Sends output to stderr .IP \[bu] 2 -\f[CB]file=\f[R]\f[I]filename\f[R] \-\-\- Sends output to text file(s). +\f[V]file=\f[R]\f[I]filename\f[R] --- Sends output to text file(s). .PP -When using \f[CB]file=\f[R]\f[I]filename\f[R], specifying \f[CB]%p\f[R] -and/or \f[CB]%t\f[R] in the file name expands to the JVM\[aq]s PID and +When using \f[V]file=\f[R]\f[I]filename\f[R], specifying \f[V]%p\f[R] +and/or \f[V]%t\f[R] in the file name expands to the JVM\[aq]s PID and startup timestamp, respectively. You can also configure text files to handle file rotation based on file size and a number of files to rotate. For example, to rotate the log file every 10 MB and keep 5 files in -rotation, specify the options \f[CB]filesize=10M,\ filecount=5\f[R]. +rotation, specify the options \f[V]filesize=10M, filecount=5\f[R]. The target size of the files isn\[aq]t guaranteed to be exact, it\[aq]s just an approximate value. Files are rotated by default with up to 5 rotated files of target size 20 MB, unless configured otherwise. -Specifying \f[CB]filecount=0\f[R] means that the log file shouldn\[aq]t be -rotated. -There\[aq]s a possibility of the pre\-existing log file getting +Specifying \f[V]filecount=0\f[R] means that the log file shouldn\[aq]t +be rotated. +There\[aq]s a possibility of the pre-existing log file getting overwritten. -.SS \-Xlog Output Mode +.SS -Xlog Output Mode .PP -By default logging messages are output synchronously \- each log message +By default logging messages are output synchronously - each log message is written to the designated output when the logging call is made. But you can instead use asynchronous logging mode by specifying: .TP -.B \f[CB]\-Xlog:async\f[R] +\f[V]-Xlog:async\f[R] Write all logging asynchronously. -.RS -.RE .PP In asynchronous logging mode, log sites enqueue all logging messages to an intermediate buffer and a standalone thread is responsible for flushing them to the corresponding outputs. The intermediate buffer is bounded and on buffer exhaustion the enqueuing message is discarded. -Log entry write operations are guaranteed non\-blocking. +Log entry write operations are guaranteed non-blocking. .PP -The option \f[CB]\-XX:AsyncLogBufferSize=N\f[R] specifies the memory +The option \f[V]-XX:AsyncLogBufferSize=N\f[R] specifies the memory budget in bytes for the intermediate buffer. The default value should be big enough to cater for most cases. Users can provide a custom value to trade memory overhead for log @@ -4635,22 +4277,23 @@ For example: .IP .nf \f[CB] -[6.567s][info][gc,old]\ Old\ collection\ complete +[6.567s][info][gc,old] Old collection complete \f[R] .fi .PP -Omitting \f[CB]decorators\f[R] defaults to \f[CB]uptime\f[R], -\f[CB]level\f[R], and \f[CB]tags\f[R]. -The \f[CB]none\f[R] decorator is special and is used to turn off all +Omitting \f[V]decorators\f[R] defaults to \f[V]uptime\f[R], +\f[V]level\f[R], and \f[V]tags\f[R]. +The \f[V]none\f[R] decorator is special and is used to turn off all decorations. .PP -\f[CB]time\f[R] (\f[CB]t\f[R]), \f[CB]utctime\f[R] (\f[CB]utc\f[R]), -\f[CB]uptime\f[R] (\f[CB]u\f[R]), \f[CB]timemillis\f[R] (\f[CB]tm\f[R]), -\f[CB]uptimemillis\f[R] (\f[CB]um\f[R]), \f[CB]timenanos\f[R] (\f[CB]tn\f[R]), -\f[CB]uptimenanos\f[R] (\f[CB]un\f[R]), \f[CB]hostname\f[R] (\f[CB]hn\f[R]), -\f[CB]pid\f[R] (\f[CB]p\f[R]), \f[CB]tid\f[R] (\f[CB]ti\f[R]), \f[CB]level\f[R] -(\f[CB]l\f[R]), \f[CB]tags\f[R] (\f[CB]tg\f[R]) decorators can also be -specified as \f[CB]none\f[R] for no decoration. +\f[V]time\f[R] (\f[V]t\f[R]), \f[V]utctime\f[R] (\f[V]utc\f[R]), +\f[V]uptime\f[R] (\f[V]u\f[R]), \f[V]timemillis\f[R] (\f[V]tm\f[R]), +\f[V]uptimemillis\f[R] (\f[V]um\f[R]), \f[V]timenanos\f[R] +(\f[V]tn\f[R]), \f[V]uptimenanos\f[R] (\f[V]un\f[R]), \f[V]hostname\f[R] +(\f[V]hn\f[R]), \f[V]pid\f[R] (\f[V]p\f[R]), \f[V]tid\f[R] +(\f[V]ti\f[R]), \f[V]level\f[R] (\f[V]l\f[R]), \f[V]tags\f[R] +(\f[V]tg\f[R]) decorators can also be specified as \f[V]none\f[R] for no +decoration. .PP Logging Messages Decorations .TS @@ -4663,65 +4306,65 @@ Description T} _ T{ -\f[CB]time\f[R] or \f[CB]t\f[R] +\f[V]time\f[R] or \f[V]t\f[R] T}@T{ -Current time and date in ISO\-8601 format. +Current time and date in ISO-8601 format. T} T{ -\f[CB]utctime\f[R] or \f[CB]utc\f[R] +\f[V]utctime\f[R] or \f[V]utc\f[R] T}@T{ Universal Time Coordinated or Coordinated Universal Time. T} T{ -\f[CB]uptime\f[R] or \f[CB]u\f[R] +\f[V]uptime\f[R] or \f[V]u\f[R] T}@T{ Time since the start of the JVM in seconds and milliseconds. For example, 6.567s. T} T{ -\f[CB]timemillis\f[R] or \f[CB]tm\f[R] +\f[V]timemillis\f[R] or \f[V]tm\f[R] T}@T{ -The same value as generated by \f[CB]System.currentTimeMillis()\f[R] +The same value as generated by \f[V]System.currentTimeMillis()\f[R] T} T{ -\f[CB]uptimemillis\f[R] or \f[CB]um\f[R] +\f[V]uptimemillis\f[R] or \f[V]um\f[R] T}@T{ Milliseconds since the JVM started. T} T{ -\f[CB]timenanos\f[R] or \f[CB]tn\f[R] +\f[V]timenanos\f[R] or \f[V]tn\f[R] T}@T{ -The same value generated by \f[CB]System.nanoTime()\f[R]. +The same value generated by \f[V]System.nanoTime()\f[R]. T} T{ -\f[CB]uptimenanos\f[R] or \f[CB]un\f[R] +\f[V]uptimenanos\f[R] or \f[V]un\f[R] T}@T{ Nanoseconds since the JVM started. T} T{ -\f[CB]hostname\f[R] or \f[CB]hn\f[R] +\f[V]hostname\f[R] or \f[V]hn\f[R] T}@T{ The host name. T} T{ -\f[CB]pid\f[R] or \f[CB]p\f[R] +\f[V]pid\f[R] or \f[V]p\f[R] T}@T{ The process identifier. T} T{ -\f[CB]tid\f[R] or \f[CB]ti\f[R] +\f[V]tid\f[R] or \f[V]ti\f[R] T}@T{ The thread identifier. T} T{ -\f[CB]level\f[R] or \f[CB]l\f[R] +\f[V]level\f[R] or \f[V]l\f[R] T}@T{ The level associated with the log message. T} T{ -\f[CB]tags\f[R] or \f[CB]tg\f[R] +\f[V]tags\f[R] or \f[V]tg\f[R] T}@T{ -The tag\-set associated with the log message. +The tag-set associated with the log message. T} .TE .SS Convert GC Logging Flags to Xlog @@ -4739,139 +4382,139 @@ Comment T} _ T{ -\f[CB]G1PrintHeapRegions\f[R] +\f[V]G1PrintHeapRegions\f[R] T}@T{ -\f[CB]\-Xlog:gc+region=trace\f[R] +\f[V]-Xlog:gc+region=trace\f[R] T}@T{ Not Applicable T} T{ -\f[CB]GCLogFileSize\f[R] +\f[V]GCLogFileSize\f[R] T}@T{ No configuration available T}@T{ Log rotation is handled by the framework. T} T{ -\f[CB]NumberOfGCLogFiles\f[R] +\f[V]NumberOfGCLogFiles\f[R] T}@T{ Not Applicable T}@T{ Log rotation is handled by the framework. T} T{ -\f[CB]PrintAdaptiveSizePolicy\f[R] +\f[V]PrintAdaptiveSizePolicy\f[R] T}@T{ -\f[CB]\-Xlog:gc+ergo*=\f[R]\f[I]level\f[R] +\f[V]-Xlog:gc+ergo*=\f[R]\f[I]level\f[R] T}@T{ -Use a \f[I]level\f[R] of \f[CB]debug\f[R] for most of the information, or a -\f[I]level\f[R] of \f[CB]trace\f[R] for all of what was logged for -\f[CB]PrintAdaptiveSizePolicy\f[R]. +Use a \f[I]level\f[R] of \f[V]debug\f[R] for most of the information, or +a \f[I]level\f[R] of \f[V]trace\f[R] for all of what was logged for +\f[V]PrintAdaptiveSizePolicy\f[R]. T} T{ -\f[CB]PrintGC\f[R] +\f[V]PrintGC\f[R] T}@T{ -\f[CB]\-Xlog:gc\f[R] +\f[V]-Xlog:gc\f[R] T}@T{ Not Applicable T} T{ -\f[CB]PrintGCApplicationConcurrentTime\f[R] +\f[V]PrintGCApplicationConcurrentTime\f[R] T}@T{ -\f[CB]\-Xlog:safepoint\f[R] +\f[V]-Xlog:safepoint\f[R] T}@T{ -Note that \f[CB]PrintGCApplicationConcurrentTime\f[R] and -\f[CB]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and +Note that \f[V]PrintGCApplicationConcurrentTime\f[R] and +\f[V]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and aren\[aq]t separated in the new logging. T} T{ -\f[CB]PrintGCApplicationStoppedTime\f[R] +\f[V]PrintGCApplicationStoppedTime\f[R] T}@T{ -\f[CB]\-Xlog:safepoint\f[R] +\f[V]-Xlog:safepoint\f[R] T}@T{ -Note that \f[CB]PrintGCApplicationConcurrentTime\f[R] and -\f[CB]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and +Note that \f[V]PrintGCApplicationConcurrentTime\f[R] and +\f[V]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and not separated in the new logging. T} T{ -\f[CB]PrintGCCause\f[R] +\f[V]PrintGCCause\f[R] T}@T{ Not Applicable T}@T{ GC cause is now always logged. T} T{ -\f[CB]PrintGCDateStamps\f[R] +\f[V]PrintGCDateStamps\f[R] T}@T{ Not Applicable T}@T{ Date stamps are logged by the framework. T} T{ -\f[CB]PrintGCDetails\f[R] +\f[V]PrintGCDetails\f[R] T}@T{ -\f[CB]\-Xlog:gc*\f[R] +\f[V]-Xlog:gc*\f[R] T}@T{ Not Applicable T} T{ -\f[CB]PrintGCID\f[R] +\f[V]PrintGCID\f[R] T}@T{ Not Applicable T}@T{ GC ID is now always logged. T} T{ -\f[CB]PrintGCTaskTimeStamps\f[R] +\f[V]PrintGCTaskTimeStamps\f[R] T}@T{ -\f[CB]\-Xlog:gc+task*=debug\f[R] +\f[V]-Xlog:gc+task*=debug\f[R] T}@T{ Not Applicable T} T{ -\f[CB]PrintGCTimeStamps\f[R] +\f[V]PrintGCTimeStamps\f[R] T}@T{ Not Applicable T}@T{ Time stamps are logged by the framework. T} T{ -\f[CB]PrintHeapAtGC\f[R] +\f[V]PrintHeapAtGC\f[R] T}@T{ -\f[CB]\-Xlog:gc+heap=trace\f[R] +\f[V]-Xlog:gc+heap=trace\f[R] T}@T{ Not Applicable T} T{ -\f[CB]PrintReferenceGC\f[R] +\f[V]PrintReferenceGC\f[R] T}@T{ -\f[CB]\-Xlog:gc+ref*=debug\f[R] +\f[V]-Xlog:gc+ref*=debug\f[R] T}@T{ -Note that in the old logging, \f[CB]PrintReferenceGC\f[R] had an effect -only if \f[CB]PrintGCDetails\f[R] was also enabled. +Note that in the old logging, \f[V]PrintReferenceGC\f[R] had an effect +only if \f[V]PrintGCDetails\f[R] was also enabled. T} T{ -\f[CB]PrintStringDeduplicationStatistics\f[R] +\f[V]PrintStringDeduplicationStatistics\f[R] T}@T{ -`\-Xlog:gc+stringdedup*=debug +\[ga]-Xlog:gc+stringdedup*=debug T}@T{ -` Not Applicable +\[ga] Not Applicable T} T{ -\f[CB]PrintTenuringDistribution\f[R] +\f[V]PrintTenuringDistribution\f[R] T}@T{ -\f[CB]\-Xlog:gc+age*=\f[R]\f[I]level\f[R] +\f[V]-Xlog:gc+age*=\f[R]\f[I]level\f[R] T}@T{ -Use a \f[I]level\f[R] of \f[CB]debug\f[R] for the most relevant -information, or a \f[I]level\f[R] of \f[CB]trace\f[R] for all of what was -logged for \f[CB]PrintTenuringDistribution\f[R]. +Use a \f[I]level\f[R] of \f[V]debug\f[R] for the most relevant +information, or a \f[I]level\f[R] of \f[V]trace\f[R] for all of what was +logged for \f[V]PrintTenuringDistribution\f[R]. T} T{ -\f[CB]UseGCLogFileRotation\f[R] +\f[V]UseGCLogFileRotation\f[R] T}@T{ Not Applicable T}@T{ -What was logged for \f[CB]PrintTenuringDistribution\f[R]. +What was logged for \f[V]PrintTenuringDistribution\f[R]. T} .TE .SS Convert Runtime Logging Flags to Xlog @@ -4893,253 +4536,233 @@ Comment T} _ T{ -\f[CB]TraceExceptions\f[R] +\f[V]TraceExceptions\f[R] T}@T{ -\f[CB]\-Xlog:exceptions=info\f[R] +\f[V]-Xlog:exceptions=info\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceClassLoading\f[R] +\f[V]TraceClassLoading\f[R] T}@T{ -\f[CB]\-Xlog:class+load=\f[R]\f[I]level\f[R] +\f[V]-Xlog:class+load=\f[R]\f[I]level\f[R] T}@T{ -Use \f[I]level\f[R]=\f[CB]info\f[R] for regular information, or -\f[I]level\f[R]=\f[CB]debug\f[R] for additional information. -In Unified Logging syntax, \f[CB]\-verbose:class\f[R] equals -\f[CB]\-Xlog:class+load=info,class+unload=info\f[R]. +Use \f[I]level\f[R]=\f[V]info\f[R] for regular information, or +\f[I]level\f[R]=\f[V]debug\f[R] for additional information. +In Unified Logging syntax, \f[V]-verbose:class\f[R] equals +\f[V]-Xlog:class+load=info,class+unload=info\f[R]. T} T{ -\f[CB]TraceClassLoadingPreorder\f[R] +\f[V]TraceClassLoadingPreorder\f[R] T}@T{ -\f[CB]\-Xlog:class+preorder=debug\f[R] +\f[V]-Xlog:class+preorder=debug\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceClassUnloading\f[R] +\f[V]TraceClassUnloading\f[R] T}@T{ -\f[CB]\-Xlog:class+unload=\f[R]\f[I]level\f[R] +\f[V]-Xlog:class+unload=\f[R]\f[I]level\f[R] T}@T{ -Use \f[I]level\f[R]=\f[CB]info\f[R] for regular information, or -\f[I]level\f[R]=\f[CB]trace\f[R] for additional information. -In Unified Logging syntax, \f[CB]\-verbose:class\f[R] equals -\f[CB]\-Xlog:class+load=info,class+unload=info\f[R]. +Use \f[I]level\f[R]=\f[V]info\f[R] for regular information, or +\f[I]level\f[R]=\f[V]trace\f[R] for additional information. +In Unified Logging syntax, \f[V]-verbose:class\f[R] equals +\f[V]-Xlog:class+load=info,class+unload=info\f[R]. T} T{ -\f[CB]VerboseVerification\f[R] +\f[V]VerboseVerification\f[R] T}@T{ -\f[CB]\-Xlog:verification=info\f[R] +\f[V]-Xlog:verification=info\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceClassPaths\f[R] +\f[V]TraceClassPaths\f[R] T}@T{ -\f[CB]\-Xlog:class+path=info\f[R] +\f[V]-Xlog:class+path=info\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceClassResolution\f[R] +\f[V]TraceClassResolution\f[R] T}@T{ -\f[CB]\-Xlog:class+resolve=debug\f[R] +\f[V]-Xlog:class+resolve=debug\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceClassInitialization\f[R] +\f[V]TraceClassInitialization\f[R] T}@T{ -\f[CB]\-Xlog:class+init=info\f[R] +\f[V]-Xlog:class+init=info\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceLoaderConstraints\f[R] +\f[V]TraceLoaderConstraints\f[R] T}@T{ -\f[CB]\-Xlog:class+loader+constraints=info\f[R] +\f[V]-Xlog:class+loader+constraints=info\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceClassLoaderData\f[R] +\f[V]TraceClassLoaderData\f[R] T}@T{ -\f[CB]\-Xlog:class+loader+data=\f[R]\f[I]level\f[R] +\f[V]-Xlog:class+loader+data=\f[R]\f[I]level\f[R] T}@T{ -Use \f[I]level\f[R]=\f[CB]debug\f[R] for regular information or -\f[I]level\f[R]=\f[CB]trace\f[R] for additional information. +Use \f[I]level\f[R]=\f[V]debug\f[R] for regular information or +\f[I]level\f[R]=\f[V]trace\f[R] for additional information. T} T{ -\f[CB]TraceSafepointCleanupTime\f[R] +\f[V]TraceSafepointCleanupTime\f[R] T}@T{ -\f[CB]\-Xlog:safepoint+cleanup=info\f[R] +\f[V]-Xlog:safepoint+cleanup=info\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceSafepoint\f[R] +\f[V]TraceSafepoint\f[R] T}@T{ -\f[CB]\-Xlog:safepoint=debug\f[R] +\f[V]-Xlog:safepoint=debug\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceMonitorInflation\f[R] +\f[V]TraceMonitorInflation\f[R] T}@T{ -\f[CB]\-Xlog:monitorinflation=debug\f[R] +\f[V]-Xlog:monitorinflation=debug\f[R] T}@T{ Not Applicable T} T{ -\f[CB]TraceRedefineClasses\f[R] +\f[V]TraceRedefineClasses\f[R] T}@T{ -\f[CB]\-Xlog:redefine+class*=\f[R]\f[I]level\f[R] +\f[V]-Xlog:redefine+class*=\f[R]\f[I]level\f[R] T}@T{ -\f[I]level\f[R]=\f[CB]info\f[R], \f[CB]debug\f[R], and \f[CB]trace\f[R] provide -increasing amounts of information. +\f[I]level\f[R]=\f[V]info\f[R], \f[V]debug\f[R], and \f[V]trace\f[R] +provide increasing amounts of information. T} .TE -.SS \-Xlog Usage Examples +.SS -Xlog Usage Examples .PP -The following are \f[CB]\-Xlog\f[R] examples. +The following are \f[V]-Xlog\f[R] examples. .TP -.B \f[CB]\-Xlog\f[R] -Logs all messages by using the \f[CB]info\f[R] level to \f[CB]stdout\f[R] -with \f[CB]uptime\f[R], \f[CB]levels\f[R], and \f[CB]tags\f[R] decorations. +\f[V]-Xlog\f[R] +Logs all messages by using the \f[V]info\f[R] level to \f[V]stdout\f[R] +with \f[V]uptime\f[R], \f[V]levels\f[R], and \f[V]tags\f[R] decorations. This is equivalent to using: .RS .RS .PP -\f[CB]\-Xlog:all=info:stdout:uptime,levels,tags\f[R] +\f[V]-Xlog:all=info:stdout:uptime,levels,tags\f[R] .RE .RE .TP -.B \f[CB]\-Xlog:gc\f[R] -Logs messages tagged with the \f[CB]gc\f[R] tag using \f[CB]info\f[R] level -to \f[CB]stdout\f[R]. +\f[V]-Xlog:gc\f[R] +Logs messages tagged with the \f[V]gc\f[R] tag using \f[V]info\f[R] +level to \f[V]stdout\f[R]. The default configuration for all other messages at level -\f[CB]warning\f[R] is in effect. -.RS -.RE +\f[V]warning\f[R] is in effect. .TP -.B \f[CB]\-Xlog:gc,safepoint\f[R] -Logs messages tagged either with the \f[CB]gc\f[R] or \f[CB]safepoint\f[R] -tags, both using the \f[CB]info\f[R] level, to \f[CB]stdout\f[R], with +\f[V]-Xlog:gc,safepoint\f[R] +Logs messages tagged either with the \f[V]gc\f[R] or \f[V]safepoint\f[R] +tags, both using the \f[V]info\f[R] level, to \f[V]stdout\f[R], with default decorations. -Messages tagged with both \f[CB]gc\f[R] and \f[CB]safepoint\f[R] won\[aq]t +Messages tagged with both \f[V]gc\f[R] and \f[V]safepoint\f[R] won\[aq]t be logged. -.RS -.RE .TP -.B \f[CB]\-Xlog:gc+ref=debug\f[R] -Logs messages tagged with both \f[CB]gc\f[R] and \f[CB]ref\f[R] tags, using -the \f[CB]debug\f[R] level to \f[CB]stdout\f[R], with default decorations. +\f[V]-Xlog:gc+ref=debug\f[R] +Logs messages tagged with both \f[V]gc\f[R] and \f[V]ref\f[R] tags, +using the \f[V]debug\f[R] level to \f[V]stdout\f[R], with default +decorations. Messages tagged only with one of the two tags won\[aq]t be logged. -.RS -.RE .TP -.B \f[CB]\-Xlog:gc=debug:file=gc.txt:none\f[R] -Logs messages tagged with the \f[CB]gc\f[R] tag using the \f[CB]debug\f[R] -level to a file called \f[CB]gc.txt\f[R] with no decorations. +\f[V]-Xlog:gc=debug:file=gc.txt:none\f[R] +Logs messages tagged with the \f[V]gc\f[R] tag using the \f[V]debug\f[R] +level to a file called \f[V]gc.txt\f[R] with no decorations. The default configuration for all other messages at level -\f[CB]warning\f[R] is still in effect. -.RS -.RE +\f[V]warning\f[R] is still in effect. .TP -.B \f[CB]\-Xlog:gc=trace:file=gctrace.txt:uptimemillis,pids:filecount=5,filesize=1024\f[R] -Logs messages tagged with the \f[CB]gc\f[R] tag using the \f[CB]trace\f[R] +\f[V]-Xlog:gc=trace:file=gctrace.txt:uptimemillis,pids:filecount=5,filesize=1024\f[R] +Logs messages tagged with the \f[V]gc\f[R] tag using the \f[V]trace\f[R] level to a rotating file set with 5 files with size 1 MB with the base -name \f[CB]gctrace.txt\f[R] and uses decorations \f[CB]uptimemillis\f[R] and -\f[CB]pid\f[R]. +name \f[V]gctrace.txt\f[R] and uses decorations \f[V]uptimemillis\f[R] +and \f[V]pid\f[R]. .RS .PP The default configuration for all other messages at level -\f[CB]warning\f[R] is still in effect. +\f[V]warning\f[R] is still in effect. .RE .TP -.B \f[CB]\-Xlog:gc::uptime,tid\f[R] -Logs messages tagged with the \f[CB]gc\f[R] tag using the default -\[aq]info\[aq] level to default the output \f[CB]stdout\f[R] and uses -decorations \f[CB]uptime\f[R] and \f[CB]tid\f[R]. +\f[V]-Xlog:gc::uptime,tid\f[R] +Logs messages tagged with the \f[V]gc\f[R] tag using the default +\[aq]info\[aq] level to default the output \f[V]stdout\f[R] and uses +decorations \f[V]uptime\f[R] and \f[V]tid\f[R]. The default configuration for all other messages at level -\f[CB]warning\f[R] is still in effect. -.RS -.RE +\f[V]warning\f[R] is still in effect. .TP -.B \f[CB]\-Xlog:gc*=info,safepoint*=off\f[R] -Logs messages tagged with at least \f[CB]gc\f[R] using the \f[CB]info\f[R] -level, but turns off logging of messages tagged with \f[CB]safepoint\f[R]. -Messages tagged with both \f[CB]gc\f[R] and \f[CB]safepoint\f[R] won\[aq]t +\f[V]-Xlog:gc*=info,safepoint*=off\f[R] +Logs messages tagged with at least \f[V]gc\f[R] using the \f[V]info\f[R] +level, but turns off logging of messages tagged with +\f[V]safepoint\f[R]. +Messages tagged with both \f[V]gc\f[R] and \f[V]safepoint\f[R] won\[aq]t be logged. -.RS -.RE .TP -.B \f[CB]\-Xlog:disable\ \-Xlog:safepoint=trace:safepointtrace.txt\f[R] +\f[V]-Xlog:disable -Xlog:safepoint=trace:safepointtrace.txt\f[R] Turns off all logging, including warnings and errors, and then enables -messages tagged with \f[CB]safepoint\f[R]using \f[CB]trace\f[R]level to the -file \f[CB]safepointtrace.txt\f[R]. +messages tagged with \f[V]safepoint\f[R]using \f[V]trace\f[R]level to +the file \f[V]safepointtrace.txt\f[R]. The default configuration doesn\[aq]t apply, because the command line -started with \f[CB]\-Xlog:disable\f[R]. -.RS -.RE -.SS Complex \-Xlog Usage Examples +started with \f[V]-Xlog:disable\f[R]. +.SS Complex -Xlog Usage Examples .PP The following describes a few complex examples of using the -\f[CB]\-Xlog\f[R] option. +\f[V]-Xlog\f[R] option. .TP -.B \f[CB]\-Xlog:gc+class*=debug\f[R] -Logs messages tagged with at least \f[CB]gc\f[R] and \f[CB]class\f[R] tags -using the \f[CB]debug\f[R] level to \f[CB]stdout\f[R]. +\f[V]-Xlog:gc+class*=debug\f[R] +Logs messages tagged with at least \f[V]gc\f[R] and \f[V]class\f[R] tags +using the \f[V]debug\f[R] level to \f[V]stdout\f[R]. The default configuration for all other messages at the level -\f[CB]warning\f[R] is still in effect -.RS -.RE -.TP -.B \f[CB]\-Xlog:gc+meta*=trace,class*=off:file=gcmetatrace.txt\f[R] -Logs messages tagged with at least the \f[CB]gc\f[R] and \f[CB]meta\f[R] -tags using the \f[CB]trace\f[R] level to the file \f[CB]metatrace.txt\f[R] -but turns off all messages tagged with \f[CB]class\f[R]. -Messages tagged with \f[CB]gc\f[R], \f[CB]meta\f[R], and \f[CB]class\f[R] -aren\[aq]t be logged as \f[CB]class*\f[R] is set to off. +\f[V]warning\f[R] is still in effect +.TP +\f[V]-Xlog:gc+meta*=trace,class*=off:file=gcmetatrace.txt\f[R] +Logs messages tagged with at least the \f[V]gc\f[R] and \f[V]meta\f[R] +tags using the \f[V]trace\f[R] level to the file \f[V]metatrace.txt\f[R] +but turns off all messages tagged with \f[V]class\f[R]. +Messages tagged with \f[V]gc\f[R], \f[V]meta\f[R], and \f[V]class\f[R] +aren\[aq]t be logged as \f[V]class*\f[R] is set to off. The default configuration for all other messages at level -\f[CB]warning\f[R] is in effect except for those that include -\f[CB]class\f[R]. -.RS -.RE +\f[V]warning\f[R] is in effect except for those that include +\f[V]class\f[R]. .TP -.B \f[CB]\-Xlog:gc+meta=trace\f[R] -Logs messages tagged with exactly the \f[CB]gc\f[R] and \f[CB]meta\f[R] tags -using the \f[CB]trace\f[R] level to \f[CB]stdout\f[R]. +\f[V]-Xlog:gc+meta=trace\f[R] +Logs messages tagged with exactly the \f[V]gc\f[R] and \f[V]meta\f[R] +tags using the \f[V]trace\f[R] level to \f[V]stdout\f[R]. The default configuration for all other messages at level -\f[CB]warning\f[R] is still be in effect. -.RS -.RE +\f[V]warning\f[R] is still be in effect. .TP -.B \f[CB]\-Xlog:gc+class+heap*=debug,meta*=warning,threads*=off\f[R] -Logs messages tagged with at least \f[CB]gc\f[R], \f[CB]class\f[R], and -\f[CB]heap\f[R] tags using the \f[CB]trace\f[R] level to \f[CB]stdout\f[R] but -only log messages tagged with \f[CB]meta\f[R] with level. +\f[V]-Xlog:gc+class+heap*=debug,meta*=warning,threads*=off\f[R] +Logs messages tagged with at least \f[V]gc\f[R], \f[V]class\f[R], and +\f[V]heap\f[R] tags using the \f[V]trace\f[R] level to \f[V]stdout\f[R] +but only log messages tagged with \f[V]meta\f[R] with level. The default configuration for all other messages at the level -\f[CB]warning\f[R] is in effect except for those that include -\f[CB]threads\f[R]. -.RS -.RE +\f[V]warning\f[R] is in effect except for those that include +\f[V]threads\f[R]. .SH VALIDATE JAVA VIRTUAL MACHINE FLAG ARGUMENTS .PP -You use values provided to all Java Virtual Machine (JVM) command\-line -flags for validation and, if the input value is invalid or -out\-of\-range, then an appropriate error message is displayed. +You use values provided to all Java Virtual Machine (JVM) command-line +flags for validation and, if the input value is invalid or out-of-range, +then an appropriate error message is displayed. .PP Whether they\[aq]re set ergonomically, in a command line, by an input tool, or through the APIs (for example, classes contained in the package -\f[CB]java.lang.management\f[R]) the values provided to all Java Virtual -Machine (JVM) command\-line flags are validated. +\f[V]java.lang.management\f[R]) the values provided to all Java Virtual +Machine (JVM) command-line flags are validated. Ergonomics are described in Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide. .PP Range and constraints are validated either when all flags have their values set during JVM initialization or a flag\[aq]s value is changed -during runtime (for example using the \f[CB]jcmd\f[R] tool). +during runtime (for example using the \f[V]jcmd\f[R] tool). The JVM is terminated if a value violates either the range or constraint check and an appropriate error message is printed on the error stream. .PP @@ -5148,15 +4771,15 @@ JVM exits with an error: .IP .nf \f[CB] -java\ \-XX:AllocatePrefetchStyle=5\ \-version -intx\ AllocatePrefetchStyle=5\ is\ outside\ the\ allowed\ range\ [\ 0\ ...\ 3\ ] -Improperly\ specified\ VM\ option\ \[aq]AllocatePrefetchStyle=5\[aq] -Error:\ Could\ not\ create\ the\ Java\ Virtual\ Machine. -Error:\ A\ fatal\ exception\ has\ occurred.\ Program\ will\ exit. +java -XX:AllocatePrefetchStyle=5 -version +intx AllocatePrefetchStyle=5 is outside the allowed range [ 0 ... 3 ] +Improperly specified VM option \[aq]AllocatePrefetchStyle=5\[aq] +Error: Could not create the Java Virtual Machine. +Error: A fatal exception has occurred. Program will exit. \f[R] .fi .PP -The flag \f[CB]\-XX:+PrintFlagsRanges\f[R] prints the range of all the +The flag \f[V]-XX:+PrintFlagsRanges\f[R] prints the range of all the flags. This flag allows automatic testing of the flags by the values provided by the ranges. @@ -5167,7 +4790,7 @@ For example, .IP .nf \f[CB] -intx\ \ \ ThreadStackSize\ [\ 0\ ...\ 9007199254740987\ ]\ {pd\ product} +intx ThreadStackSize [ 0 ... 9007199254740987 ] {pd product} \f[R] .fi .PP @@ -5177,7 +4800,7 @@ For example: .IP .nf \f[CB] -size_t\ NewSize\ \ \ \ \ \ \ \ \ [\ \ \ ...\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\ {product} +size_t NewSize [ ... ] {product} \f[R] .fi .PP @@ -5189,17 +4812,16 @@ values and aren\[aq]t implemented. You use large pages, also known as huge pages, as memory pages that are significantly larger than the standard memory page size (which varies depending on the processor and operating system). -Large pages optimize processor Translation\-Lookaside Buffers. +Large pages optimize processor Translation-Lookaside Buffers. .PP -A Translation\-Lookaside Buffer (TLB) is a page translation cache that -holds the most\-recently used virtual\-to\-physical address -translations. +A Translation-Lookaside Buffer (TLB) is a page translation cache that +holds the most-recently used virtual-to-physical address translations. A TLB is a scarce system resource. A TLB miss can be costly because the processor must then read from the hierarchical page table, which may require multiple memory accesses. By using a larger memory page size, a single TLB entry can represent a larger memory range. -This results in less pressure on a TLB, and memory\-intensive +This results in less pressure on a TLB, and memory-intensive applications may have better performance. .PP However, using large pages can negatively affect system performance. @@ -5219,18 +4841,18 @@ To check if your environment supports large pages, try the following: .IP .nf \f[CB] -#\ cat\ /proc/meminfo\ |\ grep\ Huge -HugePages_Total:\ 0 -HugePages_Free:\ 0 +# cat /proc/meminfo | grep Huge +HugePages_Total: 0 +HugePages_Free: 0 \&... -Hugepagesize:\ 2048\ kB +Hugepagesize: 2048 kB \f[R] .fi .PP -If the output contains items prefixed with "Huge", then your system -supports large pages. +If the output contains items prefixed with \[dq]Huge\[dq], then your +system supports large pages. The values may vary depending on environment. -The \f[CB]Hugepagesize\f[R] field shows the default large page size in +The \f[V]Hugepagesize\f[R] field shows the default large page size in your environment, and the other fields show details for large pages of this size. Newer kernels have support for multiple large page sizes. @@ -5238,35 +4860,35 @@ To list the supported page sizes, run this: .IP .nf \f[CB] -#\ ls\ /sys/kernel/mm/hugepages/ -hugepages\-1048576kB\ \ hugepages\-2048kB +# ls /sys/kernel/mm/hugepages/ +hugepages-1048576kB hugepages-2048kB \f[R] .fi .PP The above environment supports 2 MB and 1 GB large pages, but they need to be configured so that the JVM can use them. When using large pages and not enabling transparent huge pages (option -\f[CB]\-XX:+UseTransparentHugePages\f[R]), the number of large pages must -be pre\-allocated. +\f[V]-XX:+UseTransparentHugePages\f[R]), the number of large pages must +be pre-allocated. For example, to enable 8 GB of memory to be backed by 2 MB large pages, -login as \f[CB]root\f[R] and run: +login as \f[V]root\f[R] and run: .RS .PP -\f[CB]#\ echo\ 4096\ >\ /sys/kernel/mm/hugepages/hugepages\-2048kB/nr_hugepages\f[R] +\f[V]# echo 4096 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages\f[R] .RE .PP -It is always recommended to check the value of \f[CB]nr_hugepages\f[R] +It is always recommended to check the value of \f[V]nr_hugepages\f[R] after the request to make sure the kernel was able to allocate the requested number of large pages. .PP -When using the option \f[CB]\-XX:+UseSHM\f[R] to enable large pages you -also need to make sure the \f[CB]SHMMAX\f[R] parameter is configured to +When using the option \f[V]-XX:+UseSHM\f[R] to enable large pages you +also need to make sure the \f[V]SHMMAX\f[R] parameter is configured to allow large enough shared memory segments to be allocated. -To allow a maximum shared segment of 8 GB, login as \f[CB]root\f[R] and +To allow a maximum shared segment of 8 GB, login as \f[V]root\f[R] and run: .RS .PP -\f[CB]#\ echo\ 8589934592\ >\ /proc/sys/kernel/shmmax\f[R] +\f[V]# echo 8589934592 > /proc/sys/kernel/shmmax\f[R] .RE .PP In some environments this is not needed since the default value is large @@ -5274,10 +4896,10 @@ enough, but it is important to make sure the value is large enough to fit the amount of memory intended to be backed by large pages. .RS .PP -\f[B]Note:\f[R] The values contained in \f[CB]/proc\f[R] and \f[CB]/sys\f[R] -reset after you reboot your system, so may want to set them in an -initialization script (for example, \f[CB]rc.local\f[R] or -\f[CB]sysctl.conf\f[R]). +\f[B]Note:\f[R] The values contained in \f[V]/proc\f[R] and +\f[V]/sys\f[R] reset after you reboot your system, so may want to set +them in an initialization script (for example, \f[V]rc.local\f[R] or +\f[V]sysctl.conf\f[R]). .RE .PP If you configure the OS kernel parameters to enable use of large pages, @@ -5288,7 +4910,7 @@ Code cache .IP \[bu] 2 Marking bitmaps .PP -Consequently, if you configure the \f[CB]nr_hugepages\f[R] parameter to +Consequently, if you configure the \f[V]nr_hugepages\f[R] parameter to the size of the Java heap, then the JVM can still fail to allocate the heap using large pages because other areas such as the code cache might already have used some of the configured large pages. @@ -5300,9 +4922,10 @@ assign additional privileges to the user who is running the application: Select \f[B]Control Panel\f[R], \f[B]Administrative Tools\f[R], and then \f[B]Local Security Policy\f[R]. .IP "2." 3 -Select \f[B]Local Policies\f[R] and then \f[B]User Rights Assignment\f[R]. +Select \f[B]Local Policies\f[R] and then \f[B]User Rights +Assignment\f[R]. .IP "3." 3 -Double\-click \f[B]Lock pages in memory\f[R], then add users and/or +Double-click \f[B]Lock pages in memory\f[R], then add users and/or groups. .IP "4." 3 Reboot your system. @@ -5316,7 +4939,7 @@ Application Class Data Sharing (AppCDS) stores classes used by your applications in an archive file. Since these classes are stored in a format that can be loaded very quickly (compared to classes stored in a JAR file), AppCDS can improve -the start\-up time of your applications. +the start-up time of your applications. In addition, AppCDS can reduce the runtime memory footprint by sharing parts of these classes across multiple processes. .PP @@ -5330,113 +4953,114 @@ For example, your application may use only a few APIs provided by a large library. .SS Using CDS Archives .PP -By default, in most JDK distributions, unless \f[CB]\-Xshare:off\f[R] is +By default, in most JDK distributions, unless \f[V]-Xshare:off\f[R] is specified, the JVM starts up with a default CDS archive, which is -usually located in \f[CB]JAVA_HOME/lib/server/classes.jsa\f[R] (or -\f[CB]JAVA_HOME\\bin\\server\\classes.jsa\f[R] on Windows). +usually located in \f[V]JAVA_HOME/lib/server/classes.jsa\f[R] (or +\f[V]JAVA_HOME\[rs]bin\[rs]server\[rs]classes.jsa\f[R] on Windows). This archive contains about 1300 core library classes that are used by most applications. .PP To use CDS for the exact set of classes used by your application, you -can use the \f[CB]\-XX:SharedArchiveFile\f[R] option, which has the +can use the \f[V]-XX:SharedArchiveFile\f[R] option, which has the general form: .RS .PP -\f[CB]\-XX:SharedArchiveFile=:\f[R] +\f[V]-XX:SharedArchiveFile=:\f[R] .RE .IP \[bu] 2 -The \f[CB]\f[R] overrides the default CDS archive. +The \f[V]\f[R] overrides the default CDS archive. .IP \[bu] 2 -The \f[CB]\f[R] provides additional classes that can be -loaded on top of those in the \f[CB]\f[R]. +The \f[V]\f[R] provides additional classes that can be +loaded on top of those in the \f[V]\f[R]. .IP \[bu] 2 -On Windows, the above path delimiter \f[CB]:\f[R] should be replaced with -\f[CB];\f[R] +On Windows, the above path delimiter \f[V]:\f[R] should be replaced with +\f[V];\f[R] .PP -(The names "static" and "dynamic" are used for historical reasons. -The only significance is that the "static" archive is loaded first and -the "dynamic" archive is loaded second). +(The names \[dq]static\[dq] and \[dq]dynamic\[dq] are used for +historical reasons. +The only significance is that the \[dq]static\[dq] archive is loaded +first and the \[dq]dynamic\[dq] archive is loaded second). .PP The JVM can use up to two archives. -To use only a single \f[CB]\f[R], you can omit the -\f[CB]\f[R] portion: +To use only a single \f[V]\f[R], you can omit the +\f[V]\f[R] portion: .RS .PP -\f[CB]\-XX:SharedArchiveFile=\f[R] +\f[V]-XX:SharedArchiveFile=\f[R] .RE .PP -For convenience, the \f[CB]\f[R] records the location of -the \f[CB]\f[R]. -Therefore, you can omit the \f[CB]\f[R] by saying only: +For convenience, the \f[V]\f[R] records the location of +the \f[V]\f[R]. +Therefore, you can omit the \f[V]\f[R] by saying only: .RS .PP -\f[CB]\-XX:SharedArchiveFile=\f[R] +\f[V]-XX:SharedArchiveFile=\f[R] .RE .SS Manually Creating CDS Archives .PP CDS archives can be created manually using several methods: .IP \[bu] 2 -\f[CB]\-Xshare:dump\f[R] +\f[V]-Xshare:dump\f[R] .IP \[bu] 2 -\f[CB]\-XX:ArchiveClassesAtExit\f[R] +\f[V]-XX:ArchiveClassesAtExit\f[R] .IP \[bu] 2 -\f[CB]jcmd\ VM.cds\f[R] +\f[V]jcmd VM.cds\f[R] .PP -One common operation in all these methods is a "trial run", where you -run the application once to determine the classes that should be stored -in the archive. -.SS Creating a Static CDS Archive File with \-Xshare:dump +One common operation in all these methods is a \[dq]trial run\[dq], +where you run the application once to determine the classes that should +be stored in the archive. +.SS Creating a Static CDS Archive File with -Xshare:dump .PP The following steps create a static CDS archive file that contains all -the classes used by the \f[CB]test.Hello\f[R] application. +the classes used by the \f[V]test.Hello\f[R] application. .IP "1." 3 -Create a list of all classes used by the \f[CB]test.Hello\f[R] +Create a list of all classes used by the \f[V]test.Hello\f[R] application. -The following command creates a file named \f[CB]hello.classlist\f[R] that -contains a list of all classes used by this application: +The following command creates a file named \f[V]hello.classlist\f[R] +that contains a list of all classes used by this application: .RS 4 .RS .PP -\f[CB]java\ \-Xshare:off\ \-XX:DumpLoadedClassList=hello.classlist\ \-cp\ hello.jar\ test.Hello\f[R] +\f[V]java -Xshare:off -XX:DumpLoadedClassList=hello.classlist -cp hello.jar test.Hello\f[R] .RE .PP -The classpath specified by the \f[CB]\-cp\f[R] parameter must contain only +The classpath specified by the \f[V]-cp\f[R] parameter must contain only JAR files. .RE .IP "2." 3 -Create a static archive, named \f[CB]hello.jsa\f[R], that contains all the -classes in \f[CB]hello.classlist\f[R]: +Create a static archive, named \f[V]hello.jsa\f[R], that contains all +the classes in \f[V]hello.classlist\f[R]: .RS 4 .RS .PP -\f[CB]java\ \-Xshare:dump\ \-XX:SharedArchiveFile=hello.jsa\ \-XX:SharedClassListFile=hello.classlist\ \-cp\ hello.jar\f[R] +\f[V]java -Xshare:dump -XX:SharedArchiveFile=hello.jsa -XX:SharedClassListFile=hello.classlist -cp hello.jar\f[R] .RE .RE .IP "3." 3 -Run the application \f[CB]test.Hello\f[R] with the archive -\f[CB]hello.jsa\f[R]: +Run the application \f[V]test.Hello\f[R] with the archive +\f[V]hello.jsa\f[R]: .RS 4 .RS .PP -\f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ test.Hello\f[R] +\f[V]java -XX:SharedArchiveFile=hello.jsa -cp hello.jar test.Hello\f[R] .RE .RE .IP "4." 3 -\f[B]Optional\f[R] Verify that the \f[CB]test.Hello\f[R] application is -using the class contained in the \f[CB]hello.jsa\f[R] shared archive: +\f[B]Optional\f[R] Verify that the \f[V]test.Hello\f[R] application is +using the class contained in the \f[V]hello.jsa\f[R] shared archive: .RS 4 .RS .PP -\f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ \-Xlog:class+load\ test.Hello\f[R] +\f[V]java -XX:SharedArchiveFile=hello.jsa -cp hello.jar -Xlog:class+load test.Hello\f[R] .RE .PP The output of this command should contain the following text: .RS .PP -\f[CB][info][class,load]\ test.Hello\ source:\ shared\ objects\ file\f[R] +\f[V][info][class,load] test.Hello source: shared objects file\f[R] .RE .RE -.SS Creating a Dynamic CDS Archive File with \-XX:ArchiveClassesAtExit +.SS Creating a Dynamic CDS Archive File with -XX:ArchiveClassesAtExit .PP Advantages of dynamic CDS archives are: .IP \[bu] 2 @@ -5446,103 +5070,103 @@ classes that are already in the static archive. They are created with one fewer step than the comparable static archive. .PP The following steps create a dynamic CDS archive file that contains the -classes that are used by the \f[CB]test.Hello\f[R] application, excluding +classes that are used by the \f[V]test.Hello\f[R] application, excluding those that are already in the default CDS archive. .IP "1." 3 -Create a dynamic CDS archive, named \f[CB]hello.jsa\f[R], that contains -all the classes in \f[CB]hello.jar\f[R] loaded by the application -\f[CB]test.Hello\f[R]: +Create a dynamic CDS archive, named \f[V]hello.jsa\f[R], that contains +all the classes in \f[V]hello.jar\f[R] loaded by the application +\f[V]test.Hello\f[R]: .RS 4 .RS .PP -\f[CB]java\ \-XX:ArchiveClassesAtExit=hello.jsa\ \-cp\ hello.jar\ Hello\f[R] +\f[V]java -XX:ArchiveClassesAtExit=hello.jsa -cp hello.jar Hello\f[R] .RE .RE .IP "2." 3 -Run the application \f[CB]test.Hello\f[R] with the shared archive -\f[CB]hello.jsa\f[R]: +Run the application \f[V]test.Hello\f[R] with the shared archive +\f[V]hello.jsa\f[R]: .RS 4 .RS .PP -\f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ test.Hello\f[R] +\f[V]java -XX:SharedArchiveFile=hello.jsa -cp hello.jar test.Hello\f[R] .RE .RE .IP "3." 3 \f[B]Optional\f[R] Repeat step 4 of the previous section to verify that -the \f[CB]test.Hello\f[R] application is using the class contained in the -\f[CB]hello.jsa\f[R] shared archive. +the \f[V]test.Hello\f[R] application is using the class contained in the +\f[V]hello.jsa\f[R] shared archive. .PP It\[aq]s also possible to create a dynamic CDS archive with a -non\-default static CDS archive. +non-default static CDS archive. E.g., .RS .PP -\f[CB]java\ \-XX:SharedArchiveFile=base.jsa\ \-XX:ArchiveClassesAtExit=hello.jsa\ \-cp\ hello.jar\ Hello\f[R] +\f[V]java -XX:SharedArchiveFile=base.jsa -XX:ArchiveClassesAtExit=hello.jsa -cp hello.jar Hello\f[R] .RE .PP To run the application using this dynamic CDS archive: .RS .PP -\f[CB]java\ \-XX:SharedArchiveFile=base.jsa:hello.jsa\ \-cp\ hello.jar\ Hello\f[R] +\f[V]java -XX:SharedArchiveFile=base.jsa:hello.jsa -cp hello.jar Hello\f[R] .RE .PP -(On Windows, the above path delimiter \f[CB]:\f[R] should be replaced with -\f[CB];\f[R]) +(On Windows, the above path delimiter \f[V]:\f[R] should be replaced +with \f[V];\f[R]) .PP As mention above, the name of the static archive can be skipped: .RS .PP -\f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ Hello\f[R] +\f[V]java -XX:SharedArchiveFile=hello.jsa -cp hello.jar Hello\f[R] .RE .SS Creating CDS Archive Files with jcmd .PP The previous two sections require you to modify the application\[aq]s -start\-up script in order to create a CDS archive. +start-up script in order to create a CDS archive. Sometimes this could be difficult, for example, if the application\[aq]s class path is set up by complex routines. .PP -The \f[CB]jcmd\ VM.cds\f[R] command provides a less intrusive way for +The \f[V]jcmd VM.cds\f[R] command provides a less intrusive way for creating a CDS archive by connecting to a running JVM process. You can create either a static: .RS .PP -\f[CB]jcmd\ \ VM.cds\ static_dump\ my_static_archive.jsa\f[R] +\f[V]jcmd VM.cds static_dump my_static_archive.jsa\f[R] .RE .PP or a dynamic archive: .RS .PP -\f[CB]jcmd\ \ VM.cds\ dynamic_dump\ my_dynamic_archive.jsa\f[R] +\f[V]jcmd VM.cds dynamic_dump my_dynamic_archive.jsa\f[R] .RE .PP To use the resulting archive file in a subsequent run of the application -without modifying the application\[aq]s start\-up script, you can use -the following technique: +without modifying the application\[aq]s start-up script, you can use the +following technique: .RS .PP -\f[CB]env\ JAVA_TOOL_OPTIONS=\-XX:SharedArchiveFile=my_static_archive.jsa\ bash\ app_start.sh\f[R] +\f[V]env JAVA_TOOL_OPTIONS=-XX:SharedArchiveFile=my_static_archive.jsa bash app_start.sh\f[R] .RE .PP -Note: to use \f[CB]jcmd\ \ VM.cds\ dynamic_dump\f[R], the JVM process -identified by \f[CB]\f[R] must be started with -\f[CB]\-XX:+RecordDynamicDumpInfo\f[R], which can also be passed to the -application start\-up script with the same technique: +Note: to use \f[V]jcmd VM.cds dynamic_dump\f[R], the JVM process +identified by \f[V]\f[R] must be started with +\f[V]-XX:+RecordDynamicDumpInfo\f[R], which can also be passed to the +application start-up script with the same technique: .RS .PP -\f[CB]env\ JAVA_TOOL_OPTIONS=\-XX:+RecordDynamicDumpInfo\ bash\ app_start.sh\f[R] +\f[V]env JAVA_TOOL_OPTIONS=-XX:+RecordDynamicDumpInfo bash app_start.sh\f[R] .RE -.SS Creating Dynamic CDS Archive File with \-XX:+AutoCreateSharedArchive +.SS Creating Dynamic CDS Archive File with -XX:+AutoCreateSharedArchive .PP -\f[CB]\-XX:+AutoCreateSharedArchive\f[R] is a more convenient way of +\f[V]-XX:+AutoCreateSharedArchive\f[R] is a more convenient way of creating/using CDS archives. Unlike the methods of manual CDS archive creation described in the -previous section, with \f[CB]\-XX:+AutoCreateSharedArchive\f[R], it\[aq]s +previous section, with \f[V]-XX:+AutoCreateSharedArchive\f[R], it\[aq]s no longer necessary to have a separate trial run. -Instead, you can always run the application with the same command\-line +Instead, you can always run the application with the same command-line and enjoy the benefits of CDS automatically. .RS .PP -\f[CB]java\ \-XX:+AutoCreateSharedArchive\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ Hello\f[R] +\f[V]java -XX:+AutoCreateSharedArchive -XX:SharedArchiveFile=hello.jsa -cp hello.jar Hello\f[R] .RE .PP If the specified archive file exists and was created by the same version @@ -5563,17 +5187,17 @@ replaced at exit. Developers should note that the contents of the CDS archive file are specific to each build of the JDK. Therefore, if you switch to a different JDK build, -\f[CB]\-XX:+AutoCreateSharedArchive\f[R] will automatically recreate the +\f[V]-XX:+AutoCreateSharedArchive\f[R] will automatically recreate the archive to match the JDK. If you intend to use this feature with an existing archive, you should make sure that the archive is created by at least version 19 of the JDK. .SS Restrictions on Class Path and Module Path .IP \[bu] 2 -Neither the class path (\f[CB]\-classpath\f[R] and -\f[CB]\-Xbootclasspath/a\f[R]) nor the module path -(\f[CB]\-\-module\-path\f[R]) can contain non\-empty directories. +Neither the class path (\f[V]-classpath\f[R] and +\f[V]-Xbootclasspath/a\f[R]) nor the module path +(\f[V]--module-path\f[R]) can contain non-empty directories. .IP \[bu] 2 -Only modular JAR files are supported in \f[CB]\-\-module\-path\f[R]. +Only modular JAR files are supported in \f[V]--module-path\f[R]. Exploded modules are not supported. .IP \[bu] 2 The class path used at archive creation time must be the same as (or a @@ -5583,9 +5207,9 @@ prefix of) the class path used at run time. The CDS archive cannot be loaded if any JAR files in the class path or module path are modified after the archive is generated. .IP \[bu] 2 -If any of the VM options \f[CB]\-\-upgrade\-module\-path\f[R], -\f[CB]\-\-patch\-module\f[R] or \f[CB]\-\-limit\-modules\f[R] are specified, -CDS is disabled. +If any of the VM options \f[V]--upgrade-module-path\f[R], +\f[V]--patch-module\f[R] or \f[V]--limit-modules\f[R] are specified, CDS +is disabled. This means that the JVM will execute without loading any CDS archives. In addition, if you try to create a CDS archive with any of these 3 options specified, the JVM will report an error. @@ -5599,7 +5223,7 @@ Use the following commands and advanced options to achieve higher throughput performance for your application: .RS .PP -\f[CB]java\ \-server\ \-XX:+UseParallelGC\ \-XX:+UseLargePages\ \-Xmn10g\ \ \-Xms26g\ \-Xmx26g\f[R] +\f[V]java -server -XX:+UseParallelGC -XX:+UseLargePages -Xmn10g -Xms26g -Xmx26g\f[R] .RE .SS Tuning for Lower Response Time .PP @@ -5607,16 +5231,15 @@ Use the following commands and advanced options to achieve lower response times for your application: .RS .PP -\f[CB]java\ \-XX:+UseG1GC\ \-XX:MaxGCPauseMillis=100\f[R] +\f[V]java -XX:+UseG1GC -XX:MaxGCPauseMillis=100\f[R] .RE -.SS Keeping the Java Heap Small and Reducing the Dynamic Footprint of -Embedded Applications +.SS Keeping the Java Heap Small and Reducing the Dynamic Footprint of Embedded Applications .PP Use the following advanced runtime options to keep the Java heap small and reduce the dynamic footprint of embedded applications: .RS .PP -\f[CB]\-XX:MaxHeapFreeRatio=10\ \-XX:MinHeapFreeRatio=5\f[R] +\f[V]-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5\f[R] .RE .RS .PP @@ -5633,9 +5256,9 @@ The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM. However, a Java application may choose to return any value by using the -API call \f[CB]System.exit(exitValue)\f[R]. +API call \f[V]System.exit(exitValue)\f[R]. The values are: .IP \[bu] 2 -\f[CB]0\f[R]: Successful completion +\f[V]0\f[R]: Successful completion .IP \[bu] 2 -\f[CB]>0\f[R]: An error occurred +\f[V]>0\f[R]: An error occurred diff --git a/src/java.base/share/man/keytool.1 b/src/java.base/share/man/keytool.1 index 2e3534cb36b66..6db1181ff3d2c 100644 --- a/src/java.base/share/man/keytool.1 +++ b/src/java.base/share/man/keytool.1 @@ -19,73 +19,87 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\"t -.\" Automatically generated by Pandoc 2.3.1 +'\" t +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "KEYTOOL" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "KEYTOOL" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -keytool \- a key and certificate management utility +keytool - a key and certificate management utility .SH SYNOPSIS .PP -\f[CB]keytool\f[R] [\f[I]commands\f[R]] +\f[V]keytool\f[R] [\f[I]commands\f[R]] .TP -.B \f[I]commands\f[R] -Commands for \f[CB]keytool\f[R] include the following: +\f[I]commands\f[R] +Commands for \f[V]keytool\f[R] include the following: .RS .IP \[bu] 2 -\f[CB]\-certreq\f[R]: Generates a certificate request +\f[V]-certreq\f[R]: Generates a certificate request .IP \[bu] 2 -\f[CB]\-changealias\f[R]: Changes an entry\[aq]s alias +\f[V]-changealias\f[R]: Changes an entry\[aq]s alias .IP \[bu] 2 -\f[CB]\-delete\f[R]: Deletes an entry +\f[V]-delete\f[R]: Deletes an entry .IP \[bu] 2 -\f[CB]\-exportcert\f[R]: Exports certificate +\f[V]-exportcert\f[R]: Exports certificate .IP \[bu] 2 -\f[CB]\-genkeypair\f[R]: Generates a key pair +\f[V]-genkeypair\f[R]: Generates a key pair .IP \[bu] 2 -\f[CB]\-genseckey\f[R]: Generates a secret key +\f[V]-genseckey\f[R]: Generates a secret key .IP \[bu] 2 -\f[CB]\-gencert\f[R]: Generates a certificate from a certificate request +\f[V]-gencert\f[R]: Generates a certificate from a certificate request .IP \[bu] 2 -\f[CB]\-importcert\f[R]: Imports a certificate or a certificate chain +\f[V]-importcert\f[R]: Imports a certificate or a certificate chain .IP \[bu] 2 -\f[CB]\-importpass\f[R]: Imports a password +\f[V]-importpass\f[R]: Imports a password .IP \[bu] 2 -\f[CB]\-importkeystore\f[R]: Imports one or all entries from another +\f[V]-importkeystore\f[R]: Imports one or all entries from another keystore .IP \[bu] 2 -\f[CB]\-keypasswd\f[R]: Changes the key password of an entry +\f[V]-keypasswd\f[R]: Changes the key password of an entry .IP \[bu] 2 -\f[CB]\-list\f[R]: Lists entries in a keystore +\f[V]-list\f[R]: Lists entries in a keystore .IP \[bu] 2 -\f[CB]\-printcert\f[R]: Prints the content of a certificate +\f[V]-printcert\f[R]: Prints the content of a certificate .IP \[bu] 2 -\f[CB]\-printcertreq\f[R]: Prints the content of a certificate request +\f[V]-printcertreq\f[R]: Prints the content of a certificate request .IP \[bu] 2 -\f[CB]\-printcrl\f[R]: Prints the content of a Certificate Revocation List +\f[V]-printcrl\f[R]: Prints the content of a Certificate Revocation List (CRL) file .IP \[bu] 2 -\f[CB]\-storepasswd\f[R]: Changes the store password of a keystore +\f[V]-storepasswd\f[R]: Changes the store password of a keystore .IP \[bu] 2 -\f[CB]\-showinfo\f[R]: Displays security\-related information +\f[V]-showinfo\f[R]: Displays security-related information .IP \[bu] 2 -\f[CB]\-version\f[R]: Prints the program version +\f[V]-version\f[R]: Prints the program version .PP See \f[B]Commands and Options\f[R] for a description of these commands with their options. .RE .SH DESCRIPTION .PP -The \f[CB]keytool\f[R] command is a key and certificate management +The \f[V]keytool\f[R] command is a key and certificate management utility. It enables users to administer their own public/private key pairs and -associated certificates for use in self\-authentication (where a user +associated certificates for use in self-authentication (where a user authenticates themselves to other users and services) or data integrity and authentication services, by using digital signatures. -The \f[CB]keytool\f[R] command also enables users to cache the public keys -(in the form of certificates) of their communicating peers. +The \f[V]keytool\f[R] command also enables users to cache the public +keys (in the form of certificates) of their communicating peers. .PP A certificate is a digitally signed statement from one entity (person, company, and so on), which says that the public key (and some other @@ -96,42 +110,42 @@ Integrity means that the data hasn\[aq]t been modified or tampered with, and authenticity means that the data comes from the individual who claims to have created and signed it. .PP -The \f[CB]keytool\f[R] command also enables users to administer secret +The \f[V]keytool\f[R] command also enables users to administer secret keys and passphrases used in symmetric encryption and decryption (Data Encryption Standard). -It can also display other security\-related information. +It can also display other security-related information. .PP -The \f[CB]keytool\f[R] command stores the keys and certificates in a +The \f[V]keytool\f[R] command stores the keys and certificates in a keystore. .PP -The \f[CB]keytool\f[R] command uses the -\f[CB]jdk.certpath.disabledAlgorithms\f[R] and -\f[CB]jdk.security.legacyAlgorithms\f[R] security properties to determine +The \f[V]keytool\f[R] command uses the +\f[V]jdk.certpath.disabledAlgorithms\f[R] and +\f[V]jdk.security.legacyAlgorithms\f[R] security properties to determine which algorithms are considered a security risk. It emits warnings when disabled or legacy algorithms are being used. -The \f[CB]jdk.certpath.disabledAlgorithms\f[R] and -\f[CB]jdk.security.legacyAlgorithms\f[R] security properties are defined -in the \f[CB]java.security\f[R] file (located in the JDK\[aq]s -\f[CB]$JAVA_HOME/conf/security\f[R] directory). +The \f[V]jdk.certpath.disabledAlgorithms\f[R] and +\f[V]jdk.security.legacyAlgorithms\f[R] security properties are defined +in the \f[V]java.security\f[R] file (located in the JDK\[aq]s +\f[V]$JAVA_HOME/conf/security\f[R] directory). .SH COMMAND AND OPTION NOTES .PP The following notes apply to the descriptions in \f[B]Commands and Options\f[R]: .IP \[bu] 2 All command and option names are preceded by a hyphen sign -(\f[CB]\-\f[R]). +(\f[V]-\f[R]). .IP \[bu] 2 Only one command can be provided. .IP \[bu] 2 Options for each command can be provided in any order. .IP \[bu] 2 -There are two kinds of options, one is single\-valued which should be +There are two kinds of options, one is single-valued which should be only provided once. -If a single\-valued option is provided multiple times, the value of the +If a single-valued option is provided multiple times, the value of the last one is used. -The other type is multi\-valued, which can be provided multiple times -and all values are used. -The only multi\-valued option currently supported is the \f[CB]\-ext\f[R] +The other type is multi-valued, which can be provided multiple times and +all values are used. +The only multi-valued option currently supported is the \f[V]-ext\f[R] option used to generate X.509v3 certificate extensions. .IP \[bu] 2 All items not italicized or in braces ({ }) or brackets ([ ]) are @@ -139,32 +153,32 @@ required to appear as is. .IP \[bu] 2 Braces surrounding an option signify that a default value is used when the option isn\[aq]t specified on the command line. -Braces are also used around the \f[CB]\-v\f[R], \f[CB]\-rfc\f[R], and -\f[CB]\-J\f[R] options, which have meaning only when they appear on the +Braces are also used around the \f[V]-v\f[R], \f[V]-rfc\f[R], and +\f[V]-J\f[R] options, which have meaning only when they appear on the command line. They don\[aq]t have any default values. .IP \[bu] 2 Brackets surrounding an option signify that the user is prompted for the values when the option isn\[aq]t specified on the command line. -For the \f[CB]\-keypass\f[R] option, if you don\[aq]t specify the option -on the command line, then the \f[CB]keytool\f[R] command first attempts to -use the keystore password to recover the private/secret key. -If this attempt fails, then the \f[CB]keytool\f[R] command prompts you for -the private/secret key password. +For the \f[V]-keypass\f[R] option, if you don\[aq]t specify the option +on the command line, then the \f[V]keytool\f[R] command first attempts +to use the keystore password to recover the private/secret key. +If this attempt fails, then the \f[V]keytool\f[R] command prompts you +for the private/secret key password. .IP \[bu] 2 Items in italics (option values) represent the actual values that must be supplied. -For example, here is the format of the \f[CB]\-printcert\f[R] command: +For example, here is the format of the \f[V]-printcert\f[R] command: .RS 2 .RS .PP -\f[CB]keytool\ \-printcert\f[R] {\f[CB]\-file\f[R] \f[I]cert_file\f[R]} -{\f[CB]\-v\f[R]} +\f[V]keytool -printcert\f[R] {\f[V]-file\f[R] \f[I]cert_file\f[R]} +{\f[V]-v\f[R]} .RE .PP -When you specify a \f[CB]\-printcert\f[R] command, replace +When you specify a \f[V]-printcert\f[R] command, replace \f[I]cert_file\f[R] with the actual file name, as follows: -\f[CB]keytool\ \-printcert\ \-file\ VScert.cer\f[R] +\f[V]keytool -printcert -file VScert.cer\f[R] .RE .IP \[bu] 2 Option values must be enclosed in quotation marks when they contain a @@ -176,92 +190,92 @@ they perform. .PP \f[B]Commands for Creating or Adding Data to the Keystore\f[R]: .IP \[bu] 2 -\f[CB]\-gencert\f[R] +\f[V]-gencert\f[R] .IP \[bu] 2 -\f[CB]\-genkeypair\f[R] +\f[V]-genkeypair\f[R] .IP \[bu] 2 -\f[CB]\-genseckey\f[R] +\f[V]-genseckey\f[R] .IP \[bu] 2 -\f[CB]\-importcert\f[R] +\f[V]-importcert\f[R] .IP \[bu] 2 -\f[CB]\-importpass\f[R] +\f[V]-importpass\f[R] .PP \f[B]Commands for Importing Contents from Another Keystore\f[R]: .IP \[bu] 2 -\f[CB]\-importkeystore\f[R] +\f[V]-importkeystore\f[R] .PP \f[B]Commands for Generating a Certificate Request\f[R]: .IP \[bu] 2 -\f[CB]\-certreq\f[R] +\f[V]-certreq\f[R] .PP \f[B]Commands for Exporting Data\f[R]: .IP \[bu] 2 -\f[CB]\-exportcert\f[R] +\f[V]-exportcert\f[R] .PP \f[B]Commands for Displaying Data\f[R]: .IP \[bu] 2 -\f[CB]\-list\f[R] +\f[V]-list\f[R] .IP \[bu] 2 -\f[CB]\-printcert\f[R] +\f[V]-printcert\f[R] .IP \[bu] 2 -\f[CB]\-printcertreq\f[R] +\f[V]-printcertreq\f[R] .IP \[bu] 2 -\f[CB]\-printcrl\f[R] +\f[V]-printcrl\f[R] .PP \f[B]Commands for Managing the Keystore\f[R]: .IP \[bu] 2 -\f[CB]\-storepasswd\f[R] +\f[V]-storepasswd\f[R] .IP \[bu] 2 -\f[CB]\-keypasswd\f[R] +\f[V]-keypasswd\f[R] .IP \[bu] 2 -\f[CB]\-delete\f[R] +\f[V]-delete\f[R] .IP \[bu] 2 -\f[CB]\-changealias\f[R] +\f[V]-changealias\f[R] .PP -\f[B]Commands for Displaying Security\-related Information\f[R]: +\f[B]Commands for Displaying Security-related Information\f[R]: .IP \[bu] 2 -\f[CB]\-showinfo\f[R] +\f[V]-showinfo\f[R] .PP \f[B]Commands for Displaying Program Version\f[R]: .IP \[bu] 2 -\f[CB]\-version\f[R] +\f[V]-version\f[R] .SH COMMANDS FOR CREATING OR ADDING DATA TO THE KEYSTORE .TP -.B \f[CB]\-gencert\f[R] -The following are the available options for the \f[CB]\-gencert\f[R] +\f[V]-gencert\f[R] +The following are the available options for the \f[V]-gencert\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-rfc\f[R]}: Output in RFC (Request For Comment) style +{\f[V]-rfc\f[R]}: Output in RFC (Request For Comment) style .IP \[bu] 2 -{\f[CB]\-infile\f[R] \f[I]infile\f[R]}: Input file name +{\f[V]-infile\f[R] \f[I]infile\f[R]}: Input file name .IP \[bu] 2 -{\f[CB]\-outfile\f[R] \f[I]outfile\f[R]}: Output file name +{\f[V]-outfile\f[R] \f[I]outfile\f[R]}: Output file name .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -{\f[CB]\-sigalg\f[R] \f[I]sigalg\f[R]}: Signature algorithm name +{\f[V]-sigalg\f[R] \f[I]sigalg\f[R]}: Signature algorithm name .IP \[bu] 2 -{\f[CB]\-dname\f[R] \f[I]dname\f[R]}: Distinguished name +{\f[V]-dname\f[R] \f[I]dname\f[R]}: Distinguished name .IP \[bu] 2 -{\f[CB]\-startdate\f[R] \f[I]startdate\f[R]}: Certificate validity start +{\f[V]-startdate\f[R] \f[I]startdate\f[R]}: Certificate validity start date and time .IP \[bu] 2 -{\f[CB]\-ext\f[R] \f[I]ext\f[R]}*: X.509 extension +{\f[V]-ext\f[R] \f[I]ext\f[R]}*: X.509 extension .IP \[bu] 2 -{\f[CB]\-validity\f[R] \f[I]days\f[R]}: Validity number of days +{\f[V]-validity\f[R] \f[I]days\f[R]}: Validity number of days .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Adds a security provider by name (such as SunPKCS11) with an optional configure argument. The value of the security provider is the name of a security provider @@ -271,51 +285,51 @@ that is defined in a module. For example, .RS .PP -\f[CB]keytool\ \-addprovider\ SunPKCS11\ \-providerarg\ some.cfg\ ...\f[R] +\f[V]keytool -addprovider SunPKCS11 -providerarg some.cfg ...\f[R] .RE .PP \f[B]Note:\f[R] .PP For compatibility reasons, the SunPKCS11 provider can still be loaded -with \f[CB]\-providerclass\ sun.security.pkcs11.SunPKCS11\f[R] even if it +with \f[V]-providerclass sun.security.pkcs11.SunPKCS11\f[R] even if it is now defined in a module. This is the only module included in the JDK that needs a configuration, -and therefore the most widely used with the \f[CB]\-providerclass\f[R] +and therefore the most widely used with the \f[V]-providerclass\f[R] option. For legacy security providers located on classpath and loaded by -reflection, \f[CB]\-providerclass\f[R] should still be used. +reflection, \f[V]-providerclass\f[R] should still be used. .RE .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .RS 2 .PP -For example, if \f[CB]MyProvider\f[R] is a legacy provider loaded via +For example, if \f[V]MyProvider\f[R] is a legacy provider loaded via reflection, .RS .PP -\f[CB]keytool\ \-providerclass\ com.example.MyProvider\ ...\f[R] +\f[V]keytool -providerclass com.example.MyProvider ...\f[R] .RE .RE .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-gencert\f[R] command to generate a certificate as a +Use the \f[V]-gencert\f[R] command to generate a certificate as a response to a certificate request file (which can be created by the -\f[CB]keytool\ \-certreq\f[R] command). +\f[V]keytool -certreq\f[R] command). The command reads the request either from \f[I]infile\f[R] or, if omitted, from the standard input, signs it by using the alias\[aq]s private key, and outputs the X.509 certificate into either \f[I]outfile\f[R] or, if omitted, to the standard output. -When \f[CB]\-rfc\f[R] is specified, the output format is Base64\-encoded +When \f[V]-rfc\f[R] is specified, the output format is Base64-encoded PEM; otherwise, a binary DER is created. .PP -The \f[CB]\-sigalg\f[R] value specifies the algorithm that should be used +The \f[V]-sigalg\f[R] value specifies the algorithm that should be used to sign the certificate. The \f[I]startdate\f[R] argument is the start time and date that the certificate is valid. @@ -326,196 +340,197 @@ When \f[I]dname\f[R] is provided, it is used as the subject of the generated certificate. Otherwise, the one from the certificate request is used. .PP -The \f[CB]\-ext\f[R] value shows what X.509 extensions will be embedded in +The \f[V]-ext\f[R] value shows what X.509 extensions will be embedded in the certificate. -Read \f[B]Common Command Options\f[R] for the grammar of \f[CB]\-ext\f[R]. +Read \f[B]Common Command Options\f[R] for the grammar of \f[V]-ext\f[R]. .PP -The \f[CB]\-gencert\f[R] option enables you to create certificate chains. -The following example creates a certificate, \f[CB]e1\f[R], that contains +The \f[V]-gencert\f[R] option enables you to create certificate chains. +The following example creates a certificate, \f[V]e1\f[R], that contains three certificates in its certificate chain. .PP -The following commands creates four key pairs named \f[CB]ca\f[R], -\f[CB]ca1\f[R], \f[CB]ca2\f[R], and \f[CB]e1\f[R]: +The following commands creates four key pairs named \f[V]ca\f[R], +\f[V]ca1\f[R], \f[V]ca2\f[R], and \f[V]e1\f[R]: .IP .nf \f[CB] -keytool\ \-alias\ ca\ \-dname\ CN=CA\ \-genkeypair\ \-keyalg\ rsa -keytool\ \-alias\ ca1\ \-dname\ CN=CA\ \-genkeypair\ \-keyalg\ rsa -keytool\ \-alias\ ca2\ \-dname\ CN=CA\ \-genkeypair\ \-keyalg\ rsa -keytool\ \-alias\ e1\ \-dname\ CN=E1\ \-genkeypair\ \-keyalg\ rsa +keytool -alias ca -dname CN=CA -genkeypair -keyalg rsa +keytool -alias ca1 -dname CN=CA -genkeypair -keyalg rsa +keytool -alias ca2 -dname CN=CA -genkeypair -keyalg rsa +keytool -alias e1 -dname CN=E1 -genkeypair -keyalg rsa \f[R] .fi .PP The following two commands create a chain of signed certificates; -\f[CB]ca\f[R] signs \f[CB]ca1\f[R] and \f[CB]ca1\f[R] signs \f[CB]ca2\f[R], all -of which are self\-issued: +\f[V]ca\f[R] signs \f[V]ca1\f[R] and \f[V]ca1\f[R] signs \f[V]ca2\f[R], +all of which are self-issued: .IP .nf \f[CB] -keytool\ \-alias\ ca1\ \-certreq\ | -\ \ \ \ keytool\ \-alias\ ca\ \-gencert\ \-ext\ san=dns:ca1\ | -\ \ \ \ keytool\ \-alias\ ca1\ \-importcert +keytool -alias ca1 -certreq | + keytool -alias ca -gencert -ext san=dns:ca1 | + keytool -alias ca1 -importcert -keytool\ \-alias\ ca2\ \-certreq\ | -\ \ \ \ keytool\ \-alias\ ca1\ \-gencert\ \-ext\ san=dns:ca2\ | -\ \ \ \ keytool\ \-alias\ ca2\ \-importcert +keytool -alias ca2 -certreq | + keytool -alias ca1 -gencert -ext san=dns:ca2 | + keytool -alias ca2 -importcert \f[R] .fi .PP -The following command creates the certificate \f[CB]e1\f[R] and stores it -in the \f[CB]e1.cert\f[R] file, which is signed by \f[CB]ca2\f[R]. -As a result, \f[CB]e1\f[R] should contain \f[CB]ca\f[R], \f[CB]ca1\f[R], and -\f[CB]ca2\f[R] in its certificate chain: +The following command creates the certificate \f[V]e1\f[R] and stores it +in the \f[V]e1.cert\f[R] file, which is signed by \f[V]ca2\f[R]. +As a result, \f[V]e1\f[R] should contain \f[V]ca\f[R], \f[V]ca1\f[R], +and \f[V]ca2\f[R] in its certificate chain: .RS .PP -\f[CB]keytool\ \-alias\ e1\ \-certreq\ |\ keytool\ \-alias\ ca2\ \-gencert\ >\ e1.cert\f[R] +\f[V]keytool -alias e1 -certreq | keytool -alias ca2 -gencert > e1.cert\f[R] .RE .RE .TP -.B \f[CB]\-genkeypair\f[R] -The following are the available options for the \f[CB]\-genkeypair\f[R] +\f[V]-genkeypair\f[R] +The following are the available options for the \f[V]-genkeypair\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -\f[CB]\-keyalg\f[R] \f[I]alg\f[R]: Key algorithm name +\f[V]-keyalg\f[R] \f[I]alg\f[R]: Key algorithm name .IP \[bu] 2 -{\f[CB]\-keysize\f[R] \f[I]size\f[R]}: Key bit size +{\f[V]-keysize\f[R] \f[I]size\f[R]}: Key bit size .IP \[bu] 2 -{\f[CB]\-groupname\f[R] \f[I]name\f[R]}: Group name. +{\f[V]-groupname\f[R] \f[I]name\f[R]}: Group name. For example, an Elliptic Curve name. .IP \[bu] 2 -{\f[CB]\-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name +{\f[V]-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name .IP \[bu] 2 -{\f[CB]\-signer\f[R] \f[I]alias\f[R]}: Signer alias +{\f[V]-signer\f[R] \f[I]alias\f[R]}: Signer alias .IP \[bu] 2 -[\f[CB]\-signerkeypass\f[R] \f[I]arg\f[R]]: Signer key password +[\f[V]-signerkeypass\f[R] \f[I]arg\f[R]]: Signer key password .IP \[bu] 2 -[\f[CB]\-dname\f[R] \f[I]name\f[R]]: Distinguished name +[\f[V]-dname\f[R] \f[I]name\f[R]]: Distinguished name .IP \[bu] 2 -{\f[CB]\-startdate\f[R] \f[I]date\f[R]}: Certificate validity start date +{\f[V]-startdate\f[R] \f[I]date\f[R]}: Certificate validity start date and time .IP \[bu] 2 -{\f[CB]\-ext\f[R] \f[I]value\f[R]}*: X.509 extension +{\f[V]-ext\f[R] \f[I]value\f[R]}*: X.509 extension .IP \[bu] 2 -{\f[CB]\-validity\f[R] \f[I]days\f[R]}: Validity number of days +{\f[V]-validity\f[R] \f[I]days\f[R]}: Validity number of days .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]] }: Add security provider by fully qualified class name with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-genkeypair\f[R] command to generate a key pair (a public +Use the \f[V]-genkeypair\f[R] command to generate a key pair (a public key and associated private key). -When the \f[CB]\-signer\f[R] option is not specified, the public key is -wrapped in an X.509 v3 self\-signed certificate and stored as a -single\-element certificate chain. -When the \f[CB]\-signer\f[R] option is specified, a new certificate is +When the \f[V]-signer\f[R] option is not specified, the public key is +wrapped in an X.509 v3 self-signed certificate and stored as a +single-element certificate chain. +When the \f[V]-signer\f[R] option is specified, a new certificate is generated and signed by the designated signer and stored as a -multiple\-element certificate chain (containing the generated -certificate itself, and the signer?s certificate chain). +multiple-element certificate chain (containing the generated certificate +itself, and the signer?s certificate chain). The certificate chain and private key are stored in a new keystore entry that is identified by its alias. .PP -The \f[CB]\-keyalg\f[R] value specifies the algorithm to be used to -generate the key pair, and the \f[CB]\-keysize\f[R] value specifies the +The \f[V]-keyalg\f[R] value specifies the algorithm to be used to +generate the key pair, and the \f[V]-keysize\f[R] value specifies the size of each key to be generated. -The \f[CB]\-sigalg\f[R] value specifies the algorithm that should be used +The \f[V]-sigalg\f[R] value specifies the algorithm that should be used to sign the certificate. -This algorithm must be compatible with the \f[CB]\-keyalg\f[R] value. +This algorithm must be compatible with the \f[V]-keyalg\f[R] value. .PP -The \f[CB]\-groupname\f[R] value specifies the named group (for example, +The \f[V]-groupname\f[R] value specifies the named group (for example, the standard or predefined name of an Elliptic Curve) of the key to be generated. -Only one of \f[CB]\-groupname\f[R] and \f[CB]\-keysize\f[R] can be +Only one of \f[V]-groupname\f[R] and \f[V]-keysize\f[R] can be specified. .PP -The \f[CB]\-signer\f[R] value specifies the alias of a -\f[CB]PrivateKeyEntry\f[R] for the signer that already exists in the +The \f[V]-signer\f[R] value specifies the alias of a +\f[V]PrivateKeyEntry\f[R] for the signer that already exists in the keystore. This option is used to sign the certificate with the signer?s private key. This is especially useful for key agreement algorithms (i.e. -the \f[CB]\-keyalg\f[R] value is \f[CB]XDH\f[R], \f[CB]X25519\f[R], -\f[CB]X448\f[R], or \f[CB]DH\f[R]) as these keys cannot be used for digital -signatures, and therefore a self\-signed certificate cannot be created. +the \f[V]-keyalg\f[R] value is \f[V]XDH\f[R], \f[V]X25519\f[R], +\f[V]X448\f[R], or \f[V]DH\f[R]) as these keys cannot be used for +digital signatures, and therefore a self-signed certificate cannot be +created. .PP -The \f[CB]\-signerkeypass\f[R] value specifies the password of the +The \f[V]-signerkeypass\f[R] value specifies the password of the signer?s private key. It can be specified if the private key of the signer entry is protected by a password different from the store password. .PP -The \f[CB]\-dname\f[R] value specifies the X.500 Distinguished Name to be -associated with the value of \f[CB]\-alias\f[R]. -If the \f[CB]\-signer\f[R] option is not specified, the issuer and subject -fields of the self\-signed certificate are populated with the specified +The \f[V]-dname\f[R] value specifies the X.500 Distinguished Name to be +associated with the value of \f[V]-alias\f[R]. +If the \f[V]-signer\f[R] option is not specified, the issuer and subject +fields of the self-signed certificate are populated with the specified distinguished name. -If the \f[CB]\-signer\f[R] option is specified, the subject field of the +If the \f[V]-signer\f[R] option is specified, the subject field of the certificate is populated with the specified distinguished name and the issuer field is populated with the subject field of the signer\[aq]s certificate. If a distinguished name is not provided at the command line, then the user is prompted for one. .PP -The value of \f[CB]\-keypass\f[R] is a password used to protect the +The value of \f[V]-keypass\f[R] is a password used to protect the private key of the generated key pair. If a password is not provided, then the user is prompted for it. If you press the \f[B]Return\f[R] key at the prompt, then the key password is set to the same password as the keystore password. -The \f[CB]\-keypass\f[R] value must have at least six characters. +The \f[V]-keypass\f[R] value must have at least six characters. .PP -The value of \f[CB]\-startdate\f[R] specifies the issue time of the -certificate, also known as the "Not Before" value of the X.509 +The value of \f[V]-startdate\f[R] specifies the issue time of the +certificate, also known as the \[dq]Not Before\[dq] value of the X.509 certificate\[aq]s Validity field. .PP The option value can be set in one of these two forms: .PP -([\f[CB]+\-\f[R]]\f[I]nnn\f[R][\f[CB]ymdHMS\f[R]])+ +([\f[V]+-\f[R]]\f[I]nnn\f[R][\f[V]ymdHMS\f[R]])+ .PP -[\f[I]yyyy\f[R]\f[CB]/\f[R]\f[I]mm\f[R]\f[CB]/\f[R]\f[I]dd\f[R]] -[\f[I]HH\f[R]\f[CB]:\f[R]\f[I]MM\f[R]\f[CB]:\f[R]\f[I]SS\f[R]] +[\f[I]yyyy\f[R]\f[V]/\f[R]\f[I]mm\f[R]\f[V]/\f[R]\f[I]dd\f[R]] +[\f[I]HH\f[R]\f[V]:\f[R]\f[I]MM\f[R]\f[V]:\f[R]\f[I]SS\f[R]] .PP With the first form, the issue time is shifted by the specified value from the current time. The value is a concatenation of a sequence of subvalues. Inside each subvalue, the plus sign (+) means shift forward, and the -minus sign (\-) means shift backward. +minus sign (-) means shift backward. The time to be shifted is \f[I]nnn\f[R] units of years, months, days, -hours, minutes, or seconds (denoted by a single character of \f[CB]y\f[R], -\f[CB]m\f[R], \f[CB]d\f[R], \f[CB]H\f[R], \f[CB]M\f[R], or \f[CB]S\f[R] -respectively). +hours, minutes, or seconds (denoted by a single character of +\f[V]y\f[R], \f[V]m\f[R], \f[V]d\f[R], \f[V]H\f[R], \f[V]M\f[R], or +\f[V]S\f[R] respectively). The exact value of the issue time is calculated by using the -\f[CB]java.util.GregorianCalendar.add(int\ field,\ int\ amount)\f[R] -method on each subvalue, from left to right. +\f[V]java.util.GregorianCalendar.add(int field, int amount)\f[R] method +on each subvalue, from left to right. For example, the issue time can be specified by: .IP .nf \f[CB] -Calendar\ c\ =\ new\ GregorianCalendar(); -c.add(Calendar.YEAR,\ \-1); -c.add(Calendar.MONTH,\ 1); -c.add(Calendar.DATE,\ \-1); -return\ c.getTime() +Calendar c = new GregorianCalendar(); +c.add(Calendar.YEAR, -1); +c.add(Calendar.MONTH, 1); +c.add(Calendar.DATE, -1); +return c.getTime() \f[R] .fi .PP @@ -527,284 +542,285 @@ The user must provide the exact number of digits shown in the format definition (padding with 0 when shorter). When both date and time are provided, there is one (and only one) space character between the two parts. -The hour should always be provided in 24\-hour format. +The hour should always be provided in 24-hour format. .PP When the option isn\[aq]t provided, the start date is the current time. The option can only be provided one time. .PP -The value of \f[I]date\f[R] specifies the number of days (starting at the -date specified by \f[CB]\-startdate\f[R], or the current date when -\f[CB]\-startdate\f[R] isn\[aq]t specified) for which the certificate +The value of \f[I]date\f[R] specifies the number of days (starting at +the date specified by \f[V]-startdate\f[R], or the current date when +\f[V]-startdate\f[R] isn\[aq]t specified) for which the certificate should be considered valid. .RE .TP -.B \f[CB]\-genseckey\f[R] -The following are the available options for the \f[CB]\-genseckey\f[R] +\f[V]-genseckey\f[R] +The following are the available options for the \f[V]-genseckey\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -\f[CB]\-keyalg\f[R] \f[I]alg\f[R]: Key algorithm name +\f[V]-keyalg\f[R] \f[I]alg\f[R]: Key algorithm name .IP \[bu] 2 -{\f[CB]\-keysize\f[R] \f[I]size\f[R]}: Key bit size +{\f[V]-keysize\f[R] \f[I]size\f[R]}: Key bit size .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-genseckey\f[R] command to generate a secret key and store -it in a new \f[CB]KeyStore.SecretKeyEntry\f[R] identified by -\f[CB]alias\f[R]. +Use the \f[V]-genseckey\f[R] command to generate a secret key and store +it in a new \f[V]KeyStore.SecretKeyEntry\f[R] identified by +\f[V]alias\f[R]. .PP -The value of \f[CB]\-keyalg\f[R] specifies the algorithm to be used to -generate the secret key, and the value of \f[CB]\-keysize\f[R] specifies +The value of \f[V]-keyalg\f[R] specifies the algorithm to be used to +generate the secret key, and the value of \f[V]-keysize\f[R] specifies the size of the key that is generated. -The \f[CB]\-keypass\f[R] value is a password that protects the secret key. +The \f[V]-keypass\f[R] value is a password that protects the secret key. If a password is not provided, then the user is prompted for it. If you press the \f[B]Return\f[R] key at the prompt, then the key password is set to the same password that is used for the -\f[CB]\-keystore\f[R]. -The \f[CB]\-keypass\f[R] value must contain at least six characters. +\f[V]-keystore\f[R]. +The \f[V]-keypass\f[R] value must contain at least six characters. .RE .TP -.B \f[CB]\-importcert\f[R] -The following are the available options for the \f[CB]\-importcert\f[R] +\f[V]-importcert\f[R] +The following are the available options for the \f[V]-importcert\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-noprompt\f[R]}: Do not prompt +{\f[V]-noprompt\f[R]}: Do not prompt .IP \[bu] 2 -{\f[CB]\-trustcacerts\f[R]}: Trust certificates from cacerts +{\f[V]-trustcacerts\f[R]}: Trust certificates from cacerts .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password is provided through protected mechanism +{\f[V]-protected\f[R]}: Password is provided through protected mechanism .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -{\f[CB]\-file\f[R] \f[I]file\f[R]}: Input file name +{\f[V]-file\f[R] \f[I]file\f[R]}: Input file name .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore +{\f[V]-cacerts\f[R]}: Access the cacerts keystore .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-importcert\f[R] command to read the certificate or +Use the \f[V]-importcert\f[R] command to read the certificate or certificate chain (where the latter is supplied in a PKCS#7 formatted -reply or in a sequence of X.509 certificates) from \f[CB]\-file\f[R] -\f[I]file\f[R], and store it in the \f[CB]keystore\f[R] entry identified by -\f[CB]\-alias\f[R]. -If \f[CB]\-file\f[R] \f[I]file\f[R] is not specified, then the certificate -or certificate chain is read from \f[CB]stdin\f[R]. +reply or in a sequence of X.509 certificates) from \f[V]-file\f[R] +\f[I]file\f[R], and store it in the \f[V]keystore\f[R] entry identified +by \f[V]-alias\f[R]. +If \f[V]-file\f[R] \f[I]file\f[R] is not specified, then the certificate +or certificate chain is read from \f[V]stdin\f[R]. .PP -The \f[CB]keytool\f[R] command can import X.509 v1, v2, and v3 +The \f[V]keytool\f[R] command can import X.509 v1, v2, and v3 certificates, and PKCS#7 formatted certificate chains consisting of certificates of that type. The data to be imported must be provided either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by the Internet RFC 1421 standard. In the latter case, the encoding must be bounded at the beginning by a -string that starts with \f[CB]\-\-\-\-\-BEGIN\f[R], and bounded at the end -by a string that starts with \f[CB]\-\-\-\-\-END\f[R]. +string that starts with \f[V]-----BEGIN\f[R], and bounded at the end by +a string that starts with \f[V]-----END\f[R]. .PP You import a certificate for two reasons: To add it to the list of trusted certificates, and to import a certificate reply received from a certificate authority (CA) as the result of submitting a Certificate Signing Request (CSR) to that CA. -See the \f[CB]\-certreq\f[R] command in \f[B]Commands for Generating a +See the \f[V]-certreq\f[R] command in \f[B]Commands for Generating a Certificate Request\f[R]. .PP -The type of import is indicated by the value of the \f[CB]\-alias\f[R] +The type of import is indicated by the value of the \f[V]-alias\f[R] option. -If the alias doesn\[aq]t point to a key entry, then the \f[CB]keytool\f[R] -command assumes you are adding a trusted certificate entry. +If the alias doesn\[aq]t point to a key entry, then the +\f[V]keytool\f[R] command assumes you are adding a trusted certificate +entry. In this case, the alias shouldn\[aq]t already exist in the keystore. -If the alias does exist, then the \f[CB]keytool\f[R] command outputs an +If the alias does exist, then the \f[V]keytool\f[R] command outputs an error because a trusted certificate already exists for that alias, and doesn\[aq]t import the certificate. -If \f[CB]\-alias\f[R] points to a key entry, then the \f[CB]keytool\f[R] +If \f[V]-alias\f[R] points to a key entry, then the \f[V]keytool\f[R] command assumes that you\[aq]re importing a certificate reply. .RE .TP -.B \f[CB]\-importpass\f[R] -The following are the available options for the \f[CB]\-importpass\f[R] +\f[V]-importpass\f[R] +The following are the available options for the \f[V]-importpass\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -{\f[CB]\-keyalg\f[R] \f[I]alg\f[R]}: Key algorithm name +{\f[V]-keyalg\f[R] \f[I]alg\f[R]}: Key algorithm name .IP \[bu] 2 -{\f[CB]\-keysize\f[R] \f[I]size\f[R]}: Key bit size +{\f[V]-keysize\f[R] \f[I]size\f[R]}: Key bit size .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-importpass\f[R] command to imports a passphrase and store -it in a new \f[CB]KeyStore.SecretKeyEntry\f[R] identified by -\f[CB]\-alias\f[R]. +Use the \f[V]-importpass\f[R] command to imports a passphrase and store +it in a new \f[V]KeyStore.SecretKeyEntry\f[R] identified by +\f[V]-alias\f[R]. The passphrase may be supplied via the standard input stream; otherwise the user is prompted for it. -The \f[CB]\-keypass\f[R] option provides a password to protect the +The \f[V]-keypass\f[R] option provides a password to protect the imported passphrase. If a password is not provided, then the user is prompted for it. If you press the \f[B]Return\f[R] key at the prompt, then the key password is set to the same password as that used for the -\f[CB]keystore\f[R]. -The \f[CB]\-keypass\f[R] value must contain at least six characters. +\f[V]keystore\f[R]. +The \f[V]-keypass\f[R] value must contain at least six characters. .RE .SH COMMANDS FOR IMPORTING CONTENTS FROM ANOTHER KEYSTORE .TP -.B \f[CB]\-importkeystore\f[R] +\f[V]-importkeystore\f[R] The following are the available options for the -\f[CB]\-importkeystore\f[R] command: +\f[V]-importkeystore\f[R] command: .RS .IP \[bu] 2 -\f[CB]\-srckeystore\f[R] \f[I]keystore\f[R]: Source keystore name +\f[V]-srckeystore\f[R] \f[I]keystore\f[R]: Source keystore name .IP \[bu] 2 -{\f[CB]\-destkeystore\f[R] \f[I]keystore\f[R]}: Destination keystore name +{\f[V]-destkeystore\f[R] \f[I]keystore\f[R]}: Destination keystore name .IP \[bu] 2 -{\f[CB]\-srcstoretype\f[R] \f[I]type\f[R]}: Source keystore type +{\f[V]-srcstoretype\f[R] \f[I]type\f[R]}: Source keystore type .IP \[bu] 2 -{\f[CB]\-deststoretype\f[R] \f[I]type\f[R]}: Destination keystore type +{\f[V]-deststoretype\f[R] \f[I]type\f[R]}: Destination keystore type .IP \[bu] 2 -[\f[CB]\-srcstorepass\f[R] \f[I]arg\f[R]]: Source keystore password +[\f[V]-srcstorepass\f[R] \f[I]arg\f[R]]: Source keystore password .IP \[bu] 2 -[\f[CB]\-deststorepass\f[R] \f[I]arg\f[R]]: Destination keystore password +[\f[V]-deststorepass\f[R] \f[I]arg\f[R]]: Destination keystore password .IP \[bu] 2 -{\f[CB]\-srcprotected\f[R]}: Source keystore password protected +{\f[V]-srcprotected\f[R]}: Source keystore password protected .IP \[bu] 2 -{\f[CB]\-destprotected\f[R]}: Destination keystore password protected +{\f[V]-destprotected\f[R]}: Destination keystore password protected .IP \[bu] 2 -{\f[CB]\-srcprovidername\f[R] \f[I]name\f[R]}: Source keystore provider +{\f[V]-srcprovidername\f[R] \f[I]name\f[R]}: Source keystore provider name .IP \[bu] 2 -{\f[CB]\-destprovidername\f[R] \f[I]name\f[R]}: Destination keystore +{\f[V]-destprovidername\f[R] \f[I]name\f[R]}: Destination keystore provider name .IP \[bu] 2 -{\f[CB]\-srcalias\f[R] \f[I]alias\f[R]}: Source alias +{\f[V]-srcalias\f[R] \f[I]alias\f[R]}: Source alias .IP \[bu] 2 -{\f[CB]\-destalias\f[R] \f[I]alias\f[R]}: Destination alias +{\f[V]-destalias\f[R] \f[I]alias\f[R]}: Destination alias .IP \[bu] 2 -[\f[CB]\-srckeypass\f[R] \f[I]arg\f[R]]: Source key password +[\f[V]-srckeypass\f[R] \f[I]arg\f[R]]: Source key password .IP \[bu] 2 -[\f[CB]\-destkeypass\f[R] \f[I]arg\f[R]]: Destination key password +[\f[V]-destkeypass\f[R] \f[I]arg\f[R]]: Destination key password .IP \[bu] 2 -{\f[CB]\-noprompt\f[R]}: Do not prompt +{\f[V]-noprompt\f[R]}: Do not prompt .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]: Add security provider by name (such as SunPKCS11) with an -optional configure argument. +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]: Add security provider by name (such as SunPKCS11) with +an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP \f[B]Note:\f[R] .PP This is the first line of all options: .RS .PP -\f[CB]\-srckeystore\f[R] \f[I]keystore\f[R] \f[CB]\-destkeystore\f[R] +\f[V]-srckeystore\f[R] \f[I]keystore\f[R] \f[V]-destkeystore\f[R] \f[I]keystore\f[R] .RE .PP -Use the \f[CB]\-importkeystore\f[R] command to import a single entry or +Use the \f[V]-importkeystore\f[R] command to import a single entry or all entries from a source keystore to a destination keystore. .PP \f[B]Note:\f[R] .PP -If you do not specify \f[CB]\-destkeystore\f[R] when using the -\f[CB]keytool\ \-importkeystore\f[R] command, then the default keystore -used is \f[CB]$HOME/.keystore\f[R]. +If you do not specify \f[V]-destkeystore\f[R] when using the +\f[V]keytool -importkeystore\f[R] command, then the default keystore +used is \f[V]$HOME/.keystore\f[R]. .PP -When the \f[CB]\-srcalias\f[R] option is provided, the command imports the +When the \f[V]-srcalias\f[R] option is provided, the command imports the single entry identified by the alias to the destination keystore. -If a destination alias isn\[aq]t provided with \f[CB]\-destalias\f[R], -then \f[CB]\-srcalias\f[R] is used as the destination alias. +If a destination alias isn\[aq]t provided with \f[V]-destalias\f[R], +then \f[V]-srcalias\f[R] is used as the destination alias. If the source entry is protected by a password, then -\f[CB]\-srckeypass\f[R] is used to recover the entry. -If \f[CB]\-srckeypass\f[R] isn\[aq]t provided, then the \f[CB]keytool\f[R] -command attempts to use \f[CB]\-srcstorepass\f[R] to recover the entry. -If \f[CB]\-srcstorepass\f[R] is not provided or is incorrect, then the +\f[V]-srckeypass\f[R] is used to recover the entry. +If \f[V]-srckeypass\f[R] isn\[aq]t provided, then the \f[V]keytool\f[R] +command attempts to use \f[V]-srcstorepass\f[R] to recover the entry. +If \f[V]-srcstorepass\f[R] is not provided or is incorrect, then the user is prompted for a password. -The destination entry is protected with \f[CB]\-destkeypass\f[R]. -If \f[CB]\-destkeypass\f[R] isn\[aq]t provided, then the destination entry +The destination entry is protected with \f[V]-destkeypass\f[R]. +If \f[V]-destkeypass\f[R] isn\[aq]t provided, then the destination entry is protected with the source entry password. -For example, most third\-party tools require \f[CB]storepass\f[R] and -\f[CB]keypass\f[R] in a PKCS #12 keystore to be the same. +For example, most third-party tools require \f[V]storepass\f[R] and +\f[V]keypass\f[R] in a PKCS #12 keystore to be the same. To create a PKCS#12 keystore for these tools, always specify a -\f[CB]\-destkeypass\f[R] that is the same as \f[CB]\-deststorepass\f[R]. +\f[V]-destkeypass\f[R] that is the same as \f[V]-deststorepass\f[R]. .PP -If the \f[CB]\-srcalias\f[R] option isn\[aq]t provided, then all entries +If the \f[V]-srcalias\f[R] option isn\[aq]t provided, then all entries in the source keystore are imported into the destination keystore. Each destination entry is stored under the alias from the source entry. If the source entry is protected by a password, then -\f[CB]\-srcstorepass\f[R] is used to recover the entry. -If \f[CB]\-srcstorepass\f[R] is not provided or is incorrect, then the +\f[V]-srcstorepass\f[R] is used to recover the entry. +If \f[V]-srcstorepass\f[R] is not provided or is incorrect, then the user is prompted for a password. If a source keystore entry type isn\[aq]t supported in the destination keystore, or if an error occurs while storing an entry into the @@ -816,7 +832,7 @@ If the destination alias already exists in the destination keystore, then the user is prompted either to overwrite the entry or to create a new entry under a different alias name. .PP -If the \f[CB]\-noprompt\f[R] option is provided, then the user isn\[aq]t +If the \f[V]-noprompt\f[R] option is provided, then the user isn\[aq]t prompted for a new destination alias. Existing entries are overwritten with the destination alias name. Entries that can\[aq]t be imported are skipped and a warning is @@ -824,248 +840,247 @@ displayed. .RE .SH COMMANDS FOR GENERATING A CERTIFICATE REQUEST .TP -.B \f[CB]\-certreq\f[R] -The following are the available options for the \f[CB]\-certreq\f[R] +\f[V]-certreq\f[R] +The following are the available options for the \f[V]-certreq\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -{\f[CB]\-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name +{\f[V]-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name .IP \[bu] 2 -{\f[CB]\-file\f[R] \f[I]file\f[R]}: Output file name +{\f[V]-file\f[R] \f[I]file\f[R]}: Output file name .IP \[bu] 2 -[ \f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[ \f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-dname\f[R] \f[I]name\f[R]}: Distinguished name +{\f[V]-dname\f[R] \f[I]name\f[R]}: Distinguished name .IP \[bu] 2 -{\f[CB]\-ext\f[R] \f[I]value\f[R]}: X.509 extension +{\f[V]-ext\f[R] \f[I]value\f[R]}: X.509 extension .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-certreq\f[R] command to generate a Certificate Signing +Use the \f[V]-certreq\f[R] command to generate a Certificate Signing Request (CSR) using the PKCS #10 format. .PP A CSR is intended to be sent to a CA. The CA authenticates the certificate requestor (usually offline) and returns a certificate or certificate chain to replace the existing -certificate chain (initially a self\-signed certificate) in the -keystore. +certificate chain (initially a self-signed certificate) in the keystore. .PP The private key associated with \f[I]alias\f[R] is used to create the PKCS #10 certificate request. To access the private key, the correct password must be provided. -If \f[CB]\-keypass\f[R] isn\[aq]t provided at the command line and is +If \f[V]-keypass\f[R] isn\[aq]t provided at the command line and is different from the password used to protect the integrity of the keystore, then the user is prompted for it. -If \f[CB]\-dname\f[R] is provided, then it is used as the subject in the +If \f[V]-dname\f[R] is provided, then it is used as the subject in the CSR. Otherwise, the X.500 Distinguished Name associated with alias is used. .PP -The \f[CB]\-sigalg\f[R] value specifies the algorithm that should be used +The \f[V]-sigalg\f[R] value specifies the algorithm that should be used to sign the CSR. .PP -The CSR is stored in the \f[CB]\-file\f[R] \f[I]file\f[R]. -If a file is not specified, then the CSR is output to \f[CB]\-stdout\f[R]. +The CSR is stored in the \f[V]-file\f[R] \f[I]file\f[R]. +If a file is not specified, then the CSR is output to \f[V]-stdout\f[R]. .PP -Use the \f[CB]\-importcert\f[R] command to import the response from the +Use the \f[V]-importcert\f[R] command to import the response from the CA. .RE .SH COMMANDS FOR EXPORTING DATA .TP -.B \f[CB]\-exportcert\f[R] -The following are the available options for the \f[CB]\-exportcert\f[R] +\f[V]-exportcert\f[R] +The following are the available options for the \f[V]-exportcert\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-rfc\f[R]}: Output in RFC style +{\f[V]-rfc\f[R]}: Output in RFC style .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -{\f[CB]\-file\f[R] \f[I]file\f[R]}: Output file name +{\f[V]-file\f[R] \f[I]file\f[R]}: Output file name .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore +{\f[V]-cacerts\f[R]}: Access the cacerts keystore .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]] }: Add security provider by fully qualified class name with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-exportcert\f[R] command to read a certificate from the -keystore that is associated with \f[CB]\-alias\f[R] \f[I]alias\f[R] and -store it in the \f[CB]\-file\f[R] \f[I]file\f[R]. +Use the \f[V]-exportcert\f[R] command to read a certificate from the +keystore that is associated with \f[V]-alias\f[R] \f[I]alias\f[R] and +store it in the \f[V]-file\f[R] \f[I]file\f[R]. When a file is not specified, the certificate is output to -\f[CB]stdout\f[R]. +\f[V]stdout\f[R]. .PP By default, the certificate is output in binary encoding. -If the \f[CB]\-rfc\f[R] option is specified, then the output in the +If the \f[V]-rfc\f[R] option is specified, then the output in the printable encoding format defined by the Internet RFC 1421 Certificate Encoding Standard. .PP -If \f[CB]\-alias\f[R] refers to a trusted certificate, then that +If \f[V]-alias\f[R] refers to a trusted certificate, then that certificate is output. -Otherwise, \f[CB]\-alias\f[R] refers to a key entry with an associated +Otherwise, \f[V]-alias\f[R] refers to a key entry with an associated certificate chain. In that case, the first certificate in the chain is returned. This certificate authenticates the public key of the entity addressed by -\f[CB]\-alias\f[R]. +\f[V]-alias\f[R]. .RE .SH COMMANDS FOR DISPLAYING DATA .TP -.B \f[CB]\-list\f[R] -The following are the available options for the \f[CB]\-list\f[R] command: +\f[V]-list\f[R] +The following are the available options for the \f[V]-list\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-rfc\f[R]}: Output in RFC style +{\f[V]-rfc\f[R]}: Output in RFC style .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore +{\f[V]-cacerts\f[R]}: Access the cacerts keystore .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]] }: Add security provider by fully qualified class name with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-list\f[R] command to print the contents of the keystore -entry identified by \f[CB]\-alias\f[R] to \f[CB]stdout\f[R]. -If \f[CB]\-alias\f[R] \f[I]alias\f[R] is not specified, then the contents +Use the \f[V]-list\f[R] command to print the contents of the keystore +entry identified by \f[V]-alias\f[R] to \f[V]stdout\f[R]. +If \f[V]-alias\f[R] \f[I]alias\f[R] is not specified, then the contents of the entire keystore are printed. .PP -By default, this command prints the SHA\-256 fingerprint of a +By default, this command prints the SHA-256 fingerprint of a certificate. -If the \f[CB]\-v\f[R] option is specified, then the certificate is printed -in human\-readable format, with additional information such as the -owner, issuer, serial number, and any extensions. -If the \f[CB]\-rfc\f[R] option is specified, then the certificate contents +If the \f[V]-v\f[R] option is specified, then the certificate is printed +in human-readable format, with additional information such as the owner, +issuer, serial number, and any extensions. +If the \f[V]-rfc\f[R] option is specified, then the certificate contents are printed by using the printable encoding format, as defined by the Internet RFC 1421 Certificate Encoding Standard. .PP \f[B]Note:\f[R] .PP -You can\[aq]t specify both \f[CB]\-v\f[R] and \f[CB]\-rfc\f[R] in the same +You can\[aq]t specify both \f[V]-v\f[R] and \f[V]-rfc\f[R] in the same command. Otherwise, an error is reported. .RE .TP -.B \f[CB]\-printcert\f[R] -The following are the available options for the \f[CB]\-printcert\f[R] +\f[V]-printcert\f[R] +The following are the available options for the \f[V]-printcert\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-rfc\f[R]}: Output in RFC style +{\f[V]-rfc\f[R]}: Output in RFC style .IP \[bu] 2 -{\f[CB]\-file\f[R] \f[I]cert_file\f[R]}: Input file name +{\f[V]-file\f[R] \f[I]cert_file\f[R]}: Input file name .IP \[bu] 2 -{\f[CB]\-sslserver\f[R] \f[I]server\f[R][\f[CB]:\f[R]\f[I]port\f[R]]}:: Secure -Sockets Layer (SSL) server host and port +{\f[V]-sslserver\f[R] \f[I]server\f[R][\f[V]:\f[R]\f[I]port\f[R]]}:: +Secure Sockets Layer (SSL) server host and port .IP \[bu] 2 -{\f[CB]\-jarfile\f[R] \f[I]JAR_file\f[R]}: Signed \f[CB]\&.jar\f[R] file +{\f[V]-jarfile\f[R] \f[I]JAR_file\f[R]}: Signed \f[V].jar\f[R] file .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-trustcacerts\f[R]}: Trust certificates from cacerts +{\f[V]-trustcacerts\f[R]}: Trust certificates from cacerts .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password is provided through protected mechanism +{\f[V]-protected\f[R]}: Password is provided through protected mechanism .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-printcert\f[R] command to read and print the certificate -from \f[CB]\-file\f[R] \f[I]cert_file\f[R], the SSL server located at -\f[CB]\-sslserver\f[R] \f[I]server\f[R][\f[CB]:\f[R]\f[I]port\f[R]], or the -signed JAR file specified by \f[CB]\-jarfile\f[R] \f[I]JAR_file\f[R]. -It prints its contents in a human\-readable format. +Use the \f[V]-printcert\f[R] command to read and print the certificate +from \f[V]-file\f[R] \f[I]cert_file\f[R], the SSL server located at +\f[V]-sslserver\f[R] \f[I]server\f[R][\f[V]:\f[R]\f[I]port\f[R]], or the +signed JAR file specified by \f[V]-jarfile\f[R] \f[I]JAR_file\f[R]. +It prints its contents in a human-readable format. When a port is not specified, the standard HTTPS port 443 is assumed. .PP \f[B]Note:\f[R] .PP -The \f[CB]\-sslserver\f[R] and \f[CB]\-file\f[R] options can\[aq]t be +The \f[V]-sslserver\f[R] and \f[V]-file\f[R] options can\[aq]t be provided in the same command. Otherwise, an error is reported. If you don\[aq]t specify either option, then the certificate is read -from \f[CB]stdin\f[R]. +from \f[V]stdin\f[R]. .PP -When\f[CB]\-rfc\f[R] is specified, the \f[CB]keytool\f[R] command prints the -certificate in PEM mode as defined by the Internet RFC 1421 Certificate -Encoding standard. +When\f[V]-rfc\f[R] is specified, the \f[V]keytool\f[R] command prints +the certificate in PEM mode as defined by the Internet RFC 1421 +Certificate Encoding standard. .PP -If the certificate is read from a file or \f[CB]stdin\f[R], then it might +If the certificate is read from a file or \f[V]stdin\f[R], then it might be either binary encoded or in printable encoding format, as defined by the RFC 1421 Certificate Encoding standard. .PP If the SSL server is behind a firewall, then the -\f[CB]\-J\-Dhttps.proxyHost=proxyhost\f[R] and -\f[CB]\-J\-Dhttps.proxyPort=proxyport\f[R] options can be specified on the +\f[V]-J-Dhttps.proxyHost=proxyhost\f[R] and +\f[V]-J-Dhttps.proxyPort=proxyport\f[R] options can be specified on the command line for proxy tunneling. .PP \f[B]Note:\f[R] @@ -1073,359 +1088,356 @@ command line for proxy tunneling. This command can be used independently of a keystore. This command does not check for the weakness of a certificate\[aq]s signature algorithm if it is a trusted certificate in the user keystore -(specified by \f[CB]\-keystore\f[R]) or in the \f[CB]cacerts\f[R] keystore -(if \f[CB]\-trustcacerts\f[R] is specified). +(specified by \f[V]-keystore\f[R]) or in the \f[V]cacerts\f[R] keystore +(if \f[V]-trustcacerts\f[R] is specified). .RE .TP -.B \f[CB]\-printcertreq\f[R] -The following are the available options for the \f[CB]\-printcertreq\f[R] +\f[V]-printcertreq\f[R] +The following are the available options for the \f[V]-printcertreq\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-file\f[R] \f[I]file\f[R]}: Input file name +{\f[V]-file\f[R] \f[I]file\f[R]}: Input file name .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-printcertreq\f[R] command to print the contents of a PKCS +Use the \f[V]-printcertreq\f[R] command to print the contents of a PKCS #10 format certificate request, which can be generated by the -\f[CB]keytool\ \-certreq\f[R] command. +\f[V]keytool -certreq\f[R] command. The command reads the request from file. If there is no file, then the request is read from the standard input. .RE .TP -.B \f[CB]\-printcrl\f[R] -The following are the available options for the \f[CB]\-printcrl\f[R] +\f[V]-printcrl\f[R] +The following are the available options for the \f[V]-printcrl\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-file\ crl\f[R]}: Input file name +{\f[V]-file crl\f[R]}: Input file name .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-trustcacerts\f[R]}: Trust certificates from cacerts +{\f[V]-trustcacerts\f[R]}: Trust certificates from cacerts .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password is provided through protected mechanism +{\f[V]-protected\f[R]}: Password is provided through protected mechanism .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-printcrl\f[R] command to read the Certificate Revocation -List (CRL) from \f[CB]\-file\ crl\f[R] . +Use the \f[V]-printcrl\f[R] command to read the Certificate Revocation +List (CRL) from \f[V]-file crl\f[R] . A CRL is a list of the digital certificates that were revoked by the CA that issued them. -The CA generates the \f[CB]crl\f[R] file. +The CA generates the \f[V]crl\f[R] file. .PP \f[B]Note:\f[R] .PP This command can be used independently of a keystore. This command attempts to verify the CRL using a certificate from the -user keystore (specified by \f[CB]\-keystore\f[R]) or the \f[CB]cacerts\f[R] -keystore (if \f[CB]\-trustcacerts\f[R] is specified), and will print out a -warning if it cannot be verified. +user keystore (specified by \f[V]-keystore\f[R]) or the +\f[V]cacerts\f[R] keystore (if \f[V]-trustcacerts\f[R] is specified), +and will print out a warning if it cannot be verified. .RE .SH COMMANDS FOR MANAGING THE KEYSTORE .TP -.B \f[CB]\-storepasswd\f[R] -The following are the available options for the \f[CB]\-storepasswd\f[R] +\f[V]-storepasswd\f[R] +The following are the available options for the \f[V]-storepasswd\f[R] command: .RS .IP \[bu] 2 -[\f[CB]\-new\f[R] \f[I]arg\f[R]]: New password +[\f[V]-new\f[R] \f[I]arg\f[R]]: New password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore +{\f[V]-cacerts\f[R]}: Access the cacerts keystore .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-storepasswd\f[R] command to change the password used to +Use the \f[V]-storepasswd\f[R] command to change the password used to protect the integrity of the keystore contents. -The new password is set by \f[CB]\-new\f[R] \f[I]arg\f[R] and must contain +The new password is set by \f[V]-new\f[R] \f[I]arg\f[R] and must contain at least six characters. .RE .TP -.B \f[CB]\-keypasswd\f[R] -The following are the available options for the \f[CB]\-keypasswd\f[R] +\f[V]-keypasswd\f[R] +The following are the available options for the \f[V]-keypasswd\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]old_keypass\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]old_keypass\f[R]]: Key password .IP \[bu] 2 -[\f[CB]\-new\f[R] \f[I]new_keypass\f[R]]: New password +[\f[V]-new\f[R] \f[I]new_keypass\f[R]]: New password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-storepass\f[R] \f[I]arg\f[R]}: Keystore password +{\f[V]-storepass\f[R] \f[I]arg\f[R]}: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-keypasswd\f[R] command to change the password (under which -private/secret keys identified by \f[CB]\-alias\f[R] are protected) from -\f[CB]\-keypass\f[R] \f[I]old_keypass\f[R] to \f[CB]\-new\f[R] +Use the \f[V]-keypasswd\f[R] command to change the password (under which +private/secret keys identified by \f[V]-alias\f[R] are protected) from +\f[V]-keypass\f[R] \f[I]old_keypass\f[R] to \f[V]-new\f[R] \f[I]new_keypass\f[R]. The password value must contain at least six characters. .PP -If the \f[CB]\-keypass\f[R] option isn\[aq]t provided at the command line -and the \f[CB]\-keypass\f[R] password is different from the keystore -password (\f[CB]\-storepass\f[R] \f[I]arg\f[R]), then the user is prompted +If the \f[V]-keypass\f[R] option isn\[aq]t provided at the command line +and the \f[V]-keypass\f[R] password is different from the keystore +password (\f[V]-storepass\f[R] \f[I]arg\f[R]), then the user is prompted for it. .PP -If the \f[CB]\-new\f[R] option isn\[aq]t provided at the command line, +If the \f[V]-new\f[R] option isn\[aq]t provided at the command line, then the user is prompted for it. .RE .TP -.B \f[CB]\-delete\f[R] -The following are the available options for the \f[CB]\-delete\f[R] +\f[V]-delete\f[R] +The following are the available options for the \f[V]-delete\f[R] command: .RS .IP \[bu] 2 -[\f[CB]\-alias\f[R] \f[I]alias\f[R]]: Alias name of the entry to process +[\f[V]-alias\f[R] \f[I]alias\f[R]]: Alias name of the entry to process .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore +{\f[V]-cacerts\f[R]}: Access the cacerts keystore .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-delete\f[R] command to delete the \f[CB]\-alias\f[R] +Use the \f[V]-delete\f[R] command to delete the \f[V]-alias\f[R] \f[I]alias\f[R] entry from the keystore. When not provided at the command line, the user is prompted for the -\f[CB]alias\f[R]. +\f[V]alias\f[R]. .RE .TP -.B \f[CB]\-changealias\f[R] -The following are the available options for the \f[CB]\-changealias\f[R] +\f[V]-changealias\f[R] +The following are the available options for the \f[V]-changealias\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +{\f[V]-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process .IP \[bu] 2 -[\f[CB]\-destalias\f[R] \f[I]alias\f[R]]: Destination alias +[\f[V]-destalias\f[R] \f[I]alias\f[R]]: Destination alias .IP \[bu] 2 -[\f[CB]\-keypass\f[R] \f[I]arg\f[R]]: Key password +[\f[V]-keypass\f[R] \f[I]arg\f[R]]: Key password .IP \[bu] 2 -{\f[CB]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +{\f[V]-keystore\f[R] \f[I]keystore\f[R]}: Keystore name .IP \[bu] 2 -{\f[CB]\-cacerts\f[R]}: Access the cacerts keystore +{\f[V]-cacerts\f[R]}: Access the cacerts keystore .IP \[bu] 2 -[\f[CB]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +[\f[V]-storepass\f[R] \f[I]arg\f[R]]: Keystore password .IP \[bu] 2 -{\f[CB]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +{\f[V]-storetype\f[R] \f[I]type\f[R]}: Keystore type .IP \[bu] 2 -{\f[CB]\-providername\f[R] \f[I]name\f[R]}: Provider name +{\f[V]-providername\f[R] \f[I]name\f[R]}: Provider name .IP \[bu] 2 -{\f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerarg\f[R] +{\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerarg\f[R] \f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerclass\f[R] \f[I]class\f[R] [\f[CB]\-providerarg\f[R] -\f[I]arg\f[R]]}: Add security provider by fully qualified class name with -an optional configure argument. +{\f[V]-providerclass\f[R] \f[I]class\f[R] [\f[V]-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. .IP \[bu] 2 -{\f[CB]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +{\f[V]-providerpath\f[R] \f[I]list\f[R]}: Provider classpath .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .IP \[bu] 2 -{\f[CB]\-protected\f[R]}: Password provided through a protected mechanism +{\f[V]-protected\f[R]}: Password provided through a protected mechanism .PP -Use the \f[CB]\-changealias\f[R] command to move an existing keystore -entry from \f[CB]\-alias\f[R] \f[I]alias\f[R] to a new \f[CB]\-destalias\f[R] -\f[I]alias\f[R]. +Use the \f[V]-changealias\f[R] command to move an existing keystore +entry from \f[V]-alias\f[R] \f[I]alias\f[R] to a new +\f[V]-destalias\f[R] \f[I]alias\f[R]. If a destination alias is not provided, then the command prompts you for one. If the original entry is protected with an entry password, then the -password can be supplied with the \f[CB]\-keypass\f[R] option. -If a key password is not provided, then the \f[CB]\-storepass\f[R] (if +password can be supplied with the \f[V]-keypass\f[R] option. +If a key password is not provided, then the \f[V]-storepass\f[R] (if provided) is attempted first. If the attempt fails, then the user is prompted for a password. .RE -.SH COMMANDS FOR DISPLAYING SECURITY\-RELATED INFORMATION +.SH COMMANDS FOR DISPLAYING SECURITY-RELATED INFORMATION .TP -.B \f[CB]\-showinfo\f[R] -The following are the available options for the \f[CB]\-showinfo\f[R] +\f[V]-showinfo\f[R] +The following are the available options for the \f[V]-showinfo\f[R] command: .RS .IP \[bu] 2 -{\f[CB]\-tls\f[R]}: Displays TLS configuration information +{\f[V]-tls\f[R]}: Displays TLS configuration information .IP \[bu] 2 -{\f[CB]\-v\f[R]}: Verbose output +{\f[V]-v\f[R]}: Verbose output .PP -Use the \f[CB]\-showinfo\f[R] command to display various security\-related +Use the \f[V]-showinfo\f[R] command to display various security-related information. -The \f[CB]\-tls\f[R] option displays TLS configurations, such as the list +The \f[V]-tls\f[R] option displays TLS configurations, such as the list of enabled protocols and cipher suites. .RE .SH COMMANDS FOR DISPLAYING PROGRAM VERSION .PP -You can use \f[CB]\-version\f[R] to print the program version of -\f[CB]keytool\f[R]. +You can use \f[V]-version\f[R] to print the program version of +\f[V]keytool\f[R]. .SH COMMANDS FOR DISPLAYING HELP INFORMATION .PP -You can use \f[CB]\-\-help\f[R] to display a list of \f[CB]keytool\f[R] +You can use \f[V]--help\f[R] to display a list of \f[V]keytool\f[R] commands or to display help information about a specific -\f[CB]keytool\f[R] command. +\f[V]keytool\f[R] command. .IP \[bu] 2 -To display a list of \f[CB]keytool\f[R] commands, enter: +To display a list of \f[V]keytool\f[R] commands, enter: .RS 2 .RS .PP -\f[CB]keytool\ \-\-help\f[R] +\f[V]keytool --help\f[R] .RE .RE .IP \[bu] 2 -To display help information about a specific \f[CB]keytool\f[R] command, +To display help information about a specific \f[V]keytool\f[R] command, enter: .RS 2 .RS .PP -\f[CB]keytool\ \-\ \-\-help\f[R] +\f[V]keytool - --help\f[R] .RE .RE .SH COMMON COMMAND OPTIONS .PP -The \f[CB]\-v\f[R] option can appear for all commands except -\f[CB]\-\-help\f[R]. -When the \f[CB]\-v\f[R] option appears, it signifies verbose mode, which +The \f[V]-v\f[R] option can appear for all commands except +\f[V]--help\f[R]. +When the \f[V]-v\f[R] option appears, it signifies verbose mode, which means that more information is provided in the output. .PP -The \f[CB]\-J\f[R]\f[I]option\f[R] argument can appear for any command. -When the \f[CB]\-J\f[R]\f[I]option\f[R] is used, the specified +The \f[V]-J\f[R]\f[I]option\f[R] argument can appear for any command. +When the \f[V]-J\f[R]\f[I]option\f[R] is used, the specified \f[I]option\f[R] string is passed directly to the Java interpreter. This option doesn\[aq]t contain any spaces. It\[aq]s useful for adjusting the execution environment or memory usage. -For a list of possible interpreter options, enter \f[CB]java\ \-h\f[R] or -\f[CB]java\ \-X\f[R] at the command line. +For a list of possible interpreter options, enter \f[V]java -h\f[R] or +\f[V]java -X\f[R] at the command line. .PP These options can appear for all commands operating on a keystore: .TP -.B \f[CB]\-storetype\f[R] \f[I]storetype\f[R] +\f[V]-storetype\f[R] \f[I]storetype\f[R] This qualifier specifies the type of keystore to be instantiated. -.RS -.RE .TP -.B \f[CB]\-keystore\f[R] \f[I]keystore\f[R] +\f[V]-keystore\f[R] \f[I]keystore\f[R] The keystore location. .RS .PP -If the JKS \f[CB]storetype\f[R] is used and a keystore file doesn\[aq]t -yet exist, then certain \f[CB]keytool\f[R] commands can result in a new +If the JKS \f[V]storetype\f[R] is used and a keystore file doesn\[aq]t +yet exist, then certain \f[V]keytool\f[R] commands can result in a new keystore file being created. -For example, if \f[CB]keytool\ \-genkeypair\f[R] is called and the -\f[CB]\-keystore\f[R] option isn\[aq]t specified, the default keystore -file named \f[CB]\&.keystore\f[R] is created in the user\[aq]s home +For example, if \f[V]keytool -genkeypair\f[R] is called and the +\f[V]-keystore\f[R] option isn\[aq]t specified, the default keystore +file named \f[V].keystore\f[R] is created in the user\[aq]s home directory if it doesn\[aq]t already exist. -Similarly, if the \f[CB]\-keystore\ ks_file\f[R] option is specified but -\f[CB]ks_file\f[R] doesn\[aq]t exist, then it is created. -For more information on the JKS \f[CB]storetype\f[R], see the +Similarly, if the \f[V]-keystore ks_file\f[R] option is specified but +\f[V]ks_file\f[R] doesn\[aq]t exist, then it is created. +For more information on the JKS \f[V]storetype\f[R], see the \f[B]KeyStore Implementation\f[R] section in \f[B]KeyStore aliases\f[R]. .PP -Note that the input stream from the \f[CB]\-keystore\f[R] option is passed -to the \f[CB]KeyStore.load\f[R] method. -If \f[CB]NONE\f[R] is specified as the URL, then a null stream is passed -to the \f[CB]KeyStore.load\f[R] method. -\f[CB]NONE\f[R] should be specified if the keystore isn\[aq]t file\-based. +Note that the input stream from the \f[V]-keystore\f[R] option is passed +to the \f[V]KeyStore.load\f[R] method. +If \f[V]NONE\f[R] is specified as the URL, then a null stream is passed +to the \f[V]KeyStore.load\f[R] method. +\f[V]NONE\f[R] should be specified if the keystore isn\[aq]t file-based. For example, when the keystore resides on a hardware token device. .RE .TP -.B \f[CB]\-cacerts\f[R] \f[I]cacerts\f[R] +\f[V]-cacerts\f[R] \f[I]cacerts\f[R] Operates on the \f[I]cacerts\f[R] keystore . -This option is equivalent to \f[CB]\-keystore\f[R] -\f[I]path_to_cacerts\f[R] \f[CB]\-storetype\f[R] \f[I]type_of_cacerts\f[R]. -An error is reported if the \f[CB]\-keystore\f[R] or \f[CB]\-storetype\f[R] -option is used with the \f[CB]\-cacerts\f[R] option. -.RS -.RE +This option is equivalent to \f[V]-keystore\f[R] +\f[I]path_to_cacerts\f[R] \f[V]-storetype\f[R] +\f[I]type_of_cacerts\f[R]. +An error is reported if the \f[V]-keystore\f[R] or \f[V]-storetype\f[R] +option is used with the \f[V]-cacerts\f[R] option. .TP -.B \f[CB]\-storepass\f[R] [\f[CB]:env\f[R] | \f[CB]:file\f[R] ] \f[I]argument\f[R] +\f[V]-storepass\f[R] [\f[V]:env\f[R] | \f[V]:file\f[R] ] \f[I]argument\f[R] The password that is used to protect the integrity of the keystore. .RS .PP -If the modifier \f[CB]env\f[R] or \f[CB]file\f[R] isn\[aq]t specified, then -the password has the value \f[I]argument\f[R], which must contain at -least six characters. +If the modifier \f[V]env\f[R] or \f[V]file\f[R] isn\[aq]t specified, +then the password has the value \f[I]argument\f[R], which must contain +at least six characters. Otherwise, the password is retrieved as follows: .IP \[bu] 2 -\f[CB]env\f[R]: Retrieve the password from the environment variable named +\f[V]env\f[R]: Retrieve the password from the environment variable named \f[I]argument\f[R]. .IP \[bu] 2 -\f[CB]file\f[R]: Retrieve the password from the file named +\f[V]file\f[R]: Retrieve the password from the file named \f[I]argument\f[R]. .PP \f[B]Note:\f[R] All other options that require passwords, such as -\f[CB]\-keypass\f[R], \f[CB]\-srckeypass\f[R], \f[CB]\-destkeypass\f[R], -\f[CB]\-srcstorepass\f[R], and \f[CB]\-deststorepass\f[R], accept the -\f[CB]env\f[R] and \f[CB]file\f[R] modifiers. +\f[V]-keypass\f[R], \f[V]-srckeypass\f[R], \f[V]-destkeypass\f[R], +\f[V]-srcstorepass\f[R], and \f[V]-deststorepass\f[R], accept the +\f[V]env\f[R] and \f[V]file\f[R] modifiers. Remember to separate the password option and the modifier with a colon (:). .PP The password must be provided to all commands that access the keystore contents. -For such commands, when the \f[CB]\-storepass\f[R] option isn\[aq]t +For such commands, when the \f[V]-storepass\f[R] option isn\[aq]t provided at the command line, the user is prompted for it. .PP When retrieving information from the keystore, the password is optional. @@ -1433,133 +1445,117 @@ If a password is not specified, then the integrity of the retrieved information can\[aq]t be verified and a warning is displayed. .RE .TP -.B \f[CB]\-providername\f[R] \f[I]name\f[R] +\f[V]-providername\f[R] \f[I]name\f[R] Used to identify a cryptographic service provider\[aq]s name when listed in the security properties file. -.RS -.RE .TP -.B \f[CB]\-addprovider\f[R] \f[I]name\f[R] +\f[V]-addprovider\f[R] \f[I]name\f[R] Used to add a security provider by name (such as SunPKCS11) . -.RS -.RE .TP -.B \f[CB]\-providerclass\f[R] \f[I]class\f[R] +\f[V]-providerclass\f[R] \f[I]class\f[R] Used to specify the name of a cryptographic service provider\[aq]s master class file when the service provider isn\[aq]t listed in the security properties file. -.RS -.RE .TP -.B \f[CB]\-providerpath\f[R] \f[I]list\f[R] +\f[V]-providerpath\f[R] \f[I]list\f[R] Used to specify the provider classpath. -.RS -.RE .TP -.B \f[CB]\-providerarg\f[R] \f[I]arg\f[R] -Used with the \f[CB]\-addprovider\f[R] or \f[CB]\-providerclass\f[R] option +\f[V]-providerarg\f[R] \f[I]arg\f[R] +Used with the \f[V]-addprovider\f[R] or \f[V]-providerclass\f[R] option to represent an optional string input argument for the constructor of \f[I]class\f[R] name. -.RS -.RE .TP -.B \f[CB]\-protected=true\f[R]|\f[CB]false\f[R] -Specify this value as \f[CB]true\f[R] when a password must be specified by -way of a protected authentication path, such as a dedicated PIN reader. +\f[V]-protected=true\f[R]|\f[V]false\f[R] +Specify this value as \f[V]true\f[R] when a password must be specified +by way of a protected authentication path, such as a dedicated PIN +reader. Because there are two keystores involved in the -\f[CB]\-importkeystore\f[R] command, the following two options, -\f[CB]\-srcprotected\f[R] and \f[CB]\-destprotected\f[R], are provided for +\f[V]-importkeystore\f[R] command, the following two options, +\f[V]-srcprotected\f[R] and \f[V]-destprotected\f[R], are provided for the source keystore and the destination keystore respectively. -.RS -.RE .TP -.B \f[CB]\-ext\f[R] {\f[I]name\f[R]{\f[CB]:critical\f[R]} {\f[CB]=\f[R]\f[I]value\f[R]}} +\f[V]-ext\f[R] {\f[I]name\f[R]{\f[V]:critical\f[R]} {\f[V]=\f[R]\f[I]value\f[R]}} Denotes an X.509 certificate extension. -The option can be used in \f[CB]\-genkeypair\f[R] and \f[CB]\-gencert\f[R] +The option can be used in \f[V]-genkeypair\f[R] and \f[V]-gencert\f[R] to embed extensions into the generated certificate, or in -\f[CB]\-certreq\f[R] to show what extensions are requested in the +\f[V]-certreq\f[R] to show what extensions are requested in the certificate request. The option can appear multiple times. The \f[I]name\f[R] argument can be a supported extension name (see \f[B]Supported Named Extensions\f[R]) or an arbitrary OID number. -The \f[I]value\f[R] argument, when provided, denotes the argument for the -extension. +The \f[I]value\f[R] argument, when provided, denotes the argument for +the extension. When \f[I]value\f[R] is omitted, the default value of the extension or the extension itself requires no argument. -The \f[CB]:critical\f[R] modifier, when provided, means the -extension\[aq]s \f[CB]isCritical\f[R] attribute is \f[CB]true\f[R]; -otherwise, it is \f[CB]false\f[R]. -You can use \f[CB]:c\f[R] in place of \f[CB]:critical\f[R]. -.RS -.RE +The \f[V]:critical\f[R] modifier, when provided, means the +extension\[aq]s \f[V]isCritical\f[R] attribute is \f[V]true\f[R]; +otherwise, it is \f[V]false\f[R]. +You can use \f[V]:c\f[R] in place of \f[V]:critical\f[R]. .TP -.B \f[CB]\-conf\f[R] \f[I]file\f[R] -Specifies a pre\-configured options file. -.RS -.RE -.SH PRE\-CONFIGURED OPTIONS FILE +\f[V]-conf\f[R] \f[I]file\f[R] +Specifies a pre-configured options file. +.SH PRE-CONFIGURED OPTIONS FILE .PP -A pre\-configured options file is a Java properties file that can be -specified with the \f[CB]\-conf\f[R] option. +A pre-configured options file is a Java properties file that can be +specified with the \f[V]-conf\f[R] option. Each property represents the default option(s) for a keytool command -using "keytool.\f[I]command_name\f[R]" as the property name. -A special property named "keytool.all" represents the default option(s) -applied to all commands. -A property value can include \f[CB]${prop}\f[R] which will be expanded to +using \[dq]keytool.\f[I]command_name\f[R]\[dq] as the property name. +A special property named \[dq]keytool.all\[dq] represents the default +option(s) applied to all commands. +A property value can include \f[V]${prop}\f[R] which will be expanded to the system property associated with it. If an option value includes white spaces inside, it should be surrounded -by quotation marks (" or \[aq]). +by quotation marks (\[dq] or \[aq]). All property names must be in lower case. .PP -When \f[CB]keytool\f[R] is launched with a pre\-configured options file, -the value for "keytool.all" (if it exists) is prepended to the -\f[CB]keytool\f[R] command line first, with the value for the command name -(if it exists) comes next, and the existing options on the command line -at last. -For a single\-valued option, this allows the property for a specific -command to override the "keytool.all" value, and the value specified on -the command line to override both. -For multiple\-valued options, all of them will be used by -\f[CB]keytool\f[R]. -.PP -For example, given the following file named \f[CB]preconfig\f[R]: +When \f[V]keytool\f[R] is launched with a pre-configured options file, +the value for \[dq]keytool.all\[dq] (if it exists) is prepended to the +\f[V]keytool\f[R] command line first, with the value for the command +name (if it exists) comes next, and the existing options on the command +line at last. +For a single-valued option, this allows the property for a specific +command to override the \[dq]keytool.all\[dq] value, and the value +specified on the command line to override both. +For multiple-valued options, all of them will be used by +\f[V]keytool\f[R]. +.PP +For example, given the following file named \f[V]preconfig\f[R]: .IP .nf \f[CB] -\ \ \ \ #\ A\ tiny\ pre\-configured\ options\ file -\ \ \ \ keytool.all\ =\ \-keystore\ ${user.home}/ks -\ \ \ \ keytool.list\ =\ \-v -\ \ \ \ keytool.genkeypair\ =\ \-keyalg\ rsa + # A tiny pre-configured options file + keytool.all = -keystore ${user.home}/ks + keytool.list = -v + keytool.genkeypair = -keyalg rsa \f[R] .fi .PP -\f[CB]keytool\ \-conf\ preconfig\ \-list\f[R] is identical to +\f[V]keytool -conf preconfig -list\f[R] is identical to .RS .PP -\f[CB]keytool\ \-keystore\ ~/ks\ \-v\ \-list\f[R] +\f[V]keytool -keystore \[ti]/ks -v -list\f[R] .RE .PP -\f[CB]keytool\ \-conf\ preconfig\ \-genkeypair\ \-alias\ me\f[R] is -identical to +\f[V]keytool -conf preconfig -genkeypair -alias me\f[R] is identical to .RS .PP -\f[CB]keytool\ \-keystore\ ~/ks\ \-keyalg\ rsa\ \-genkeypair\ \-alias\ me\f[R] +\f[V]keytool -keystore \[ti]/ks -keyalg rsa -genkeypair -alias me\f[R] .RE .PP -\f[CB]keytool\ \-conf\ preconfig\ \-genkeypair\ \-alias\ you\ \-keyalg\ ec\f[R] -is identical to +\f[V]keytool -conf preconfig -genkeypair -alias you -keyalg ec\f[R] is +identical to .RS .PP -\f[CB]keytool\ \-keystore\ ~/ks\ \-keyalg\ rsa\ \-genkeypair\ \-alias\ you\ \-keyalg\ ec\f[R] +\f[V]keytool -keystore \[ti]/ks -keyalg rsa -genkeypair -alias you -keyalg ec\f[R] .RE .PP which is equivalent to .RS .PP -\f[CB]keytool\ \-keystore\ ~/ks\ \-genkeypair\ \-alias\ you\ \-keyalg\ ec\f[R] +\f[V]keytool -keystore \[ti]/ks -genkeypair -alias you -keyalg ec\f[R] .RE .PP -because \f[CB]\-keyalg\f[R] is a single\-valued option and the \f[CB]ec\f[R] +because \f[V]-keyalg\f[R] is a single-valued option and the \f[V]ec\f[R] value specified on the command line overrides the preconfigured options file. .SH EXAMPLES OF OPTION VALUES @@ -1568,36 +1564,36 @@ The following examples show the defaults for various option values: .IP .nf \f[CB] -\-alias\ "mykey" +-alias \[dq]mykey\[dq] -\-keysize -\ \ \ \ 2048\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "DSA") -\ \ \ \ 3072\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "RSA",\ "RSASSA\-PSS",\ or\ "DH") -\ \ \ \ 384\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "EC") -\ \ \ \ 255\ (when\ using\ \-genkeypair\ and\ \-keyalg\ is\ "EdDSA",\ or\ "XDH) -\ \ \ \ 56\ (when\ using\ \-genseckey\ and\ \-keyalg\ is\ "DES") -\ \ \ \ 168\ (when\ using\ \-genseckey\ and\ \-keyalg\ is\ "DESede") +-keysize + 2048 (when using -genkeypair and -keyalg is \[dq]DSA\[dq]) + 3072 (when using -genkeypair and -keyalg is \[dq]RSA\[dq], \[dq]RSASSA-PSS\[dq], or \[dq]DH\[dq]) + 384 (when using -genkeypair and -keyalg is \[dq]EC\[dq]) + 255 (when using -genkeypair and -keyalg is \[dq]EdDSA\[dq], or \[dq]XDH) + 56 (when using -genseckey and -keyalg is \[dq]DES\[dq]) + 168 (when using -genseckey and -keyalg is \[dq]DESede\[dq]) -\-validity\ 90 +-validity 90 -\-keystore\ +-keystore -\-destkeystore\ +-destkeystore -\-storetype\ +-storetype -\-file -\ \ \ \ stdin\ (if\ reading) -\ \ \ \ stdout\ (if\ writing) +-file + stdin (if reading) + stdout (if writing) -\-protected\ false +-protected false \f[R] .fi .PP When generating a certificate or a certificate request, the default -signature algorithm (\f[CB]\-sigalg\f[R] option) is derived from the +signature algorithm (\f[V]-sigalg\f[R] option) is derived from the algorithm of the underlying private key to provide an appropriate level of security strength as follows: .PP @@ -1625,7 +1621,7 @@ RSA T}@T{ < 624 T}@T{ -SHA256withRSA (keysize is too small for using SHA\-384) +SHA256withRSA (keysize is too small for using SHA-384) T} T{ T}@T{ @@ -1653,28 +1649,28 @@ T}@T{ SHA512withECDSA T} T{ -RSASSA\-PSS +RSASSA-PSS T}@T{ < 624 T}@T{ -RSASSA\-PSS (with SHA\-256, keysize is too small for +RSASSA-PSS (with SHA-256, keysize is too small for T} T{ T}@T{ T}@T{ -using SHA\-384) +using SHA-384) T} T{ T}@T{ <= 7680 T}@T{ -RSASSA\-PSS (with SHA\-384) +RSASSA-PSS (with SHA-384) T} T{ T}@T{ > 7680 T}@T{ -RSASSA\-PSS (with SHA\-512) +RSASSA-PSS (with SHA-512) T} T{ EdDSA @@ -1705,17 +1701,17 @@ Ed448 T} .TE .IP \[bu] 2 -An RSASSA\-PSS signature algorithm uses a \f[CB]MessageDigest\f[R] +An RSASSA-PSS signature algorithm uses a \f[V]MessageDigest\f[R] algorithm as its hash and MGF1 algorithms. .IP \[bu] 2 EdDSA supports 2 key sizes: Ed25519 and Ed448. -When generating an EdDSA key pair using \f[CB]\-keyalg\ EdDSA\f[R], a user -can specify \f[CB]\-keysize\ 255\f[R] or \f[CB]\-keysize\ 448\f[R] to -generate Ed25519 or Ed448 key pairs. -When no \f[CB]\-keysize\f[R] is specified, an Ed25519 key pair is +When generating an EdDSA key pair using \f[V]-keyalg EdDSA\f[R], a user +can specify \f[V]-keysize 255\f[R] or \f[V]-keysize 448\f[R] to generate +Ed25519 or Ed448 key pairs. +When no \f[V]-keysize\f[R] is specified, an Ed25519 key pair is generated. -A user can also directly specify \f[CB]\-keyalg\ Ed25519\f[R] or -\f[CB]\-keyalg\ Ed448\f[R] to generate a key pair with the expected key +A user can also directly specify \f[V]-keyalg Ed25519\f[R] or +\f[V]-keyalg Ed448\f[R] to generate a key pair with the expected key size. .PP \f[B]Note:\f[R] @@ -1725,182 +1721,182 @@ algorithm names are periodically updated to stronger values with each release of the JDK. If interoperability with older releases of the JDK is important, make sure that the defaults are supported by those releases. -Alternatively, you can use the \f[CB]\-keysize\f[R] or \f[CB]\-sigalg\f[R] +Alternatively, you can use the \f[V]-keysize\f[R] or \f[V]-sigalg\f[R] options to override the default values at your own risk. .SH SUPPORTED NAMED EXTENSIONS .PP -The \f[CB]keytool\f[R] command supports these named extensions. -The names aren\[aq]t case\-sensitive. +The \f[V]keytool\f[R] command supports these named extensions. +The names aren\[aq]t case-sensitive. .TP -.B \f[CB]BC\f[R] or \f[CB]BasicContraints\f[R] +\f[V]BC\f[R] or \f[V]BasicContraints\f[R] Values: .RS .PP The full form is -\f[CB]ca:\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}[\f[CB],pathlen:\f[R]\f[I]len\f[R]] +\f[V]ca:\f[R]{\f[V]true\f[R]|\f[V]false\f[R]}[\f[V],pathlen:\f[R]\f[I]len\f[R]] or \f[I]len\f[R], which is short for -\f[CB]ca:true,pathlen:\f[R]\f[I]len\f[R]. +\f[V]ca:true,pathlen:\f[R]\f[I]len\f[R]. .PP -When \f[I]len\f[R] is omitted, the resulting value is \f[CB]ca:true\f[R]. +When \f[I]len\f[R] is omitted, the resulting value is \f[V]ca:true\f[R]. .RE .TP -.B \f[CB]KU\f[R] or \f[CB]KeyUsage\f[R] +\f[V]KU\f[R] or \f[V]KeyUsage\f[R] Values: .RS .PP -\f[I]usage\f[R](\f[CB],\f[R] \f[I]usage\f[R])* +\f[I]usage\f[R](\f[V],\f[R] \f[I]usage\f[R])* .PP \f[I]usage\f[R] can be one of the following: .IP \[bu] 2 -\f[CB]digitalSignature\f[R] +\f[V]digitalSignature\f[R] .IP \[bu] 2 -\f[CB]nonRepudiation\f[R] (\f[CB]contentCommitment\f[R]) +\f[V]nonRepudiation\f[R] (\f[V]contentCommitment\f[R]) .IP \[bu] 2 -\f[CB]keyEncipherment\f[R] +\f[V]keyEncipherment\f[R] .IP \[bu] 2 -\f[CB]dataEncipherment\f[R] +\f[V]dataEncipherment\f[R] .IP \[bu] 2 -\f[CB]keyAgreement\f[R] +\f[V]keyAgreement\f[R] .IP \[bu] 2 -\f[CB]keyCertSign\f[R] +\f[V]keyCertSign\f[R] .IP \[bu] 2 -\f[CB]cRLSign\f[R] +\f[V]cRLSign\f[R] .IP \[bu] 2 -\f[CB]encipherOnly\f[R] +\f[V]encipherOnly\f[R] .IP \[bu] 2 -\f[CB]decipherOnly\f[R] +\f[V]decipherOnly\f[R] .PP Provided there is no ambiguity, the \f[I]usage\f[R] argument can be -abbreviated with the first few letters (such as \f[CB]dig\f[R] for -\f[CB]digitalSignature\f[R]) or in camel\-case style (such as \f[CB]dS\f[R] -for \f[CB]digitalSignature\f[R] or \f[CB]cRLS\f[R] for \f[CB]cRLSign\f[R]). -The \f[I]usage\f[R] values are case\-sensitive. +abbreviated with the first few letters (such as \f[V]dig\f[R] for +\f[V]digitalSignature\f[R]) or in camel-case style (such as \f[V]dS\f[R] +for \f[V]digitalSignature\f[R] or \f[V]cRLS\f[R] for \f[V]cRLSign\f[R]). +The \f[I]usage\f[R] values are case-sensitive. .RE .TP -.B \f[CB]EKU\f[R] or \f[CB]ExtendedKeyUsage\f[R] +\f[V]EKU\f[R] or \f[V]ExtendedKeyUsage\f[R] Values: .RS .PP -\f[I]usage\f[R](\f[CB],\f[R] \f[I]usage\f[R])* +\f[I]usage\f[R](\f[V],\f[R] \f[I]usage\f[R])* .PP \f[I]usage\f[R] can be one of the following: .IP \[bu] 2 -\f[CB]anyExtendedKeyUsage\f[R] +\f[V]anyExtendedKeyUsage\f[R] .IP \[bu] 2 -\f[CB]serverAuth\f[R] +\f[V]serverAuth\f[R] .IP \[bu] 2 -\f[CB]clientAuth\f[R] +\f[V]clientAuth\f[R] .IP \[bu] 2 -\f[CB]codeSigning\f[R] +\f[V]codeSigning\f[R] .IP \[bu] 2 -\f[CB]emailProtection\f[R] +\f[V]emailProtection\f[R] .IP \[bu] 2 -\f[CB]timeStamping\f[R] +\f[V]timeStamping\f[R] .IP \[bu] 2 -\f[CB]OCSPSigning\f[R] +\f[V]OCSPSigning\f[R] .IP \[bu] 2 Any OID string .PP Provided there is no ambiguity, the \f[I]usage\f[R] argument can be -abbreviated with the first few letters or in camel\-case style. -The \f[I]usage\f[R] values are case\-sensitive. +abbreviated with the first few letters or in camel-case style. +The \f[I]usage\f[R] values are case-sensitive. .RE .TP -.B \f[CB]SAN\f[R] or \f[CB]SubjectAlternativeName\f[R] +\f[V]SAN\f[R] or \f[V]SubjectAlternativeName\f[R] Values: .RS .PP -\f[I]type\f[R]\f[CB]:\f[R]\f[I]value\f[R](\f[CB],\f[R] -\f[I]type\f[R]\f[CB]:\f[R]\f[I]value\f[R])* +\f[I]type\f[R]\f[V]:\f[R]\f[I]value\f[R](\f[V],\f[R] +\f[I]type\f[R]\f[V]:\f[R]\f[I]value\f[R])* .PP \f[I]type\f[R] can be one of the following: .IP \[bu] 2 -\f[CB]EMAIL\f[R] +\f[V]EMAIL\f[R] .IP \[bu] 2 -\f[CB]URI\f[R] +\f[V]URI\f[R] .IP \[bu] 2 -\f[CB]DNS\f[R] +\f[V]DNS\f[R] .IP \[bu] 2 -\f[CB]IP\f[R] +\f[V]IP\f[R] .IP \[bu] 2 -\f[CB]OID\f[R] +\f[V]OID\f[R] .PP The \f[I]value\f[R] argument is the string format value for the \f[I]type\f[R]. .RE .TP -.B \f[CB]IAN\f[R] or \f[CB]IssuerAlternativeName\f[R] +\f[V]IAN\f[R] or \f[V]IssuerAlternativeName\f[R] Values: .RS .PP -Same as \f[CB]SAN\f[R] or \f[CB]SubjectAlternativeName\f[R]. +Same as \f[V]SAN\f[R] or \f[V]SubjectAlternativeName\f[R]. .RE .TP -.B \f[CB]SIA\f[R] or \f[CB]SubjectInfoAccess\f[R] +\f[V]SIA\f[R] or \f[V]SubjectInfoAccess\f[R] Values: .RS .PP -\f[I]method\f[R]\f[CB]:\f[R]\f[I]location\-type\f[R]\f[CB]:\f[R]\f[I]location\-value\f[R](\f[CB],\f[R] -\f[I]method\f[R]\f[CB]:\f[R]\f[I]location\-type\f[R]\f[CB]:\f[R]\f[I]location\-value\f[R])* +\f[I]method\f[R]\f[V]:\f[R]\f[I]location-type\f[R]\f[V]:\f[R]\f[I]location-value\f[R](\f[V],\f[R] +\f[I]method\f[R]\f[V]:\f[R]\f[I]location-type\f[R]\f[V]:\f[R]\f[I]location-value\f[R])* .PP \f[I]method\f[R] can be one of the following: .IP \[bu] 2 -\f[CB]timeStamping\f[R] +\f[V]timeStamping\f[R] .IP \[bu] 2 -\f[CB]caRepository\f[R] +\f[V]caRepository\f[R] .IP \[bu] 2 Any OID .PP -The \f[I]location\-type\f[R] and \f[I]location\-value\f[R] arguments can -be any \f[I]type\f[R]\f[CB]:\f[R]\f[I]value\f[R] supported by the -\f[CB]SubjectAlternativeName\f[R] extension. +The \f[I]location-type\f[R] and \f[I]location-value\f[R] arguments can +be any \f[I]type\f[R]\f[V]:\f[R]\f[I]value\f[R] supported by the +\f[V]SubjectAlternativeName\f[R] extension. .RE .TP -.B \f[CB]AIA\f[R] or \f[CB]AuthorityInfoAccess\f[R] +\f[V]AIA\f[R] or \f[V]AuthorityInfoAccess\f[R] Values: .RS .PP -Same as \f[CB]SIA\f[R] or \f[CB]SubjectInfoAccess\f[R]. +Same as \f[V]SIA\f[R] or \f[V]SubjectInfoAccess\f[R]. .PP The \f[I]method\f[R] argument can be one of the following: .IP \[bu] 2 -\f[CB]ocsp\f[R] +\f[V]ocsp\f[R] .IP \[bu] 2 -\f[CB]caIssuers\f[R] +\f[V]caIssuers\f[R] .IP \[bu] 2 Any OID .RE .PP When \f[I]name\f[R] is OID, the value is the hexadecimal dumped Definite -Encoding Rules (DER) encoding of the \f[CB]extnValue\f[R] for the +Encoding Rules (DER) encoding of the \f[V]extnValue\f[R] for the extension excluding the OCTET STRING type and length bytes. -Other than standard hexadecimal numbers (0\-9, a\-f, A\-F), any extra +Other than standard hexadecimal numbers (0-9, a-f, A-F), any extra characters are ignored in the HEX string. Therefore, both 01:02:03:04 and 01020304 are accepted as identical values. When there is no value, the extension has an empty value field. .PP -A special name \f[CB]honored\f[R], used only in \f[CB]\-gencert\f[R], +A special name \f[V]honored\f[R], used only in \f[V]-gencert\f[R], denotes how the extensions included in the certificate request should be honored. -The value for this name is a comma\-separated list of \f[CB]all\f[R] (all +The value for this name is a comma-separated list of \f[V]all\f[R] (all requested extensions are honored), -\f[I]name\f[R]{\f[CB]:\f[R][\f[CB]critical\f[R]|\f[CB]non\-critical\f[R]]} (the -named extension is honored, but it uses a different \f[CB]isCritical\f[R] -attribute), and \f[CB]\-name\f[R] (used with \f[CB]all\f[R], denotes an -exception). +\f[I]name\f[R]{\f[V]:\f[R][\f[V]critical\f[R]|\f[V]non-critical\f[R]]} +(the named extension is honored, but it uses a different +\f[V]isCritical\f[R] attribute), and \f[V]-name\f[R] (used with +\f[V]all\f[R], denotes an exception). Requested extensions aren\[aq]t honored by default. .PP -If, besides the\f[CB]\-ext\ honored\f[R] option, another named or OID -\f[CB]\-ext\f[R] option is provided, this extension is added to those +If, besides the\f[V]-ext honored\f[R] option, another named or OID +\f[V]-ext\f[R] option is provided, this extension is added to those already honored. However, if this name (or OID) also appears in the honored value, then its value and criticality override that in the request. If an extension of the same type is provided multiple times through either a name or an OID, only the last extension is used. .PP -The \f[CB]subjectKeyIdentifier\f[R] extension is always created. -For non\-self\-signed certificates, the \f[CB]authorityKeyIdentifier\f[R] +The \f[V]subjectKeyIdentifier\f[R] extension is always created. +For non-self-signed certificates, the \f[V]authorityKeyIdentifier\f[R] is created. .PP \f[B]CAUTION:\f[R] @@ -1934,62 +1930,62 @@ Create a keystore and then generate the key pair. You can enter the command as a single line such as the following: .RS .PP -\f[CB]keytool\ \-genkeypair\ \-dname\ "cn=myname,\ ou=mygroup,\ o=mycompany,\ c=mycountry"\ \-alias\ business\ \-keyalg\ rsa\ \-keypass\f[R] +\f[V]keytool -genkeypair -dname \[dq]cn=myname, ou=mygroup, o=mycompany, c=mycountry\[dq] -alias business -keyalg rsa -keypass\f[R] \f[I]password\f[R] -\f[CB]\-keystore\ /working/mykeystore\ \-storepass\ password\ \-validity\ 180\f[R] +\f[V]-keystore /working/mykeystore -storepass password -validity 180\f[R] .RE .PP -The command creates the keystore named \f[CB]mykeystore\f[R] in the +The command creates the keystore named \f[V]mykeystore\f[R] in the working directory (provided it doesn\[aq]t already exist), and assigns -it the password specified by \f[CB]\-keypass\f[R]. +it the password specified by \f[V]-keypass\f[R]. It generates a public/private key pair for the entity whose -distinguished name is \f[CB]myname\f[R], \f[CB]mygroup\f[R], -\f[CB]mycompany\f[R], and a two\-letter country code of -\f[CB]mycountry\f[R]. +distinguished name is \f[V]myname\f[R], \f[V]mygroup\f[R], +\f[V]mycompany\f[R], and a two-letter country code of +\f[V]mycountry\f[R]. It uses the RSA key generation algorithm to create the keys; both are 3072 bits. .PP The command uses the default SHA384withRSA signature algorithm to create -a self\-signed certificate that includes the public key and the +a self-signed certificate that includes the public key and the distinguished name information. The certificate is valid for 180 days, and is associated with the private key in a keystore entry referred to by -\f[CB]\-alias\ business\f[R]. +\f[V]-alias business\f[R]. The private key is assigned the password specified by -\f[CB]\-keypass\f[R]. +\f[V]-keypass\f[R]. .PP The command is significantly shorter when the option defaults are accepted. -In this case, only \f[CB]\-keyalg\f[R] is required, and the defaults are +In this case, only \f[V]-keyalg\f[R] is required, and the defaults are used for unspecified options that have default values. You are prompted for any required values. You could have the following: .RS .PP -\f[CB]keytool\ \-genkeypair\ \-keyalg\ rsa\f[R] +\f[V]keytool -genkeypair -keyalg rsa\f[R] .RE .PP -In this case, a keystore entry with the alias \f[CB]mykey\f[R] is created, -with a newly generated key pair and a certificate that is valid for 90 -days. +In this case, a keystore entry with the alias \f[V]mykey\f[R] is +created, with a newly generated key pair and a certificate that is valid +for 90 days. This entry is placed in your home directory in a keystore named -\f[CB]\&.keystore\f[R] . -\f[CB]\&.keystore\f[R] is created if it doesn\[aq]t already exist. +\f[V].keystore\f[R] . +\f[V].keystore\f[R] is created if it doesn\[aq]t already exist. You are prompted for the distinguished name information, the keystore password, and the private key password. .PP \f[B]Note:\f[R] .PP The rest of the examples assume that you responded to the prompts with -values equal to those specified in the first \f[CB]\-genkeypair\f[R] +values equal to those specified in the first \f[V]-genkeypair\f[R] command. For example, a distinguished name of -\f[CB]cn=\f[R]\f[I]myname\f[R]\f[CB],\ ou=\f[R]\f[I]mygroup\f[R]\f[CB],\ o=\f[R]\f[I]mycompany\f[R]\f[CB],\ c=\f[R]\f[I]mycountry\f[R]). +\f[V]cn=\f[R]\f[I]myname\f[R]\f[V], ou=\f[R]\f[I]mygroup\f[R]\f[V], o=\f[R]\f[I]mycompany\f[R]\f[V], c=\f[R]\f[I]mycountry\f[R]). .SH REQUESTING A SIGNED CERTIFICATE FROM A CA .PP \f[B]Note:\f[R] .PP -Generating the key pair created a self\-signed certificate; however, a +Generating the key pair created a self-signed certificate; however, a certificate is more likely to be trusted by others when it is signed by a CA. .PP @@ -1999,15 +1995,15 @@ Generate a CSR: .RS 4 .RS .PP -\f[CB]keytool\ \-certreq\ \-file\ myname.csr\f[R] +\f[V]keytool -certreq -file myname.csr\f[R] .RE .PP This creates a CSR for the entity identified by the default alias -\f[CB]mykey\f[R] and puts the request in the file named -\f[CB]myname.csr\f[R]. +\f[V]mykey\f[R] and puts the request in the file named +\f[V]myname.csr\f[R]. .RE .IP "2." 3 -Submit \f[CB]myname.csr\f[R] to a CA, such as DigiCert. +Submit \f[V]myname.csr\f[R] to a CA, such as DigiCert. .PP The CA authenticates you, the requestor (usually offline), and returns a certificate, signed by them, authenticating your public key. @@ -2019,9 +2015,9 @@ in the chain. To import a certificate for the CA, complete the following process: .IP "1." 3 Before you import the certificate reply from a CA, you need one or more -trusted certificates either in your keystore or in the \f[CB]cacerts\f[R] +trusted certificates either in your keystore or in the \f[V]cacerts\f[R] keystore file. -See \f[CB]\-importcert\f[R] in \f[B]Commands\f[R]. +See \f[V]-importcert\f[R] in \f[B]Commands\f[R]. .RS 4 .IP \[bu] 2 If the certificate reply is a certificate chain, then you need the top @@ -2030,30 +2026,30 @@ The root CA certificate that authenticates the public key of the CA. .IP \[bu] 2 If the certificate reply is a single certificate, then you need a certificate for the issuing CA (the one that signed it). -If that certificate isn\[aq]t self\-signed, then you need a certificate -for its signer, and so on, up to a self\-signed root CA certificate. +If that certificate isn\[aq]t self-signed, then you need a certificate +for its signer, and so on, up to a self-signed root CA certificate. .PP -The \f[CB]cacerts\f[R] keystore ships with a set of root certificates +The \f[V]cacerts\f[R] keystore ships with a set of root certificates issued by the CAs of \f[B]the Oracle Java Root Certificate program\f[R] -[http://www.oracle.com/technetwork/java/javase/javasecarootcertsprogram\-1876540.html]. +[http://www.oracle.com/technetwork/java/javase/javasecarootcertsprogram-1876540.html]. If you request a signed certificate from a CA, and a certificate authenticating that CA\[aq]s public key hasn\[aq]t been added to -\f[CB]cacerts\f[R], then you must import a certificate from that CA as a +\f[V]cacerts\f[R], then you must import a certificate from that CA as a trusted certificate. .PP -A certificate from a CA is usually self\-signed or signed by another CA. +A certificate from a CA is usually self-signed or signed by another CA. If it is signed by another CA, you need a certificate that authenticates that CA\[aq]s public key. .PP -For example, you have obtained a \f[I]X\f[R]\f[CB]\&.cer\f[R] file from a -company that is a CA and the file is supposed to be a self\-signed +For example, you have obtained a \f[I]X\f[R]\f[V].cer\f[R] file from a +company that is a CA and the file is supposed to be a self-signed certificate that authenticates that CA\[aq]s public key. Before you import it as a trusted certificate, you should ensure that the certificate is valid by: .IP "1." 3 -Viewing it with the \f[CB]keytool\ \-printcert\f[R] command or the -\f[CB]keytool\ \-importcert\f[R] command without using the -\f[CB]\-noprompt\f[R] option. +Viewing it with the \f[V]keytool -printcert\f[R] command or the +\f[V]keytool -importcert\f[R] command without using the +\f[V]-noprompt\f[R] option. Make sure that the displayed certificate fingerprints match the expected fingerprints. .IP "2." 3 @@ -2069,17 +2065,17 @@ before you imported it, then you would be trusting anything that the attacker signed. .RE .IP "2." 3 -Replace the self\-signed certificate with a certificate chain, where -each certificate in the chain authenticates the public key of the signer -of the previous certificate in the chain, up to a root CA. +Replace the self-signed certificate with a certificate chain, where each +certificate in the chain authenticates the public key of the signer of +the previous certificate in the chain, up to a root CA. .RS 4 .PP If you trust that the certificate is valid, then you can add it to your keystore by entering the following command: .RS .PP -\f[CB]keytool\ \-importcert\ \-alias\f[R] \f[I]alias\f[R] -\f[CB]\-file\ *X*\f[R].cer` +\f[V]keytool -importcert -alias\f[R] \f[I]alias\f[R] +\f[V]-file *X*\f[R].cer\[ga] .RE .PP This command creates a trusted certificate entry in the keystore from @@ -2090,9 +2086,9 @@ the data in the CA certificate file and assigns the values of the .PP After you import a certificate that authenticates the public key of the CA that you submitted your certificate signing request to (or there is -already such a certificate in the \f[CB]cacerts\f[R] file), you can import -the certificate reply and replace your self\-signed certificate with a -certificate chain. +already such a certificate in the \f[V]cacerts\f[R] file), you can +import the certificate reply and replace your self-signed certificate +with a certificate chain. .PP The certificate chain is one of the following: .IP \[bu] 2 @@ -2101,7 +2097,7 @@ Returned by the CA when the CA reply is a chain. Constructed when the CA reply is a single certificate. This certificate chain is constructed by using the certificate reply and trusted certificates available either in the keystore where you import -the reply or in the \f[CB]cacerts\f[R] keystore file. +the reply or in the \f[V]cacerts\f[R] keystore file. .PP For example, if you sent your certificate signing request to DigiCert, then you can import their reply by entering the following command: @@ -2109,16 +2105,16 @@ then you can import their reply by entering the following command: \f[B]Note:\f[R] .PP In this example, the returned certificate is named -\f[CB]DCmyname.cer\f[R]. +\f[V]DCmyname.cer\f[R]. .RS .PP -\f[CB]keytool\ \-importcert\ \-trustcacerts\ \-file\ DCmyname.cer\f[R] +\f[V]keytool -importcert -trustcacerts -file DCmyname.cer\f[R] .RE .SH EXPORTING A CERTIFICATE THAT AUTHENTICATES THE PUBLIC KEY .PP \f[B]Note:\f[R] .PP -If you used the \f[CB]jarsigner\f[R] command to sign a Java Archive (JAR) +If you used the \f[V]jarsigner\f[R] command to sign a Java Archive (JAR) file, then clients that use the file will want to authenticate your signature. .PP @@ -2128,24 +2124,24 @@ You can then export the certificate and supply it to your clients. .PP For example: .IP "1." 3 -Copy your certificate to a file named \f[CB]myname.cer\f[R] by entering +Copy your certificate to a file named \f[V]myname.cer\f[R] by entering the following command: .RS 4 .PP \f[B]Note:\f[R] .PP -In this example, the entry has an alias of \f[CB]mykey\f[R]. +In this example, the entry has an alias of \f[V]mykey\f[R]. .RS .PP -\f[CB]keytool\ \-exportcert\ \-alias\ mykey\ \-file\ myname.cer\f[R] +\f[V]keytool -exportcert -alias mykey -file myname.cer\f[R] .RE .RE .IP "2." 3 With the certificate and the signed JAR file, a client can use the -\f[CB]jarsigner\f[R] command to authenticate your signature. +\f[V]jarsigner\f[R] command to authenticate your signature. .SH IMPORTING THE KEYSTORE .PP -Use the \f[CB]importkeystore\f[R] command to import an entire keystore +Use the \f[V]importkeystore\f[R] command to import an entire keystore into another keystore. This imports all entries from the source keystore, including keys and certificates, to the destination keystore with a single command. @@ -2154,81 +2150,79 @@ keystore. During the import, all new entries in the destination keystore will have the same alias names and protection passwords (for secret keys and private keys). -If the \f[CB]keytool\f[R] command can\[aq]t recover the private keys or +If the \f[V]keytool\f[R] command can\[aq]t recover the private keys or secret keys from the source keystore, then it prompts you for a password. If it detects alias duplication, then it asks you for a new alias, and -you can specify a new alias or simply allow the \f[CB]keytool\f[R] command -to overwrite the existing one. +you can specify a new alias or simply allow the \f[V]keytool\f[R] +command to overwrite the existing one. .PP For example, import entries from a typical JKS type keystore -\f[CB]key.jks\f[R] into a PKCS #11 type hardware\-based keystore, by +\f[V]key.jks\f[R] into a PKCS #11 type hardware-based keystore, by entering the following command: .RS .PP -\f[CB]keytool\ \-importkeystore\ \-srckeystore\ key.jks\ \-destkeystore\ NONE\ \-srcstoretype\ JKS\ \-deststoretype\ PKCS11\ \-srcstorepass\f[R] -\f[I]password\f[R] \f[CB]\-deststorepass\f[R] \f[I]password\f[R] +\f[V]keytool -importkeystore -srckeystore key.jks -destkeystore NONE -srcstoretype JKS -deststoretype PKCS11 -srcstorepass\f[R] +\f[I]password\f[R] \f[V]-deststorepass\f[R] \f[I]password\f[R] .RE .PP -The \f[CB]importkeystore\f[R] command can also be used to import a single +The \f[V]importkeystore\f[R] command can also be used to import a single entry from a source keystore to a destination keystore. In this case, besides the options you used in the previous example, you need to specify the alias you want to import. -With the \f[CB]\-srcalias\f[R] option specified, you can also specify the +With the \f[V]-srcalias\f[R] option specified, you can also specify the destination alias name, protection password for a secret or private key, and the destination protection password you want as follows: .RS .PP -\f[CB]keytool\ \-importkeystore\ \-srckeystore\ key.jks\ \-destkeystore\ NONE\ \-srcstoretype\ JKS\ \-deststoretype\ PKCS11\ \-srcstorepass\f[R] -\f[I]password\f[R] \f[CB]\-deststorepass\f[R] \f[I]password\f[R] -\f[CB]\-srcalias\ myprivatekey\ \-destalias\ myoldprivatekey\ \-srckeypass\f[R] -\f[I]password\f[R] \f[CB]\-destkeypass\f[R] \f[I]password\f[R] -\f[CB]\-noprompt\f[R] +\f[V]keytool -importkeystore -srckeystore key.jks -destkeystore NONE -srcstoretype JKS -deststoretype PKCS11 -srcstorepass\f[R] +\f[I]password\f[R] \f[V]-deststorepass\f[R] \f[I]password\f[R] +\f[V]-srcalias myprivatekey -destalias myoldprivatekey -srckeypass\f[R] +\f[I]password\f[R] \f[V]-destkeypass\f[R] \f[I]password\f[R] +\f[V]-noprompt\f[R] .RE .SH GENERATING CERTIFICATES FOR AN SSL SERVER .PP -The following are \f[CB]keytool\f[R] commands used to generate key pairs +The following are \f[V]keytool\f[R] commands used to generate key pairs and certificates for three entities: .IP \[bu] 2 -Root CA (\f[CB]root\f[R]) +Root CA (\f[V]root\f[R]) .IP \[bu] 2 -Intermediate CA (\f[CB]ca\f[R]) +Intermediate CA (\f[V]ca\f[R]) .IP \[bu] 2 -SSL server (\f[CB]server\f[R]) +SSL server (\f[V]server\f[R]) .PP Ensure that you store all the certificates in the same keystore. .IP .nf \f[CB] -keytool\ \-genkeypair\ \-keystore\ root.jks\ \-alias\ root\ \-ext\ bc:c\ \-keyalg\ rsa -keytool\ \-genkeypair\ \-keystore\ ca.jks\ \-alias\ ca\ \-ext\ bc:c\ \-keyalg\ rsa -keytool\ \-genkeypair\ \-keystore\ server.jks\ \-alias\ server\ \-keyalg\ rsa +keytool -genkeypair -keystore root.jks -alias root -ext bc:c -keyalg rsa +keytool -genkeypair -keystore ca.jks -alias ca -ext bc:c -keyalg rsa +keytool -genkeypair -keystore server.jks -alias server -keyalg rsa -keytool\ \-keystore\ root.jks\ \-alias\ root\ \-exportcert\ \-rfc\ >\ root.pem +keytool -keystore root.jks -alias root -exportcert -rfc > root.pem -keytool\ \-storepass\ password\ \-keystore\ ca.jks\ \-certreq\ \-alias\ ca\ | -\ \ \ \ keytool\ \-storepass\ password\ \-keystore\ root.jks -\ \ \ \ \-gencert\ \-alias\ root\ \-ext\ BC=0\ \-rfc\ >\ ca.pem -keytool\ \-keystore\ ca.jks\ \-importcert\ \-alias\ ca\ \-file\ ca.pem +keytool -storepass password -keystore ca.jks -certreq -alias ca | + keytool -storepass password -keystore root.jks + -gencert -alias root -ext BC=0 -rfc > ca.pem +keytool -keystore ca.jks -importcert -alias ca -file ca.pem -keytool\ \-storepass\ password\ \-keystore\ server.jks\ \-certreq\ \-alias\ server\ | -\ \ \ \ keytool\ \-storepass\ password\ \-keystore\ ca.jks\ \-gencert\ \-alias\ ca -\ \ \ \ \-ext\ ku:c=dig,kE\ \-rfc\ >\ server.pem -cat\ root.pem\ ca.pem\ server.pem\ | -\ \ \ \ keytool\ \-keystore\ server.jks\ \-importcert\ \-alias\ server +keytool -storepass password -keystore server.jks -certreq -alias server | + keytool -storepass password -keystore ca.jks -gencert -alias ca + -ext ku:c=dig,kE -rfc > server.pem +cat root.pem ca.pem server.pem | + keytool -keystore server.jks -importcert -alias server \f[R] .fi .SH TERMS .TP -.B Keystore +Keystore A keystore is a storage facility for cryptographic keys and certificates. -.RS -.RE .TP -.B Keystore entries +Keystore entries Keystores can have different types of entries. -The two most applicable entry types for the \f[CB]keytool\f[R] command +The two most applicable entry types for the \f[V]keytool\f[R] command include the following: .RS .PP @@ -2239,9 +2233,9 @@ Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain for the corresponding public key. See \f[B]Certificate Chains\f[R]. -The \f[CB]keytool\f[R] command can handle both types of entries, while the -\f[CB]jarsigner\f[R] tool only handles the latter type of entry, that is -private keys and their associated certificate chains. +The \f[V]keytool\f[R] command can handle both types of entries, while +the \f[V]jarsigner\f[R] tool only handles the latter type of entry, that +is private keys and their associated certificate chains. .PP Trusted certificate entries: Each entry contains a single public key certificate that belongs to another party. @@ -2252,38 +2246,38 @@ The issuer of the certificate vouches for this, by signing the certificate. .RE .TP -.B Keystore aliases +Keystore aliases All keystore entries (key and trusted certificate entries) are accessed by way of unique aliases. .RS .PP An alias is specified when you add an entity to the keystore with the -\f[CB]\-genseckey\f[R] command to generate a secret key, the -\f[CB]\-genkeypair\f[R] command to generate a key pair (public and private -key), or the \f[CB]\-importcert\f[R] command to add a certificate or +\f[V]-genseckey\f[R] command to generate a secret key, the +\f[V]-genkeypair\f[R] command to generate a key pair (public and private +key), or the \f[V]-importcert\f[R] command to add a certificate or certificate chain to the list of trusted certificates. -Subsequent \f[CB]keytool\f[R] commands must use this same alias to refer +Subsequent \f[V]keytool\f[R] commands must use this same alias to refer to the entity. .PP -For example, you can use the alias \f[CB]duke\f[R] to generate a new -public/private key pair and wrap the public key into a self\-signed +For example, you can use the alias \f[V]duke\f[R] to generate a new +public/private key pair and wrap the public key into a self-signed certificate with the following command. See \f[B]Certificate Chains\f[R]. .RS .PP -\f[CB]keytool\ \-genkeypair\ \-alias\ duke\ \-keyalg\ rsa\ \-keypass\f[R] +\f[V]keytool -genkeypair -alias duke -keyalg rsa -keypass\f[R] \f[I]passwd\f[R] .RE .PP -This example specifies an initial \f[I]passwd\f[R] required by subsequent -commands to access the private key associated with the alias -\f[CB]duke\f[R]. +This example specifies an initial \f[I]passwd\f[R] required by +subsequent commands to access the private key associated with the alias +\f[V]duke\f[R]. If you later want to change Duke\[aq]s private key password, use a command such as the following: .RS .PP -\f[CB]keytool\ \-keypasswd\ \-alias\ duke\ \-keypass\f[R] \f[I]passwd\f[R] -\f[CB]\-new\f[R] \f[I]newpasswd\f[R] +\f[V]keytool -keypasswd -alias duke -keypass\f[R] \f[I]passwd\f[R] +\f[V]-new\f[R] \f[I]newpasswd\f[R] .RE .PP This changes the initial \f[I]passwd\f[R] to \f[I]newpasswd\f[R]. @@ -2293,116 +2287,118 @@ If you don\[aq]t specify a required password option on a command line, then you are prompted for it. .RE .TP -.B Keystore implementation -The \f[CB]KeyStore\f[R] class provided in the \f[CB]java.security\f[R] -package supplies well\-defined interfaces to access and modify the +Keystore implementation +The \f[V]KeyStore\f[R] class provided in the \f[V]java.security\f[R] +package supplies well-defined interfaces to access and modify the information in a keystore. It is possible for there to be multiple different concrete implementations, where each implementation is that for a particular type of keystore. .RS .PP -Currently, two command\-line tools (\f[CB]keytool\f[R] and -\f[CB]jarsigner\f[R]) make use of keystore implementations. -Because the \f[CB]KeyStore\f[R] class is \f[CB]public\f[R], users can write -additional security applications that use it. +Currently, two command-line tools (\f[V]keytool\f[R] and +\f[V]jarsigner\f[R]) make use of keystore implementations. +Because the \f[V]KeyStore\f[R] class is \f[V]public\f[R], users can +write additional security applications that use it. .PP In JDK 9 and later, the default keystore implementation is -\f[CB]PKCS12\f[R]. +\f[V]PKCS12\f[R]. This is a cross platform keystore based on the RSA PKCS12 Personal Information Exchange Syntax Standard. This standard is primarily meant for storing or transporting a user\[aq]s private keys, certificates, and miscellaneous secrets. -There is another built\-in implementation, provided by Oracle. +There is another built-in implementation, provided by Oracle. It implements the keystore as a file with a proprietary keystore type -(format) named \f[CB]JKS\f[R]. +(format) named \f[V]JKS\f[R]. It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. .PP -Keystore implementations are provider\-based. +Keystore implementations are provider-based. More specifically, the application interfaces supplied by -\f[CB]KeyStore\f[R] are implemented in terms of a Service Provider +\f[V]KeyStore\f[R] are implemented in terms of a Service Provider Interface (SPI). -That is, there is a corresponding abstract \f[CB]KeystoreSpi\f[R] class, -also in the \f[CB]java.security\ package\f[R], which defines the Service +That is, there is a corresponding abstract \f[V]KeystoreSpi\f[R] class, +also in the \f[V]java.security package\f[R], which defines the Service Provider Interface methods that providers must implement. -The term \f[I]provider\f[R] refers to a package or a set of packages that -supply a concrete implementation of a subset of services that can be -accessed by the Java Security API. +The term \f[I]provider\f[R] refers to a package or a set of packages +that supply a concrete implementation of a subset of services that can +be accessed by the Java Security API. To provide a keystore implementation, clients must implement a provider -and supply a \f[CB]KeystoreSpi\f[R] subclass implementation, as described +and supply a \f[V]KeystoreSpi\f[R] subclass implementation, as described in Steps to Implement and Integrate a Provider. .PP Applications can choose different types of keystore implementations from -different providers, using the \f[CB]getInstance\f[R] factory method -supplied in the \f[CB]KeyStore\f[R] class. +different providers, using the \f[V]getInstance\f[R] factory method +supplied in the \f[V]KeyStore\f[R] class. A keystore type defines the storage and data format of the keystore information, and the algorithms used to protect private/secret keys in the keystore and the integrity of the keystore. Keystore implementations of different types aren\[aq]t compatible. .PP -The \f[CB]keytool\f[R] command works on any file\-based keystore +The \f[V]keytool\f[R] command works on any file-based keystore implementation. It treats the keystore location that is passed to it at the command line -as a file name and converts it to a \f[CB]FileInputStream\f[R], from which -it loads the keystore information.)The \f[CB]jarsigner\f[R] commands can -read a keystore from any location that can be specified with a URL. +as a file name and converts it to a \f[V]FileInputStream\f[R], from +which it loads the keystore information.)The \f[V]jarsigner\f[R] +commands can read a keystore from any location that can be specified +with a URL. .PP -For \f[CB]keytool\f[R] and \f[CB]jarsigner\f[R], you can specify a keystore -type at the command line, with the \f[CB]\-storetype\f[R] option. +For \f[V]keytool\f[R] and \f[V]jarsigner\f[R], you can specify a +keystore type at the command line, with the \f[V]-storetype\f[R] option. .PP If you don\[aq]t explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the -\f[CB]keystore.type\f[R] property specified in the security properties +\f[V]keystore.type\f[R] property specified in the security properties file. -The security properties file is called \f[CB]java.security\f[R], and +The security properties file is called \f[V]java.security\f[R], and resides in the security properties directory: .IP \[bu] 2 -\f[B]Linux and OS X:\f[R] \f[CB]java.home/lib/security\f[R] +\f[B]Linux and OS X:\f[R] \f[V]java.home/lib/security\f[R] .IP \[bu] 2 -\f[B]Windows:\f[R] \f[CB]java.home\\lib\\security\f[R] +\f[B]Windows:\f[R] \f[V]java.home\[rs]lib\[rs]security\f[R] .PP -Each tool gets the \f[CB]keystore.type\f[R] value and then examines all +Each tool gets the \f[V]keystore.type\f[R] value and then examines all the currently installed providers until it finds one that implements a keystores of that type. It then uses the keystore implementation from that provider.The -\f[CB]KeyStore\f[R] class defines a static method named -\f[CB]getDefaultType\f[R] that lets applications retrieve the value of the -\f[CB]keystore.type\f[R] property. +\f[V]KeyStore\f[R] class defines a static method named +\f[V]getDefaultType\f[R] that lets applications retrieve the value of +the \f[V]keystore.type\f[R] property. The following line of code creates an instance of the default keystore -type as specified in the \f[CB]keystore.type\f[R] property: +type as specified in the \f[V]keystore.type\f[R] property: .RS .PP -\f[CB]KeyStore\ keyStore\ =\ KeyStore.getInstance(KeyStore.getDefaultType());\f[R] +\f[V]KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\f[R] .RE .PP -The default keystore type is \f[CB]pkcs12\f[R], which is a cross\-platform +The default keystore type is \f[V]pkcs12\f[R], which is a cross-platform keystore based on the RSA PKCS12 Personal Information Exchange Syntax Standard. This is specified by the following line in the security properties file: .RS .PP -\f[CB]keystore.type=pkcs12\f[R] +\f[V]keystore.type=pkcs12\f[R] .RE .PP To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. -For example, if you want to use the Oracle\[aq]s \f[CB]jks\f[R] keystore +For example, if you want to use the Oracle\[aq]s \f[V]jks\f[R] keystore implementation, then change the line to the following: .RS .PP -\f[CB]keystore.type=jks\f[R] +\f[V]keystore.type=jks\f[R] .RE .PP \f[B]Note:\f[R] .PP Case doesn\[aq]t matter in keystore type designations. -For example, \f[CB]JKS\f[R] would be considered the same as \f[CB]jks\f[R]. +For example, \f[V]JKS\f[R] would be considered the same as +\f[V]jks\f[R]. .RE .TP -.B Certificate -A certificate (or public\-key certificate) is a digitally signed +Certificate +A certificate (or public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key and some other information of another entity (the subject) has some specific value. @@ -2443,7 +2439,7 @@ Entity: An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree. .PP Public key cryptography requires access to users\[aq] public keys. -In a large\-scale networked environment, it is impossible to guarantee +In a large-scale networked environment, it is impossible to guarantee that prior relationships between communicating entities were established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution @@ -2459,14 +2455,14 @@ Comodo, Entrust, and so on. You can also run your own Certification Authority using products such as Microsoft Certificate Server or the Entrust CA product for your organization. -With the \f[CB]keytool\f[R] command, it is possible to display, import, +With the \f[V]keytool\f[R] command, it is possible to display, import, and export certificates. -It is also possible to generate self\-signed certificates. +It is also possible to generate self-signed certificates. .PP -The \f[CB]keytool\f[R] command currently handles X.509 certificates. +The \f[V]keytool\f[R] command currently handles X.509 certificates. .RE .TP -.B X.509 Certificates +X.509 Certificates The X.509 standard defines what information can go into a certificate and describes how to write it down (the data format). All the data in a certificate is encoded with two related standards @@ -2482,7 +2478,7 @@ signature: Version: This identifies which version of the X.509 standard applies to this certificate, which affects what information can be specified in it. Thus far, three versions are defined. -The \f[CB]keytool\f[R] command can import and export v1, v2, and v3 +The \f[V]keytool\f[R] command can import and export v1, v2, and v3 certificates. It generates v3 certificates. .RS 2 @@ -2502,17 +2498,17 @@ X.509 Version 3 is the most recent (1996) and supports the notion of extensions where anyone can define an extension and include it in the certificate. Some common extensions are: KeyUsage (limits the use of the keys to -particular purposes such as \f[CB]signing\-only\f[R]) and AlternativeNames +particular purposes such as \f[V]signing-only\f[R]) and AlternativeNames (allows other identities to also be associated with this public key, for example. DNS names, email addresses, IP addresses). Extensions can be marked critical to indicate that the extension should be checked and enforced or used. For example, if a certificate has the KeyUsage extension marked critical -and set to \f[CB]keyCertSign\f[R], then when this certificate is presented -during SSL communication, it should be rejected because the certificate -extension indicates that the associated private key should only be used -for signing certificates and not for SSL use. +and set to \f[V]keyCertSign\f[R], then when this certificate is +presented during SSL communication, it should be rejected because the +certificate extension indicates that the associated private key should +only be used for signing certificates and not for SSL use. .RE .IP \[bu] 2 Serial number: The entity that created the certificate is responsible @@ -2530,7 +2526,7 @@ certificate. This is typically a CA. Using this certificate implies trusting the entity that signed this certificate. -In some cases, such as root or top\-level CA certificates, the issuer +In some cases, such as root or top-level CA certificates, the issuer signs its own certificate. .IP \[bu] 2 Validity period: Each certificate is valid only for a limited amount of @@ -2553,7 +2549,7 @@ For example, .RS 2 .RS .PP -\f[CB]CN=Java\ Duke,\ OU=Java\ Software\ Division,\ O=Oracle\ Corporation,\ C=US\f[R] +\f[V]CN=Java Duke, OU=Java Software Division, O=Oracle Corporation, C=US\f[R] .RE .PP These refer to the subject\[aq]s common name (CN), organizational unit @@ -2565,37 +2561,36 @@ being named with an algorithm identifier that specifies which public key crypto system this key belongs to and any associated key parameters. .RE .TP -.B Certificate Chains -The \f[CB]keytool\f[R] command can create and manage keystore key entries +Certificate Chains +The \f[V]keytool\f[R] command can create and manage keystore key entries that each contain a private key and an associated certificate chain. The first certificate in the chain contains the public key that corresponds to the private key. .RS .PP When keys are first generated, the chain usually starts off containing a -single element, a self\-signed certificate. -See \-genkeypair in \f[B]Commands\f[R]. -A self\-signed certificate is one for which the issuer (signer) is the +single element, a self-signed certificate. +See -genkeypair in \f[B]Commands\f[R]. +A self-signed certificate is one for which the issuer (signer) is the same as the subject. The subject is the entity whose public key is being authenticated by the certificate. -When the \f[CB]\-genkeypair\f[R] command is called to generate a new -public/private key pair, it also wraps the public key into a -self\-signed certificate (unless the \f[CB]\-signer\f[R] option is -specified). +When the \f[V]-genkeypair\f[R] command is called to generate a new +public/private key pair, it also wraps the public key into a self-signed +certificate (unless the \f[V]-signer\f[R] option is specified). .PP Later, after a Certificate Signing Request (CSR) was generated with the -\f[CB]\-certreq\f[R] command and sent to a Certification Authority (CA), -the response from the CA is imported with \f[CB]\-importcert\f[R], and the -self\-signed certificate is replaced by a chain of certificates. +\f[V]-certreq\f[R] command and sent to a Certification Authority (CA), +the response from the CA is imported with \f[V]-importcert\f[R], and the +self-signed certificate is replaced by a chain of certificates. At the bottom of the chain is the certificate (reply) issued by the CA authenticating the subject\[aq]s public key. The next certificate in the chain is one that authenticates the CA\[aq]s public key. .PP -In many cases, this is a self\-signed certificate, which is a -certificate from the CA authenticating its own public key, and the last -certificate in the chain. +In many cases, this is a self-signed certificate, which is a certificate +from the CA authenticating its own public key, and the last certificate +in the chain. In other cases, the CA might return a chain of certificates. In this case, the bottom certificate in the chain is the same (a certificate signed by the CA, authenticating the public key of the key @@ -2603,8 +2598,8 @@ entry), but the second certificate in the chain is a certificate signed by a different CA that authenticates the public key of the CA you sent the CSR to. The next certificate in the chain is a certificate that authenticates -the second CA\[aq]s key, and so on, until a self\-signed root -certificate is reached. +the second CA\[aq]s key, and so on, until a self-signed root certificate +is reached. Each certificate in the chain (after the first) authenticates the public key of the signer of the previous certificate in the chain. .PP @@ -2615,71 +2610,71 @@ certificate information already stored in the keystore. .PP A different reply format (defined by the PKCS #7 standard) includes the supporting certificate chain in addition to the issued certificate. -Both reply formats can be handled by the \f[CB]keytool\f[R] command. +Both reply formats can be handled by the \f[V]keytool\f[R] command. .PP -The top\-level (root) CA certificate is self\-signed. +The top-level (root) CA certificate is self-signed. However, the trust into the root\[aq]s public key doesn\[aq]t come from the root certificate itself, but from other sources such as a newspaper. -This is because anybody could generate a self\-signed certificate with +This is because anybody could generate a self-signed certificate with the distinguished name of, for example, the DigiCert root CA. The root CA public key is widely known. The only reason it is stored in a certificate is because this is the format understood by most tools, so the certificate in this case is only used as a vehicle to transport the root CA\[aq]s public key. Before you add the root CA certificate to your keystore, you should view -it with the \f[CB]\-printcert\f[R] option and compare the displayed -fingerprint with the well\-known fingerprint obtained from a newspaper, +it with the \f[V]-printcert\f[R] option and compare the displayed +fingerprint with the well-known fingerprint obtained from a newspaper, the root CA\[aq]s Web page, and so on. .RE .TP -.B cacerts Certificates File -A certificates file named \f[CB]cacerts\f[R] resides in the security +cacerts Certificates File +A certificates file named \f[V]cacerts\f[R] resides in the security properties directory: .RS .IP \[bu] 2 -\f[B]Linux and OS X:\f[R] \f[I]JAVA_HOME\f[R]\f[CB]/lib/security\f[R] +\f[B]Linux and OS X:\f[R] \f[I]JAVA_HOME\f[R]\f[V]/lib/security\f[R] .IP \[bu] 2 -\f[B]Windows:\f[R] \f[I]JAVA_HOME\f[R]\f[CB]\\lib\\security\f[R] +\f[B]Windows:\f[R] \f[I]JAVA_HOME\f[R]\f[V]\[rs]lib\[rs]security\f[R] .PP -The \f[CB]cacerts\f[R] file represents a system\-wide keystore with CA +The \f[V]cacerts\f[R] file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file with the -\f[CB]keytool\f[R] command by specifying \f[CB]jks\f[R] as the keystore +\f[V]keytool\f[R] command by specifying \f[V]jks\f[R] as the keystore type. -The \f[CB]cacerts\f[R] keystore file ships with a default set of root CA +The \f[V]cacerts\f[R] keystore file ships with a default set of root CA certificates. For Linux, OS X, and Windows, you can list the default certificates with the following command: .RS .PP -\f[CB]keytool\ \-list\ \-cacerts\f[R] +\f[V]keytool -list -cacerts\f[R] .RE .PP -The initial password of the \f[CB]cacerts\f[R] keystore file is -\f[CB]changeit\f[R]. +The initial password of the \f[V]cacerts\f[R] keystore file is +\f[V]changeit\f[R]. System administrators should change that password and the default access permission of that file upon installing the SDK. .PP \f[B]Note:\f[R] .PP -It is important to verify your \f[CB]cacerts\f[R] file. -Because you trust the CAs in the \f[CB]cacerts\f[R] file as entities for +It is important to verify your \f[V]cacerts\f[R] file. +Because you trust the CAs in the \f[V]cacerts\f[R] file as entities for signing and issuing certificates to other entities, you must manage the -\f[CB]cacerts\f[R] file carefully. -The \f[CB]cacerts\f[R] file should contain only certificates of the CAs +\f[V]cacerts\f[R] file carefully. +The \f[V]cacerts\f[R] file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates -bundled in the \f[CB]cacerts\f[R] file and make your own trust decisions. +bundled in the \f[V]cacerts\f[R] file and make your own trust decisions. .PP -To remove an untrusted CA certificate from the \f[CB]cacerts\f[R] file, -use the \f[CB]\-delete\f[R] option of the \f[CB]keytool\f[R] command. -You can find the \f[CB]cacerts\f[R] file in the JDK\[aq]s -\f[CB]$JAVA_HOME/lib/security\f[R] directory. +To remove an untrusted CA certificate from the \f[V]cacerts\f[R] file, +use the \f[V]-delete\f[R] option of the \f[V]keytool\f[R] command. +You can find the \f[V]cacerts\f[R] file in the JDK\[aq]s +\f[V]$JAVA_HOME/lib/security\f[R] directory. Contact your system administrator if you don\[aq]t have permission to edit this file. .RE .TP -.B Internet RFC 1421 Certificate Encoding Standard +Internet RFC 1421 Certificate Encoding Standard Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. @@ -2688,17 +2683,17 @@ export certificates to other applications by email or through some other mechanism. .RS .PP -Certificates read by the \f[CB]\-importcert\f[R] and \f[CB]\-printcert\f[R] +Certificates read by the \f[V]-importcert\f[R] and \f[V]-printcert\f[R] commands can be in either this format or binary encoded. -The \f[CB]\-exportcert\f[R] command by default outputs a certificate in +The \f[V]-exportcert\f[R] command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable -encoding format, when the \f[CB]\-rfc\f[R] option is specified. +encoding format, when the \f[V]-rfc\f[R] option is specified. .PP -The \f[CB]\-list\f[R] command by default prints the SHA\-256 fingerprint -of a certificate. -If the \f[CB]\-v\f[R] option is specified, then the certificate is printed -in human\-readable format. -If the \f[CB]\-rfc\f[R] option is specified, then the certificate is +The \f[V]-list\f[R] command by default prints the SHA-256 fingerprint of +a certificate. +If the \f[V]-v\f[R] option is specified, then the certificate is printed +in human-readable format. +If the \f[V]-rfc\f[R] option is specified, then the certificate is output in the printable encoding format. .PP In its printable encoding format, the encoded certificate is bounded at @@ -2706,20 +2701,20 @@ the beginning and end by the following text: .IP .nf \f[CB] -\-\-\-\-\-BEGIN\ CERTIFICATE\-\-\-\-\- +-----BEGIN CERTIFICATE----- -encoded\ certificate\ goes\ here. +encoded certificate goes here. -\-\-\-\-\-END\ CERTIFICATE\-\-\-\-\- +-----END CERTIFICATE----- \f[R] .fi .RE .TP -.B X.500 Distinguished Names +X.500 Distinguished Names X.500 Distinguished Names are used to identify entities, such as those -that are named by the \f[CB]subject\f[R] and \f[CB]issuer\f[R] (signer) +that are named by the \f[V]subject\f[R] and \f[V]issuer\f[R] (signer) fields of X.509 certificates. -The \f[CB]keytool\f[R] command supports the following subparts: +The \f[V]keytool\f[R] command supports the following subparts: .RS .IP \[bu] 2 commonName: The common name of a person such as Susan Jones. @@ -2732,14 +2727,14 @@ localityName: The locality (city) name, for example, Palo Alto. .IP \[bu] 2 stateName: State or province name, for example, California. .IP \[bu] 2 -country: Two\-letter country code, for example, CH. +country: Two-letter country code, for example, CH. .PP When you supply a distinguished name string as the value of a -\f[CB]\-dname\f[R] option, such as for the \f[CB]\-genkeypair\f[R] command, +\f[V]-dname\f[R] option, such as for the \f[V]-genkeypair\f[R] command, the string must be in the following format: .RS .PP -\f[CB]CN=cName,\ OU=orgUnit,\ O=org,\ L=city,\ S=state,\ C=countryCode\f[R] +\f[V]CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode\f[R] .RE .PP All the following items represent actual values and the previous @@ -2759,13 +2754,13 @@ C=country A sample distinguished name string is: .RS .PP -\f[CB]CN=Mark\ Smith,\ OU=Java,\ O=Oracle,\ L=Cupertino,\ S=California,\ C=US\f[R] +\f[V]CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US\f[R] .RE .PP A sample command using such a string is: .RS .PP -\f[CB]keytool\ \-genkeypair\ \-dname\ "CN=Mark\ Smith,\ OU=Java,\ O=Oracle,\ L=Cupertino,\ S=California,\ C=US"\ \-alias\ mark\ \-keyalg\ rsa\f[R] +\f[V]keytool -genkeypair -dname \[dq]CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US\[dq] -alias mark -keyalg rsa\f[R] .RE .PP Case doesn\[aq]t matter for the keyword abbreviations. @@ -2776,15 +2771,15 @@ However, it isn\[aq]t necessary to have all the subcomponents. You can use a subset, for example: .RS .PP -\f[CB]CN=Smith,\ OU=Java,\ O=Oracle,\ C=US\f[R] +\f[V]CN=Smith, OU=Java, O=Oracle, C=US\f[R] .RE .PP If a distinguished name string value contains a comma, then the comma -must be escaped by a backslash (\\) character when you specify the +must be escaped by a backslash (\[rs]) character when you specify the string on a command line, as in: .RS .PP -\f[CB]cn=Jack,\ ou=Java\\,\ Product\ Development,\ o=Oracle,\ c=US\f[R] +\f[V]cn=Jack, ou=Java\[rs], Product Development, o=Oracle, c=US\f[R] .RE .PP It is never necessary to specify a distinguished name string on a @@ -2792,65 +2787,65 @@ command line. When the distinguished name is needed for a command, but not supplied on the command line, the user is prompted for each of the subcomponents. In this case, a comma doesn\[aq]t need to be escaped by a backslash -(\\). +(\[rs]). .RE .SH WARNINGS .SH IMPORTING TRUSTED CERTIFICATES WARNING .PP -\f[B]Important\f[R]: Be sure to check a certificate very carefully before -importing it as a trusted certificate. +\f[B]Important\f[R]: Be sure to check a certificate very carefully +before importing it as a trusted certificate. .PP \f[B]Windows Example:\f[R] .PP -View the certificate first with the \f[CB]\-printcert\f[R] command or the -\f[CB]\-importcert\f[R] command without the \f[CB]\-noprompt\f[R] option. +View the certificate first with the \f[V]-printcert\f[R] command or the +\f[V]-importcert\f[R] command without the \f[V]-noprompt\f[R] option. Ensure that the displayed certificate fingerprints match the expected ones. For example, suppose someone sends or emails you a certificate that you -put it in a file named \f[CB]\\tmp\\cert\f[R]. +put it in a file named \f[V]\[rs]tmp\[rs]cert\f[R]. Before you consider adding the certificate to your list of trusted -certificates, you can execute a \f[CB]\-printcert\f[R] command to view its +certificates, you can execute a \f[V]-printcert\f[R] command to view its fingerprints, as follows: .IP .nf \f[CB] -\ \ keytool\ \-printcert\ \-file\ \\tmp\\cert -\ \ \ \ Owner:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll -\ \ \ \ Issuer:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll -\ \ \ \ Serial\ Number:\ 59092b34 -\ \ \ \ Valid\ from:\ Thu\ Jun\ 24\ 18:01:13\ PDT\ 2016\ until:\ Wed\ Jun\ 23\ 17:01:13\ PST\ 2016 -\ \ \ \ Certificate\ Fingerprints: + keytool -printcert -file \[rs]tmp\[rs]cert + Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Serial Number: 59092b34 + Valid from: Thu Jun 24 18:01:13 PDT 2016 until: Wed Jun 23 17:01:13 PST 2016 + Certificate Fingerprints: -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-1:\ 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-256:\ 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90: -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4 + SHA-1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE + SHA-256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90: + 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4 \f[R] .fi .PP \f[B]Linux Example:\f[R] .PP -View the certificate first with the \f[CB]\-printcert\f[R] command or the -\f[CB]\-importcert\f[R] command without the \f[CB]\-noprompt\f[R] option. +View the certificate first with the \f[V]-printcert\f[R] command or the +\f[V]-importcert\f[R] command without the \f[V]-noprompt\f[R] option. Ensure that the displayed certificate fingerprints match the expected ones. For example, suppose someone sends or emails you a certificate that you -put it in a file named \f[CB]/tmp/cert\f[R]. +put it in a file named \f[V]/tmp/cert\f[R]. Before you consider adding the certificate to your list of trusted -certificates, you can execute a \f[CB]\-printcert\f[R] command to view its +certificates, you can execute a \f[V]-printcert\f[R] command to view its fingerprints, as follows: .IP .nf \f[CB] -\ \ keytool\ \-printcert\ \-file\ /tmp/cert -\ \ \ \ Owner:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll -\ \ \ \ Issuer:\ CN=ll,\ OU=ll,\ O=ll,\ L=ll,\ S=ll,\ C=ll -\ \ \ \ Serial\ Number:\ 59092b34 -\ \ \ \ Valid\ from:\ Thu\ Jun\ 24\ 18:01:13\ PDT\ 2016\ until:\ Wed\ Jun\ 23\ 17:01:13\ PST\ 2016 -\ \ \ \ Certificate\ Fingerprints: + keytool -printcert -file /tmp/cert + Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Serial Number: 59092b34 + Valid from: Thu Jun 24 18:01:13 PDT 2016 until: Wed Jun 23 17:01:13 PST 2016 + Certificate Fingerprints: -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-1:\ 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SHA\-256:\ 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90: -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4 + SHA-1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE + SHA-256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90: + 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4 \f[R] .fi .PP @@ -2865,22 +2860,22 @@ signed, for example, a JAR file with malicious class files inside. .PP \f[B]Note:\f[R] .PP -It isn\[aq]t required that you execute a \f[CB]\-printcert\f[R] command +It isn\[aq]t required that you execute a \f[V]-printcert\f[R] command before importing a certificate. This is because before you add a certificate to the list of trusted -certificates in the keystore, the \f[CB]\-importcert\f[R] command prints +certificates in the keystore, the \f[V]-importcert\f[R] command prints out the certificate information and prompts you to verify it. You can then stop the import operation. -However, you can do this only when you call the \f[CB]\-importcert\f[R] -command without the \f[CB]\-noprompt\f[R] option. -If the \f[CB]\-noprompt\f[R] option is specified, then there is no +However, you can do this only when you call the \f[V]-importcert\f[R] +command without the \f[V]-noprompt\f[R] option. +If the \f[V]-noprompt\f[R] option is specified, then there is no interaction with the user. .SH PASSWORDS WARNING .PP Most commands that operate on a keystore require the store password. Some commands require a private/secret key password. Passwords can be specified on the command line in the -\f[CB]\-storepass\f[R] and \f[CB]\-keypass\f[R] options. +\f[V]-storepass\f[R] and \f[V]-keypass\f[R] options. However, a password shouldn\[aq]t be specified on a command line or in a script unless it is for testing, or you are on a secure system. When you don\[aq]t specify a required password option on a command line, @@ -2893,28 +2888,28 @@ Certificate Revocation List (CRL) Profile\f[R] X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. .PP -The \f[CB]keytool\f[R] command doesn\[aq]t enforce all of these rules so +The \f[V]keytool\f[R] command doesn\[aq]t enforce all of these rules so it can generate certificates that don\[aq]t conform to the standard, -such as self\-signed certificates that would be used for internal -testing purposes. +such as self-signed certificates that would be used for internal testing +purposes. Certificates that don\[aq]t conform to the standard might be rejected by the JDK or other applications. Users should ensure that they provide the correct options for -\f[CB]\-dname\f[R], \f[CB]\-ext\f[R], and so on. +\f[V]-dname\f[R], \f[V]-ext\f[R], and so on. .SH IMPORT A NEW TRUSTED CERTIFICATE .PP -Before you add the certificate to the keystore, the \f[CB]keytool\f[R] +Before you add the certificate to the keystore, the \f[V]keytool\f[R] command verifies it by attempting to construct a chain of trust from -that certificate to a self\-signed certificate (belonging to a root CA), +that certificate to a self-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore. .PP -If the \f[CB]\-trustcacerts\f[R] option was specified, then additional +If the \f[V]-trustcacerts\f[R] option was specified, then additional certificates are considered for the chain of trust, namely the -certificates in a file named \f[CB]cacerts\f[R]. +certificates in a file named \f[V]cacerts\f[R]. .PP -If the \f[CB]keytool\f[R] command fails to establish a trust path from the -certificate to be imported up to a self\-signed certificate (either from -the keystore or the \f[CB]cacerts\f[R] file), then the certificate +If the \f[V]keytool\f[R] command fails to establish a trust path from +the certificate to be imported up to a self-signed certificate (either +from the keystore or the \f[V]cacerts\f[R] file), then the certificate information is printed, and the user is prompted to verify it by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be @@ -2922,27 +2917,27 @@ the certificate owner. Be very careful to ensure the certificate is valid before importing it as a trusted certificate. The user then has the option of stopping the import operation. -If the \f[CB]\-noprompt\f[R] option is specified, then there is no +If the \f[V]-noprompt\f[R] option is specified, then there is no interaction with the user. .SH IMPORT A CERTIFICATE REPLY .PP When you import a certificate reply, the certificate reply is validated with trusted certificates from the keystore, and optionally, the -certificates configured in the \f[CB]cacerts\f[R] keystore file when the -\f[CB]\-trustcacerts\f[R] option is specified. +certificates configured in the \f[V]cacerts\f[R] keystore file when the +\f[V]-trustcacerts\f[R] option is specified. .PP The methods of determining whether the certificate reply is trusted are as follows: .IP \[bu] 2 -If the reply is a single X.509 certificate, then the \f[CB]keytool\f[R] +If the reply is a single X.509 certificate, then the \f[V]keytool\f[R] command attempts to establish a trust chain, starting at the certificate -reply and ending at a self\-signed certificate (belonging to a root CA). +reply and ending at a self-signed certificate (belonging to a root CA). The certificate reply and the hierarchy of certificates is used to authenticate the certificate reply from the new certificate chain of aliases. If a trust chain can\[aq]t be established, then the certificate reply isn\[aq]t imported. -In this case, the \f[CB]keytool\f[R] command doesn\[aq]t print the +In this case, the \f[V]keytool\f[R] command doesn\[aq]t print the certificate and prompt the user to verify it, because it is very difficult for a user to determine the authenticity of the certificate reply. @@ -2950,27 +2945,28 @@ reply. If the reply is a PKCS #7 formatted certificate chain or a sequence of X.509 certificates, then the chain is ordered with the user certificate first followed by zero or more CA certificates. -If the chain ends with a self\-signed root CA certificate and -the\f[CB]\-trustcacerts\f[R] option was specified, the \f[CB]keytool\f[R] +If the chain ends with a self-signed root CA certificate and +the\f[V]-trustcacerts\f[R] option was specified, the \f[V]keytool\f[R] command attempts to match it with any of the trusted certificates in the -keystore or the \f[CB]cacerts\f[R] keystore file. -If the chain doesn\[aq]t end with a self\-signed root CA certificate and -the \f[CB]\-trustcacerts\f[R] option was specified, the \f[CB]keytool\f[R] +keystore or the \f[V]cacerts\f[R] keystore file. +If the chain doesn\[aq]t end with a self-signed root CA certificate and +the \f[V]-trustcacerts\f[R] option was specified, the \f[V]keytool\f[R] command tries to find one from the trusted certificates in the keystore -or the \f[CB]cacerts\f[R] keystore file and add it to the end of the +or the \f[V]cacerts\f[R] keystore file and add it to the end of the chain. -If the certificate isn\[aq]t found and the \f[CB]\-noprompt\f[R] option +If the certificate isn\[aq]t found and the \f[V]-noprompt\f[R] option isn\[aq]t specified, the information of the last certificate in the chain is printed, and the user is prompted to verify it. .PP If the public key in the certificate reply matches the user\[aq]s public -key already stored with \f[CB]alias\f[R], then the old certificate chain +key already stored with \f[V]alias\f[R], then the old certificate chain is replaced with the new certificate chain in the reply. -The old chain can only be replaced with a valid \f[CB]keypass\f[R], and so -the password used to protect the private key of the entry is supplied. +The old chain can only be replaced with a valid \f[V]keypass\f[R], and +so the password used to protect the private key of the entry is +supplied. If no password is provided, and the private key password is different from the keystore password, the user is prompted for it. .PP -This command was named \f[CB]\-import\f[R] in earlier releases. +This command was named \f[V]-import\f[R] in earlier releases. This old name is still supported in this release. -The new name, \f[CB]\-importcert\f[R], is preferred. +The new name, \f[V]-importcert\f[R], is preferred. diff --git a/src/java.rmi/share/man/rmiregistry.1 b/src/java.rmi/share/man/rmiregistry.1 index c16f0093ddb4b..d38af46972edb 100644 --- a/src/java.rmi/share/man/rmiregistry.1 +++ b/src/java.rmi/share/man/rmiregistry.1 @@ -19,39 +19,49 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "RMIREGISTRY" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "RMIREGISTRY" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -rmiregistry \- create and start a remote object registry on the -specified port on the current host +rmiregistry - create and start a remote object registry on the specified +port on the current host .SH SYNOPSIS .PP -\f[CB]rmiregistry\f[R] [\f[I]options\f[R]] [\f[I]port\f[R]] +\f[V]rmiregistry\f[R] [\f[I]options\f[R]] [\f[I]port\f[R]] .TP -.B \f[I]options\f[R] -This represents the option for the \f[CB]rmiregistry\f[R] command. +\f[I]options\f[R] +This represents the option for the \f[V]rmiregistry\f[R] command. See \f[B]Options\f[R] -.RS -.RE .TP -.B \f[I]port\f[R] +\f[I]port\f[R] The number of a port on the current host at which to start the remote object registry. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]rmiregistry\f[R] command creates and starts a remote object +The \f[V]rmiregistry\f[R] command creates and starts a remote object registry on the specified port on the current host. If the port is omitted, then the registry is started on port 1099. -The \f[CB]rmiregistry\f[R] command produces no output and is typically run -in the background, for example: +The \f[V]rmiregistry\f[R] command produces no output and is typically +run in the background, for example: .RS .PP -\f[CB]rmiregistry\ &\f[R] +\f[V]rmiregistry &\f[R] .RE .PP A remote object registry is a bootstrap naming service that\[aq]s used @@ -61,14 +71,14 @@ make remote method invocations. .PP The registry is typically used to locate the first remote object on which an application needs to call methods. -That object then provides application\-specific support for finding -other objects. +That object then provides application-specific support for finding other +objects. .PP -The methods of the \f[CB]java.rmi.registry.LocateRegistry\f[R] class are +The methods of the \f[V]java.rmi.registry.LocateRegistry\f[R] class are used to get a registry operating on the local host or local host and port. .PP -The URL\-based methods of the \f[CB]java.rmi.Naming\f[R] class operate on +The URL-based methods of the \f[V]java.rmi.Naming\f[R] class operate on a registry and can be used to: .IP \[bu] 2 Bind the specified name to a remote object @@ -84,9 +94,7 @@ Destroy the binding for the specified name that\[aq]s associated with a remote object .SH OPTIONS .TP -.B \f[CB]\-J\f[R]\f[I]option\f[R] +\f[V]-J\f[R]\f[I]option\f[R] Used with any Java option to pass the \f[I]option\f[R] following the -\f[CB]\-J\f[R] (no spaces between the \f[CB]\-J\f[R] and the option) to the +\f[V]-J\f[R] (no spaces between the \f[V]-J\f[R] and the option) to the Java interpreter. -.RS -.RE diff --git a/src/java.scripting/share/man/jrunscript.1 b/src/java.scripting/share/man/jrunscript.1 index abfe00986388b..464457ae7beec 100644 --- a/src/java.scripting/share/man/jrunscript.1 +++ b/src/java.scripting/share/man/jrunscript.1 @@ -19,13 +19,27 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JRUNSCRIPT" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JRUNSCRIPT" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jrunscript \- run a command\-line script shell that supports interactive +jrunscript - run a command-line script shell that supports interactive and batch modes .SH SYNOPSIS .PP @@ -33,143 +47,119 @@ and batch modes .PP This tool is \f[B]experimental\f[R] and unsupported. .PP -\f[CB]jrunscript\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +\f[V]jrunscript\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] .TP -.B \f[I]options\f[R] -This represents the \f[CB]jrunscript\f[R] command\-line options that can +\f[I]options\f[R] +This represents the \f[V]jrunscript\f[R] command-line options that can be used. See \f[B]Options for the jrunscript Command\f[R]. -.RS -.RE .TP -.B \f[I]arguments\f[R] +\f[I]arguments\f[R] Arguments, when used, follow immediately after options or the command name. See \f[B]Arguments\f[R]. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jrunscript\f[R] command is a language\-independent command\-line +The \f[V]jrunscript\f[R] command is a language-independent command-line script shell. -The \f[CB]jrunscript\f[R] command supports both an interactive -(read\-eval\-print) mode and a batch (\f[CB]\-f\f[R] option) mode of -script execution. -By default, JavaScript is the language used, but the \f[CB]\-l\f[R] option +The \f[V]jrunscript\f[R] command supports both an interactive +(read-eval-print) mode and a batch (\f[V]-f\f[R] option) mode of script +execution. +By default, JavaScript is the language used, but the \f[V]-l\f[R] option can be used to specify a different language. By using Java to scripting language communication, the -\f[CB]jrunscript\f[R] command supports an exploratory programming style. +\f[V]jrunscript\f[R] command supports an exploratory programming style. .PP If JavaScript is used, then before it evaluates a user defined script, -the \f[CB]jrunscript\f[R] command initializes certain built\-in functions +the \f[V]jrunscript\f[R] command initializes certain built-in functions and objects, which are documented in the API Specification for -\f[CB]jrunscript\f[R] JavaScript built\-in functions. +\f[V]jrunscript\f[R] JavaScript built-in functions. .SH OPTIONS FOR THE JRUNSCRIPT COMMAND .TP -.B \f[CB]\-cp\f[R] \f[I]path\f[R] or \f[CB]\-classpath\f[R] \f[I]path\f[R] +\f[V]-cp\f[R] \f[I]path\f[R] or \f[V]-classpath\f[R] \f[I]path\f[R] Indicates where any class files are that the script needs to access. -.RS -.RE .TP -.B \f[CB]\-D\f[R]\f[I]name\f[R]\f[CB]=\f[R]\f[I]value\f[R] +\f[V]-D\f[R]\f[I]name\f[R]\f[V]=\f[R]\f[I]value\f[R] Sets a Java system property. -.RS -.RE .TP -.B \f[CB]\-J\f[R]\f[I]flag\f[R] +\f[V]-J\f[R]\f[I]flag\f[R] Passes \f[I]flag\f[R] directly to the Java Virtual Machine where the -\f[CB]jrunscript\f[R] command is running. -.RS -.RE +\f[V]jrunscript\f[R] command is running. .TP -.B \f[CB]\-l\f[R] \f[I]language\f[R] +\f[V]-l\f[R] \f[I]language\f[R] Uses the specified scripting language. By default, JavaScript is used. To use other scripting languages, you must specify the corresponding -script engine\[aq]s JAR file with the \f[CB]\-cp\f[R] or -\f[CB]\-classpath\f[R] option. -.RS -.RE +script engine\[aq]s JAR file with the \f[V]-cp\f[R] or +\f[V]-classpath\f[R] option. .TP -.B \f[CB]\-e\f[R] \f[I]script\f[R] +\f[V]-e\f[R] \f[I]script\f[R] Evaluates the specified script. -This option can be used to run one\-line scripts that are specified +This option can be used to run one-line scripts that are specified completely on the command line. -.RS -.RE .TP -.B \f[CB]\-encoding\f[R] \f[I]encoding\f[R] +\f[V]-encoding\f[R] \f[I]encoding\f[R] Specifies the character encoding used to read script files. -.RS -.RE .TP -.B \f[CB]\-f\f[R] \f[I]script\-file\f[R] +\f[V]-f\f[R] \f[I]script-file\f[R] Evaluates the specified script file (batch mode). -.RS -.RE .TP -.B \f[CB]\-f\ \-\f[R] +\f[V]-f -\f[R] Enters interactive mode to read and evaluate a script from standard input. -.RS -.RE .TP -.B \f[CB]\-help\f[R] or \f[CB]\-?\f[R] +\f[V]-help\f[R] or \f[V]-?\f[R] Displays a help message and exits. -.RS -.RE .TP -.B \f[CB]\-q\f[R] +\f[V]-q\f[R] Lists all script engines available and exits. -.RS -.RE .SH ARGUMENTS .PP -If arguments are present and if no \f[CB]\-e\f[R] or \f[CB]\-f\f[R] option +If arguments are present and if no \f[V]-e\f[R] or \f[V]-f\f[R] option is used, then the first argument is the script file and the rest of the arguments, if any, are passed as script arguments. -If arguments and the \f[CB]\-e\f[R] or the \f[CB]\-f\f[R] option are used, +If arguments and the \f[V]-e\f[R] or the \f[V]-f\f[R] option are used, then all arguments are passed as script arguments. -If arguments \f[CB]\-e\f[R] and \f[CB]\-f\f[R] are missing, then the +If arguments \f[V]-e\f[R] and \f[V]-f\f[R] are missing, then the interactive mode is used. .SH EXAMPLE OF EXECUTING INLINE SCRIPTS .RS .PP -\f[CB]jrunscript\ \-e\ "print(\[aq]hello\ world\[aq])"\f[R] +\f[V]jrunscript -e \[dq]print(\[aq]hello world\[aq])\[dq]\f[R] .RE .RS .PP -\f[CB]jrunscript\ \-e\ "cat(\[aq]http://www.example.com\[aq])"\f[R] +\f[V]jrunscript -e \[dq]cat(\[aq]http://www.example.com\[aq])\[dq]\f[R] .RE .SH EXAMPLE OF USING SPECIFIED LANGUAGE AND EVALUATE THE SCRIPT FILE .RS .PP -\f[CB]jrunscript\ \-l\ js\ \-f\ test.js\f[R] +\f[V]jrunscript -l js -f test.js\f[R] .RE .SH EXAMPLE OF INTERACTIVE MODE .IP .nf \f[CB] jrunscript -js>\ print(\[aq]Hello\ World\\n\[aq]); -Hello\ World -js>\ 34\ +\ 55 +js> print(\[aq]Hello World\[rs]n\[aq]); +Hello World +js> 34 + 55 89.0 -js>\ t\ =\ new\ java.lang.Thread(function()\ {\ print(\[aq]Hello\ World\\n\[aq]);\ }) -Thread[Thread\-0,5,main] -js>\ t.start() -js>\ Hello\ World +js> t = new java.lang.Thread(function() { print(\[aq]Hello World\[rs]n\[aq]); }) +Thread[Thread-0,5,main] +js> t.start() +js> Hello World js> \f[R] .fi .SH RUN SCRIPT FILE WITH SCRIPT ARGUMENTS .PP -In this example, the \f[CB]test.js\f[R] file is the script file. -The \f[CB]arg1\f[R], \f[CB]arg2\f[R], and \f[CB]arg3\f[R] arguments are passed -to the script. +In this example, the \f[V]test.js\f[R] file is the script file. +The \f[V]arg1\f[R], \f[V]arg2\f[R], and \f[V]arg3\f[R] arguments are +passed to the script. The script can access these arguments with an arguments array. .RS .PP -\f[CB]jrunscript\ test.js\ arg1\ arg2\ arg3\f[R] +\f[V]jrunscript test.js arg1 arg2 arg3\f[R] .RE diff --git a/src/jdk.compiler/share/man/javac.1 b/src/jdk.compiler/share/man/javac.1 index 366252c6d35aa..945e9fd78f2d3 100644 --- a/src/jdk.compiler/share/man/javac.1 +++ b/src/jdk.compiler/share/man/javac.1 @@ -19,91 +19,102 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JAVAC" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JAVAC" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -javac \- read Java declarations and compile them into class files +javac - read Java declarations and compile them into class files .SH SYNOPSIS .PP -\f[CB]javac\f[R] [\f[I]options\f[R]] [\f[I]sourcefiles\-or\-classnames\f[R]] +\f[V]javac\f[R] [\f[I]options\f[R]] +[\f[I]sourcefiles-or-classnames\f[R]] .TP -.B \f[I]options\f[R] -Command\-line options. -.RS -.RE +\f[I]options\f[R] +Command-line options. .TP -.B \f[I]sourcefiles\-or\-classnames\f[R] -Source files to be compiled (for example, \f[CB]Shape.java\f[R]) or the +\f[I]sourcefiles-or-classnames\f[R] +Source files to be compiled (for example, \f[V]Shape.java\f[R]) or the names of previously compiled classes to be processed for annotations -(for example, \f[CB]geometry.MyShape\f[R]). -.RS -.RE +(for example, \f[V]geometry.MyShape\f[R]). .SH DESCRIPTION .PP -The \f[CB]javac\f[R] command reads \f[I]source files\f[R] that contain +The \f[V]javac\f[R] command reads \f[I]source files\f[R] that contain module, package and type declarations written in the Java programming language, and compiles them into \f[I]class files\f[R] that run on the Java Virtual Machine. .PP -The \f[CB]javac\f[R] command can also \f[B]process annotations\f[R] in Java -source files and classes. +The \f[V]javac\f[R] command can also \f[B]process annotations\f[R] in +Java source files and classes. .PP -Source files must have a file name extension of \f[CB]\&.java\f[R]. -Class files have a file name extension of \f[CB]\&.class\f[R]. +Source files must have a file name extension of \f[V].java\f[R]. +Class files have a file name extension of \f[V].class\f[R]. Both source and class files normally have file names that identify the contents. -For example, a class called \f[CB]Shape\f[R] would be declared in a source -file called \f[CB]Shape.java\f[R], and compiled into a class file called -\f[CB]Shape.class\f[R]. +For example, a class called \f[V]Shape\f[R] would be declared in a +source file called \f[V]Shape.java\f[R], and compiled into a class file +called \f[V]Shape.class\f[R]. .PP -There are two ways to specify source files to \f[CB]javac\f[R]: +There are two ways to specify source files to \f[V]javac\f[R]: .IP \[bu] 2 For a small number of source files, you can list their file names on the command line. .IP \[bu] 2 For a large number of source files, you can use the -\f[B]\f[BC]\@\f[B]\f[BI]filename\f[B]\f[R] option on the command line to -specify an \f[I]argument file\f[R] that lists their file names. +\f[B]\f[VB]\[at]\f[B]\f[BI]filename\f[B]\f[R] option on the command line +to specify an \f[I]argument file\f[R] that lists their file names. See \f[B]Standard Options\f[R] for a description of the option and -\f[B]Command\-Line Argument Files\f[R] for a description of -\f[CB]javac\f[R] argument files. +\f[B]Command-Line Argument Files\f[R] for a description of +\f[V]javac\f[R] argument files. .PP The order of source files specified on the command line or in an argument file is not important. -\f[CB]javac\f[R] will compile the files together, as a group, and will +\f[V]javac\f[R] will compile the files together, as a group, and will automatically resolve any dependencies between the declarations in the various source files. .PP -\f[CB]javac\f[R] expects that source files are arranged in one or more +\f[V]javac\f[R] expects that source files are arranged in one or more directory hierarchies on the file system, described in \f[B]Arrangement of Source Code\f[R]. .PP -To compile a source file, \f[CB]javac\f[R] needs to find the declaration +To compile a source file, \f[V]javac\f[R] needs to find the declaration of every class or interface that is used, extended, or implemented by the code in the source file. -This lets \f[CB]javac\f[R] check that the code has the right to access +This lets \f[V]javac\f[R] check that the code has the right to access those classes and interfaces. Rather than specifying the source files of those classes and interfaces -explicitly, you can use command\-line options to tell \f[CB]javac\f[R] +explicitly, you can use command-line options to tell \f[V]javac\f[R] where to search for their source files. If you have compiled those source files previously, you can use options -to tell \f[CB]javac\f[R] where to search for the corresponding class +to tell \f[V]javac\f[R] where to search for the corresponding class files. -The options, which all have names ending in "path", are described in -\f[B]Standard Options\f[R], and further described in \f[B]Configuring a -Compilation\f[R] and \f[B]Searching for Module, Package and Type -Declarations\f[R]. +The options, which all have names ending in \[dq]path\[dq], are +described in \f[B]Standard Options\f[R], and further described in +\f[B]Configuring a Compilation\f[R] and \f[B]Searching for Module, +Package and Type Declarations\f[R]. .PP -By default, \f[CB]javac\f[R] compiles each source file to a class file in +By default, \f[V]javac\f[R] compiles each source file to a class file in the same directory as the source file. However, it is recommended to specify a separate destination directory -with the \f[B]\f[BC]\-d\f[B]\f[R] option. +with the \f[B]\f[VB]-d\f[B]\f[R] option. .PP -Command\-line \f[B]options\f[R] and \f[B]environment variables\f[R] also -control how \f[CB]javac\f[R] performs various tasks: +Command-line \f[B]options\f[R] and \f[B]environment variables\f[R] also +control how \f[V]javac\f[R] performs various tasks: .IP \[bu] 2 Compiling code to run on earlier releases of the JDK. .IP \[bu] 2 @@ -111,120 +122,114 @@ Compiling code to run under a debugger. .IP \[bu] 2 Checking for stylistic issues in Java source code. .IP \[bu] 2 -Checking for problems in \f[CB]javadoc\f[R] comments -(\f[CB]/**\ ...\ */\f[R]). +Checking for problems in \f[V]javadoc\f[R] comments +(\f[V]/** ... */\f[R]). .IP \[bu] 2 Processing annotations in source files and class files. .IP \[bu] 2 -Upgrading and patching modules in the compile\-time environment. +Upgrading and patching modules in the compile-time environment. .PP -\f[CB]javac\f[R] supports \f[B]Compiling for Earlier Releases Of The +\f[V]javac\f[R] supports \f[B]Compiling for Earlier Releases Of The Platform\f[R] and can also be invoked from Java code using one of a number of \f[B]APIs\f[R] .SH OPTIONS .PP -\f[CB]javac\f[R] provides \f[B]standard options\f[R], and \f[B]extra -options\f[R] that are either non\-standard or are for advanced use. +\f[V]javac\f[R] provides \f[B]standard options\f[R], and \f[B]extra +options\f[R] that are either non-standard or are for advanced use. .PP Some options take one or more arguments. If an argument contains spaces or other whitespace characters, the value should be quoted according to the conventions of the environment being used to invoke javac. -If the option begins with a single dash (\f[CB]\-\f[R]) the argument +If the option begins with a single dash (\f[V]-\f[R]) the argument should either directly follow the option name, or should be separated -with a colon (\f[CB]:\f[R]) or whitespace, depending on the option. -If the option begins with a double dash (\f[CB]\-\-\f[R]), the argument -may be separated either by whitespace or by an equals (\f[CB]=\f[R]) +with a colon (\f[V]:\f[R]) or whitespace, depending on the option. +If the option begins with a double dash (\f[V]--\f[R]), the argument may +be separated either by whitespace or by an equals (\f[V]=\f[R]) character with no additional whitespace. For example, .IP .nf \f[CB] -\-Aname="J.\ Duke" -\-proc:only -\-d\ myDirectory -\-\-module\-version\ 3 -\-\-module\-version=3 +-Aname=\[dq]J. Duke\[dq] +-proc:only +-d myDirectory +--module-version 3 +--module-version=3 \f[R] .fi .PP In the following lists of options, an argument of \f[I]path\f[R] represents a search path, composed of a list of file system locations separated by the platform path separator character, (semicolon -\f[CB];\f[R] on Windows, or colon \f[CB]:\f[R] on other systems.) Depending -on the option, the file system locations may be directories, JAR files -or JMOD files. +\f[V];\f[R] on Windows, or colon \f[V]:\f[R] on other systems.) +Depending on the option, the file system locations may be directories, +JAR files or JMOD files. .SS Standard Options .TP -.B \f[CB]\@\f[R]\f[I]filename\f[R] +\f[V]\[at]\f[R]\f[I]filename\f[R] Reads options and file names from a file. -To shorten or simplify the \f[CB]javac\f[R] command, you can specify one -or more files that contain arguments to the \f[CB]javac\f[R] command -(except \f[B]\f[BC]\-J\f[B]\f[R] options). -This lets you to create \f[CB]javac\f[R] commands of any length on any +To shorten or simplify the \f[V]javac\f[R] command, you can specify one +or more files that contain arguments to the \f[V]javac\f[R] command +(except \f[B]\f[VB]-J\f[B]\f[R] options). +This lets you to create \f[V]javac\f[R] commands of any length on any operating system. -See \f[B]Command\-Line Argument Files\f[R]. -.RS -.RE +See \f[B]Command-Line Argument Files\f[R]. .TP -.B \f[CB]\-A\f[R]\f[I]key\f[R][\f[CB]=\f[R]\f[I]value\f[R]] +\f[V]-A\f[R]\f[I]key\f[R][\f[V]=\f[R]\f[I]value\f[R]] Specifies options to pass to annotation processors. -These options are not interpreted by \f[CB]javac\f[R] directly, but are +These options are not interpreted by \f[V]javac\f[R] directly, but are made available for use by individual processors. The \f[I]key\f[R] value should be one or more identifiers separated by a -dot (\f[CB]\&.\f[R]). -.RS -.RE +dot (\f[V].\f[R]). .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R]\f[CB],\f[R]\f[I]module\f[R] +\f[V]--add-modules\f[R] \f[I]module\f[R]\f[V],\f[R]\f[I]module\f[R] Specifies root modules to resolve in addition to the initial modules, or all modules on the module path if \f[I]module\f[R] is -\f[CB]ALL\-MODULE\-PATH\f[R]. -.RS -.RE +\f[V]ALL-MODULE-PATH\f[R]. .TP -.B \f[CB]\-\-boot\-class\-path\f[R] \f[I]path\f[R] or \f[CB]\-bootclasspath\f[R] \f[I]path\f[R] +\f[V]--boot-class-path\f[R] \f[I]path\f[R] or \f[V]-bootclasspath\f[R] \f[I]path\f[R] Overrides the location of the bootstrap class files. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. -For JDK 9 or later, see \f[B]\f[BC]\-\-system\f[B]\f[R]. +For JDK 9 or later, see \f[B]\f[VB]--system\f[B]\f[R]. .RE .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R], \f[CB]\-classpath\f[R] \f[I]path\f[R], or \f[CB]\-cp\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R], \f[V]-classpath\f[R] \f[I]path\f[R], or \f[V]-cp\f[R] \f[I]path\f[R] Specifies where to find user class files and annotation processors. -This class path overrides the user class path in the \f[CB]CLASSPATH\f[R] +This class path overrides the user class path in the \f[V]CLASSPATH\f[R] environment variable. .RS .IP \[bu] 2 -If \f[CB]\-\-class\-path\f[R], \f[CB]\-classpath\f[R], or \f[CB]\-cp\f[R] are +If \f[V]--class-path\f[R], \f[V]-classpath\f[R], or \f[V]-cp\f[R] are not specified, then the user class path is the value of the -\f[CB]CLASSPATH\f[R] environment variable, if that is set, or else the +\f[V]CLASSPATH\f[R] environment variable, if that is set, or else the current directory. .IP \[bu] 2 If not compiling code for modules, if the -\f[B]\f[BC]\-\-source\-path\f[B]\f[R] or \-sourcepath` option is not +\f[B]\f[VB]--source-path\f[B]\f[R] or -sourcepath\[ga] option is not specified, then the user class path is also searched for source files. .IP \[bu] 2 -If the \f[B]\f[BC]\-processorpath\f[B]\f[R] option is not specified, then +If the \f[B]\f[VB]-processorpath\f[B]\f[R] option is not specified, then the class path is also searched for annotation processors. .RE .TP -.B \f[CB]\-d\f[R] \f[I]directory\f[R] +\f[V]-d\f[R] \f[I]directory\f[R] Sets the destination directory (or \f[I]class output directory\f[R]) for class files. -If a class is part of a package, then \f[CB]javac\f[R] puts the class file -in a subdirectory that reflects the module name (if appropriate) and -package name. +If a class is part of a package, then \f[V]javac\f[R] puts the class +file in a subdirectory that reflects the module name (if appropriate) +and package name. The directory, and any necessary subdirectories, will be created if they do not already exist. .RS .PP -If the \f[CB]\-d\f[R] option is not specified, then \f[CB]javac\f[R] puts +If the \f[V]-d\f[R] option is not specified, then \f[V]javac\f[R] puts each class file in the same directory as the source file from which it was generated. .PP @@ -242,50 +247,45 @@ When not compiling for modules, for backwards compatibility, the directory is \f[I]not\f[R] automatically checked for previously compiled classes, and so it is recommended to specify the class output directory as one of the locations on the user class path, using the -\f[CB]\-\-class\-path\f[R] option or one of its alternate forms. +\f[V]--class-path\f[R] option or one of its alternate forms. .RE .TP -.B \f[CB]\-deprecation\f[R] +\f[V]-deprecation\f[R] Shows a description of each use or override of a deprecated member or class. -Without the \f[CB]\-deprecation\f[R] option, \f[CB]javac\f[R] shows a +Without the \f[V]-deprecation\f[R] option, \f[V]javac\f[R] shows a summary of the source files that use or override deprecated members or classes. -The \f[CB]\-deprecation\f[R] option is shorthand for -\f[CB]\-Xlint:deprecation\f[R]. -.RS -.RE +The \f[V]-deprecation\f[R] option is shorthand for +\f[V]-Xlint:deprecation\f[R]. .TP -.B \f[CB]\-\-enable\-preview\f[R] +\f[V]--enable-preview\f[R] Enables preview language features. -Used in conjunction with either \f[B]\f[BC]\-source\f[B]\f[R] or -\f[B]\f[BC]\-\-release\f[B]\f[R]. -.RS -.RE +Used in conjunction with either \f[B]\f[VB]-source\f[B]\f[R] or +\f[B]\f[VB]--release\f[B]\f[R]. .TP -.B \f[CB]\-encoding\f[R] \f[I]encoding\f[R] -Specifies character encoding used by source files, such as EUC\-JP and -UTF\-8. -If the \f[CB]\-encoding\f[R] option is not specified, then the platform +\f[V]-encoding\f[R] \f[I]encoding\f[R] +Specifies character encoding used by source files, such as EUC-JP and +UTF-8. +If the \f[V]-encoding\f[R] option is not specified, then the platform default converter is used. -.RS -.RE .TP -.B \f[CB]\-endorseddirs\f[R] \f[I]directories\f[R] +\f[V]-endorseddirs\f[R] \f[I]directories\f[R] Overrides the location of the endorsed standards path. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-extdirs\f[R] \f[I]directories\f[R] +\f[V]-extdirs\f[R] \f[I]directories\f[R] Overrides the location of the installed extensions. -\f[CB]directories\f[R] is a list of directories, separated by the platform -path separator (\f[CB];\f[R] on Windows, and \f[CB]:\f[R] otherwise). +\f[V]directories\f[R] is a list of directories, separated by the +platform path separator (\f[V];\f[R] on Windows, and \f[V]:\f[R] +otherwise). Each JAR file in the specified directories is searched for class files. All JAR files found become part of the class path. .RS @@ -297,51 +297,41 @@ See [Compiling for Other Releases of the Platform]. .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-g\f[R] +\f[V]-g\f[R] Generates all debugging information, including local variables. By default, only line number and source file information is generated. -.RS -.RE .TP -.B \f[CB]\-g:\f[R][\f[CB]lines\f[R], \f[CB]vars\f[R], \f[CB]source\f[R]] +\f[V]-g:\f[R][\f[V]lines\f[R], \f[V]vars\f[R], \f[V]source\f[R]] Generates only the kinds of debugging information specified by the -comma\-separated list of keywords. +comma-separated list of keywords. Valid keywords are: .RS .TP -.B \f[CB]lines\f[R] +\f[V]lines\f[R] Line number debugging information. -.RS -.RE .TP -.B \f[CB]vars\f[R] +\f[V]vars\f[R] Local variable debugging information. -.RS -.RE .TP -.B \f[CB]source\f[R] +\f[V]source\f[R] Source file debugging information. -.RS -.RE .RE .TP -.B \f[CB]\-g:none\f[R] +\f[V]-g:none\f[R] Does not generate debugging information. -.RS -.RE .TP -.B \f[CB]\-h\f[R] \f[I]directory\f[R] +\f[V]-h\f[R] \f[I]directory\f[R] Specifies where to place generated native header files. .RS .PP 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 \f[B]\f[BC]java.lang.annotation.Native\f[B]\f[R] +annotated with the \f[B]\f[VB]java.lang.annotation.Native\f[B]\f[R] annotation. If the class is part of a package, then the compiler puts the native header file in a subdirectory that reflects the module name (if @@ -350,138 +340,110 @@ The directory, and any necessary subdirectories, will be created if they do not already exist. .RE .TP -.B \f[CB]\-\-help\f[R], \f[CB]\-help\f[R] or \f[CB]\-?\f[R] +\f[V]--help\f[R], \f[V]-help\f[R] or \f[V]-?\f[R] Prints a synopsis of the standard options. -.RS -.RE .TP -.B \f[CB]\-\-help\-extra\f[R] or \f[CB]\-X\f[R] +\f[V]--help-extra\f[R] or \f[V]-X\f[R] Prints a synopsis of the set of extra options. -.RS -.RE .TP -.B \f[CB]\-\-help\-lint\f[R] -Prints the supported keys for the \f[CB]\-Xlint\f[R] option. -.RS -.RE +\f[V]--help-lint\f[R] +Prints the supported keys for the \f[V]-Xlint\f[R] option. .TP -.B \f[CB]\-implicit:\f[R][\f[CB]none\f[R], \f[CB]class\f[R]] +\f[V]-implicit:\f[R][\f[V]none\f[R], \f[V]class\f[R]] Specifies whether or not to generate class files for implicitly referenced files: .RS .IP \[bu] 2 -\f[CB]\-implicit:class\f[R] \-\-\- Automatically generates class files. +\f[V]-implicit:class\f[R] --- Automatically generates class files. .IP \[bu] 2 -\f[CB]\-implicit:none\f[R] \-\-\- Suppresses class file generation. +\f[V]-implicit:none\f[R] --- Suppresses class file generation. .PP If this option is not 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 is not issued when the \f[CB]\-implicit\f[R] option is +The warning is not issued when the \f[V]-implicit\f[R] option is explicitly set. See \f[B]Searching for Module, Package and Type Declarations\f[R]. .RE .TP -.B \f[CB]\-J\f[R]\f[I]option\f[R] +\f[V]-J\f[R]\f[I]option\f[R] Passes \f[I]option\f[R] to the runtime system, where \f[I]option\f[R] is one of the Java options described on \f[B]java\f[R] command. -For example, \f[CB]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB. .RS .PP -\f[B]Note:\f[R] The \f[CB]CLASSPATH\f[R] environment variable, -\f[CB]\-classpath\f[R] option, \f[CB]\-bootclasspath\f[R] option, and -\f[CB]\-extdirs\f[R] option do not specify the classes used to run -\f[CB]javac\f[R]. +\f[B]Note:\f[R] The \f[V]CLASSPATH\f[R] environment variable, +\f[V]-classpath\f[R] option, \f[V]-bootclasspath\f[R] option, and +\f[V]-extdirs\f[R] option do not specify the classes used to run +\f[V]javac\f[R]. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want. If you must customize the compiler implementation, then use the -\f[CB]\-J\f[R] option to pass options through to the underlying Java +\f[V]-J\f[R] option to pass options through to the underlying Java launcher. .RE .TP -.B \f[CB]\-\-limit\-modules\f[R] \f[I]module\f[R]\f[CB],\f[R]\f[I]module\f[R]* +\f[V]--limit-modules\f[R] \f[I]module\f[R]\f[V],\f[R]\f[I]module\f[R]* Limits the universe of observable modules. -.RS -.RE .TP -.B \f[CB]\-\-module\f[R] \f[I]module\-name\f[R] (\f[CB],\f[R]\f[I]module\-name\f[R])* or \f[CB]\-m\f[R] \f[I]module\-name\f[R] (\f[CB],\f[R]\f[I]module\-name\f[R])* +\f[V]--module\f[R] \f[I]module-name\f[R] (\f[V],\f[R]\f[I]module-name\f[R])* or \f[V]-m\f[R] \f[I]module-name\f[R] (\f[V],\f[R]\f[I]module-name\f[R])* Compiles those source files in the named modules that are newer than the corresponding files in the output directory. -.RS -.RE .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]path\f[R] or \f[CB]\-p\f[R] \f[I]path\f[R] +\f[V]--module-path\f[R] \f[I]path\f[R] or \f[V]-p\f[R] \f[I]path\f[R] Specifies where to find application modules. -.RS -.RE .TP -.B \f[CB]\-\-module\-source\-path\f[R] \f[I]module\-source\-path\f[R] +\f[V]--module-source-path\f[R] \f[I]module-source-path\f[R] Specifies where to find source files when compiling code in multiple modules. See [Compilation Modes] and \f[B]The Module Source Path Option\f[R]. -.RS -.RE .TP -.B \f[CB]\-\-module\-version\f[R] \f[I]version\f[R] +\f[V]--module-version\f[R] \f[I]version\f[R] Specifies the version of modules that are being compiled. -.RS -.RE .TP -.B \f[CB]\-nowarn\f[R] +\f[V]-nowarn\f[R] Disables warning messages. -This option operates the same as the \f[CB]\-Xlint:none\f[R] option. -.RS -.RE +This option operates the same as the \f[V]-Xlint:none\f[R] option. .TP -.B \f[CB]\-parameters\f[R] +\f[V]-parameters\f[R] Generates metadata for reflection on method parameters. Stores formal parameter names of constructors and methods in the generated class file so that the method -\f[CB]java.lang.reflect.Executable.getParameters\f[R] from the Reflection +\f[V]java.lang.reflect.Executable.getParameters\f[R] from the Reflection API can retrieve them. -.RS -.RE .TP -.B \f[CB]\-proc:\f[R][\f[CB]none\f[R], \f[CB]only\f[R]] +\f[V]-proc:\f[R][\f[V]none\f[R], \f[V]only\f[R]] Controls whether annotation processing and compilation are done. -\f[CB]\-proc:none\f[R] means that compilation takes place without +\f[V]-proc:none\f[R] means that compilation takes place without annotation processing. -\f[CB]\-proc:only\f[R] means that only annotation processing is done, +\f[V]-proc:only\f[R] means that only annotation processing is done, without any subsequent compilation. -.RS -.RE .TP -.B \f[CB]\-processor\f[R] \f[I]class1\f[R][\f[CB],\f[R]\f[I]class2\f[R]\f[CB],\f[R]\f[I]class3\f[R]...] +\f[V]-processor\f[R] \f[I]class1\f[R][\f[V],\f[R]\f[I]class2\f[R]\f[V],\f[R]\f[I]class3\f[R]...] Names of the annotation processors to run. This bypasses the default discovery process. -.RS -.RE .TP -.B \f[CB]\-\-processor\-module\-path\f[R] \f[I]path\f[R] +\f[V]--processor-module-path\f[R] \f[I]path\f[R] Specifies the module path used for finding annotation processors. -.RS -.RE .TP -.B \f[CB]\-\-processor\-path\f[R] \f[I]path\f[R] or \f[CB]\-processorpath\f[R] \f[I]path\f[R] +\f[V]--processor-path\f[R] \f[I]path\f[R] or \f[V]-processorpath\f[R] \f[I]path\f[R] Specifies where to find annotation processors. If this option is not used, then the class path is searched for processors. -.RS -.RE .TP -.B \f[CB]\-profile\f[R] \f[I]profile\f[R] +\f[V]-profile\f[R] \f[I]profile\f[R] Checks that the API used is available in the specified profile. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-\-release\f[R] \f[I]release\f[R] +\f[V]--release\f[R] \f[I]release\f[R] Compiles source code according to the rules of the Java programming language for the specified Java SE release, generating class files which target that release. @@ -489,31 +451,31 @@ Source code is compiled against the combined Java SE and JDK API for the specified release. .RS .PP -The supported values of \f[I]release\f[R] are the current Java SE release -and a limited number of previous releases, detailed in the command\-line -help. +The supported values of \f[I]release\f[R] are the current Java SE +release and a limited number of previous releases, detailed in the +command-line help. .PP For the current release, the Java SE API consists of the -\f[CB]java.*\f[R], \f[CB]javax.*\f[R], and \f[CB]org.*\f[R] packages that are -exported by the Java SE modules in the release; the JDK API consists of -the \f[CB]com.*\f[R] and \f[CB]jdk.*\f[R] packages that are exported by the -JDK modules in the release, plus the \f[CB]javax.*\f[R] packages that are -exported by standard, but non\-Java SE, modules in the release. +\f[V]java.*\f[R], \f[V]javax.*\f[R], and \f[V]org.*\f[R] packages that +are exported by the Java SE modules in the release; the JDK API consists +of the \f[V]com.*\f[R] and \f[V]jdk.*\f[R] packages that are exported by +the JDK modules in the release, plus the \f[V]javax.*\f[R] packages that +are exported by standard, but non-Java SE, modules in the release. .PP For previous releases, the Java SE API and the JDK API are as defined in that release. .PP -\f[B]Note:\f[R] When using \f[CB]\-\-release\f[R], you cannot also use the -\f[B]\f[BC]\-\-source\f[B]\f[R]/\f[CB]\-source\f[R] or -\f[B]\f[BC]\-\-target\f[B]\f[R]/\f[CB]\-target\f[R] options. +\f[B]Note:\f[R] When using \f[V]--release\f[R], you cannot also use the +\f[B]\f[VB]--source\f[B]\f[R]/\f[V]-source\f[R] or +\f[B]\f[VB]--target\f[B]\f[R]/\f[V]-target\f[R] options. .PP -\f[B]Note:\f[R] When using \f[CB]\-\-release\f[R] to specify a release that -supports the Java Platform Module System, the \f[CB]\-\-add\-exports\f[R] +\f[B]Note:\f[R] When using \f[V]--release\f[R] to specify a release that +supports the Java Platform Module System, the \f[V]--add-exports\f[R] option cannot be used to enlarge the set of packages exported by the Java SE, JDK, and standard modules in the specified release. .RE .TP -.B \f[CB]\-s\f[R] \f[I]directory\f[R] +\f[V]-s\f[R] \f[I]directory\f[R] 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 module name (if appropriate) and @@ -530,12 +492,12 @@ contents of each module in a separate subdirectory, each organized as a package hierarchy. .RE .TP -.B \f[CB]\-\-source\f[R] \f[I]release\f[R] or \f[CB]\-source\f[R] \f[I]release\f[R] +\f[V]--source\f[R] \f[I]release\f[R] or \f[V]-source\f[R] \f[I]release\f[R] Compiles source code according to the rules of the Java programming language for the specified Java SE release. -The supported values of \f[I]release\f[R] are the current Java SE release -and a limited number of previous releases, detailed in the command\-line -help. +The supported values of \f[I]release\f[R] are the current Java SE +release and a limited number of previous releases, detailed in the +command-line help. .RS .PP If the option is not specified, the default is to compile source code @@ -543,7 +505,7 @@ according to the rules of the Java programming language for the current Java SE release. .RE .TP -.B \f[CB]\-\-source\-path\f[R] \f[I]path\f[R] or \f[CB]\-sourcepath\f[R] \f[I]path\f[R] +\f[V]--source-path\f[R] \f[I]path\f[R] or \f[V]-sourcepath\f[R] \f[I]path\f[R] Specifies where to find source files. Except when compiling multiple modules together, this is the source code path used to search for class or interface definitions. @@ -554,169 +516,148 @@ when their source files are also found. See \f[B]Searching for Module, Package and Type Declarations\f[R]. .RE .TP -.B \f[CB]\-\-system\f[R] \f[I]jdk\f[R] | \f[CB]none\f[R] +\f[V]--system\f[R] \f[I]jdk\f[R] | \f[V]none\f[R] Overrides the location of system modules. -.RS -.RE .TP -.B \f[CB]\-\-target\f[R] \f[I]release\f[R] or \f[CB]\-target\f[R] \f[I]release\f[R] -Generates \f[CB]class\f[R] files suitable for the specified Java SE +\f[V]--target\f[R] \f[I]release\f[R] or \f[V]-target\f[R] \f[I]release\f[R] +Generates \f[V]class\f[R] files suitable for the specified Java SE release. -The supported values of \f[I]release\f[R] are the current Java SE release -and a limited number of previous releases, detailed in the command\-line -help. +The supported values of \f[I]release\f[R] are the current Java SE +release and a limited number of previous releases, detailed in the +command-line help. .RS .PP \f[B]Note:\f[R] The target release must be equal to or higher than the source release. -(See \f[B]\f[BC]\-\-source\f[B]\f[R].) +(See \f[B]\f[VB]--source\f[B]\f[R].) .RE .TP -.B \f[CB]\-\-upgrade\-module\-path\f[R] \f[I]path\f[R] +\f[V]--upgrade-module-path\f[R] \f[I]path\f[R] Overrides the location of upgradeable modules. -.RS -.RE .TP -.B \f[CB]\-verbose\f[R] +\f[V]-verbose\f[R] Outputs messages about what the compiler is doing. Messages include information about each class loaded and each source file compiled. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] or \f[CB]\-version\f[R] +\f[V]--version\f[R] or \f[V]-version\f[R] Prints version information. -.RS -.RE .TP -.B \f[CB]\-Werror\f[R] +\f[V]-Werror\f[R] Terminates compilation when warnings occur. -.RS -.RE .SS Extra Options .TP -.B \f[CB]\-\-add\-exports\f[R] \f[I]module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]other\-module\f[R](\f[CB],\f[R]\f[I]other\-module\f[R])* +\f[V]--add-exports\f[R] \f[I]module\f[R]\f[V]/\f[R]\f[I]package\f[R]\f[V]=\f[R]\f[I]other-module\f[R](\f[V],\f[R]\f[I]other-module\f[R])* Specifies a package to be considered as exported from its defining module to additional modules or to all unnamed modules when the value of -\f[I]other\-module\f[R] is \f[CB]ALL\-UNNAMED\f[R]. -.RS -.RE +\f[I]other-module\f[R] is \f[V]ALL-UNNAMED\f[R]. .TP -.B \f[CB]\-\-add\-reads\f[R] \f[I]module\f[R]\f[CB]=\f[R]\f[I]other\-module\f[R](\f[CB],\f[R]\f[I]other\-module\f[R])* +\f[V]--add-reads\f[R] \f[I]module\f[R]\f[V]=\f[R]\f[I]other-module\f[R](\f[V],\f[R]\f[I]other-module\f[R])* Specifies additional modules to be considered as required by a given module. -.RS -.RE .TP -.B \f[CB]\-\-default\-module\-for\-created\-files\f[R] \f[I]module\-name\f[R] +\f[V]--default-module-for-created-files\f[R] \f[I]module-name\f[R] Specifies the fallback target module for files created by annotation processors, if none is specified or inferred. -.RS -.RE .TP -.B \f[CB]\-Djava.endorsed.dirs=\f[R]\f[I]dirs\f[R] +\f[V]-Djava.endorsed.dirs=\f[R]\f[I]dirs\f[R] Overrides the location of the endorsed standards path. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-Djava.ext.dirs=\f[R]\f[I]dirs\f[R] +\f[V]-Djava.ext.dirs=\f[R]\f[I]dirs\f[R] Overrides the location of installed extensions. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-\-patch\-module\f[R] \f[I]module\f[R]\f[CB]=\f[R]\f[I]path\f[R] +\f[V]--patch-module\f[R] \f[I]module\f[R]\f[V]=\f[R]\f[I]path\f[R] Overrides or augments a module with classes and resources in JAR files or directories. -.RS -.RE .TP -.B \f[CB]\-Xbootclasspath:\f[R]\f[I]path\f[R] +\f[V]-Xbootclasspath:\f[R]\f[I]path\f[R] Overrides the location of the bootstrap class files. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-Xbootclasspath/a:\f[R]\f[I]path\f[R] +\f[V]-Xbootclasspath/a:\f[R]\f[I]path\f[R] Adds a suffix to the bootstrap class path. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-Xbootclasspath/p:\f[R]\f[I]path\f[R] +\f[V]-Xbootclasspath/p:\f[R]\f[I]path\f[R] Adds a prefix to the bootstrap class path. .RS .PP \f[B]Note:\f[R] This can only be used when compiling for releases prior to JDK 9. -As applicable, see the descriptions in \f[B]\f[BC]\-\-release\f[B]\f[R], -\f[B]\f[BC]\-source\f[B]\f[R], or \f[B]\f[BC]\-target\f[B]\f[R] for +As applicable, see the descriptions in \f[B]\f[VB]--release\f[B]\f[R], +\f[B]\f[VB]-source\f[B]\f[R], or \f[B]\f[VB]-target\f[B]\f[R] for details. .RE .TP -.B \f[CB]\-Xdiags:\f[R][\f[CB]compact\f[R], \f[CB]verbose\f[R]] +\f[V]-Xdiags:\f[R][\f[V]compact\f[R], \f[V]verbose\f[R]] Selects a diagnostic mode. -.RS -.RE .TP -.B \f[CB]\-Xdoclint\f[R] +\f[V]-Xdoclint\f[R] Enables recommended checks for problems in documentation comments. -.RS -.RE .TP -.B \f[CB]\-Xdoclint:\f[R](\f[CB]all\f[R]|\f[CB]none\f[R]|[\f[CB]\-\f[R]]\f[I]group\f[R])[\f[CB]/\f[R]\f[I]access\f[R]] +\f[V]-Xdoclint:\f[R](\f[V]all\f[R]|\f[V]none\f[R]|[\f[V]-\f[R]]\f[I]group\f[R])[\f[V]/\f[R]\f[I]access\f[R]] Enables or disables specific groups of checks in documentation comments. .RS .PP \f[I]group\f[R] can have one of the following values: -\f[CB]accessibility\f[R], \f[CB]html\f[R], \f[CB]missing\f[R], -\f[CB]reference\f[R], \f[CB]syntax\f[R]. +\f[V]accessibility\f[R], \f[V]html\f[R], \f[V]missing\f[R], +\f[V]reference\f[R], \f[V]syntax\f[R]. .PP The variable \f[I]access\f[R] specifies the minimum visibility level of -classes and members that the \f[CB]\-Xdoclint\f[R] option checks. +classes and members that the \f[V]-Xdoclint\f[R] option checks. It can have one of the following values (in order of most to least -visible): \f[CB]public\f[R], \f[CB]protected\f[R], \f[CB]package\f[R], -\f[CB]private\f[R]. +visible): \f[V]public\f[R], \f[V]protected\f[R], \f[V]package\f[R], +\f[V]private\f[R]. .PP -The default \f[I]access\f[R] level is \f[CB]private\f[R]. +The default \f[I]access\f[R] level is \f[V]private\f[R]. .PP -When prefixed by \f[CB]doclint:\f[R], the \f[I]group\f[R] names and -\f[CB]all\f[R] can be used with \f[CB]\@SuppressWarnings\f[R] to suppress -warnings about documentation comments in parts of the code being -compiled. +When prefixed by \f[V]doclint:\f[R], the \f[I]group\f[R] names and +\f[V]all\f[R] can be used with \f[V]\[at]SuppressWarnings\f[R] to +suppress warnings about documentation comments in parts of the code +being compiled. .PP For more information about these groups of checks, see the -\f[B]DocLint\f[R] section of the \f[CB]javadoc\f[R] command documentation. -The \f[CB]\-Xdoclint\f[R] option is disabled by default in the -\f[CB]javac\f[R] command. +\f[B]DocLint\f[R] section of the \f[V]javadoc\f[R] command +documentation. +The \f[V]-Xdoclint\f[R] option is disabled by default in the +\f[V]javac\f[R] command. .PP For example, the following option checks classes and members (with all groups of checks) that have the access level of protected and higher (which includes protected and public): .RS .PP -\f[CB]\-Xdoclint:all/protected\f[R] +\f[V]-Xdoclint:all/protected\f[R] .RE .PP The following option enables all groups of checks for all access levels, @@ -725,279 +666,257 @@ have the access level of package and higher (which includes package, protected and public): .RS .PP -\f[CB]\-Xdoclint:all,\-html/package\f[R] +\f[V]-Xdoclint:all,-html/package\f[R] .RE .RE .TP -.B \f[CB]\-Xdoclint/package:\f[R][\f[CB]\-\f[R]]\f[I]packages\f[R](\f[CB],\f[R][\f[CB]\-\f[R]]\f[I]package\f[R])* +\f[V]-Xdoclint/package:\f[R][\f[V]-\f[R]]\f[I]packages\f[R](\f[V],\f[R][\f[V]-\f[R]]\f[I]package\f[R])* Enables or disables checks in specific packages. Each \f[I]package\f[R] is either the qualified name of a package or a -package name prefix followed by \f[CB]\&.*\f[R], which expands to all -sub\-packages of the given package. -Each \f[I]package\f[R] can be prefixed with a hyphen (\f[CB]\-\f[R]) to +package name prefix followed by \f[V].*\f[R], which expands to all +sub-packages of the given package. +Each \f[I]package\f[R] can be prefixed with a hyphen (\f[V]-\f[R]) to disable checks for a specified package or packages. .RS .PP For more information, see the \f[B]DocLint\f[R] section of the -\f[CB]javadoc\f[R] command documentation. +\f[V]javadoc\f[R] command documentation. .RE .TP -.B \f[CB]\-Xlint\f[R] +\f[V]-Xlint\f[R] Enables all recommended warnings. In this release, enabling all available warnings is recommended. -.RS -.RE .TP -.B \f[CB]\-Xlint:\f[R][\f[CB]\-\f[R]]\f[I]key\f[R](\f[CB],\f[R][\f[CB]\-\f[R]]\f[I]key\f[R])* +\f[V]-Xlint:\f[R][\f[V]-\f[R]]\f[I]key\f[R](\f[V],\f[R][\f[V]-\f[R]]\f[I]key\f[R])* Supplies warnings to enable or disable, separated by comma. -Precede a key by a hyphen (\f[CB]\-\f[R]) to disable the specified +Precede a key by a hyphen (\f[V]-\f[R]) to disable the specified warning. .RS .PP Supported values for \f[I]key\f[R] are: .IP \[bu] 2 -\f[CB]all\f[R]: Enables all warnings. +\f[V]all\f[R]: Enables all warnings. .IP \[bu] 2 -\f[CB]auxiliaryclass\f[R]: Warns about an auxiliary class that is hidden +\f[V]auxiliaryclass\f[R]: Warns about an auxiliary class that is hidden in a source file, and is used from other files. .IP \[bu] 2 -\f[CB]cast\f[R]: Warns about the use of unnecessary casts. +\f[V]cast\f[R]: Warns about the use of unnecessary casts. .IP \[bu] 2 -\f[CB]classfile\f[R]: Warns about the issues related to classfile +\f[V]classfile\f[R]: Warns about the issues related to classfile contents. .IP \[bu] 2 -\f[CB]deprecation\f[R]: Warns about the use of deprecated items. +\f[V]deprecation\f[R]: Warns about the use of deprecated items. .IP \[bu] 2 -\f[CB]dep\-ann\f[R]: Warns about the items marked as deprecated in -\f[CB]javadoc\f[R] but without the \f[CB]\@Deprecated\f[R] annotation. +\f[V]dep-ann\f[R]: Warns about the items marked as deprecated in +\f[V]javadoc\f[R] but without the \f[V]\[at]Deprecated\f[R] annotation. .IP \[bu] 2 -\f[CB]divzero\f[R]: Warns about the division by the constant integer 0. +\f[V]divzero\f[R]: Warns about the division by the constant integer 0. .IP \[bu] 2 -\f[CB]empty\f[R]: Warns about an empty statement after \f[CB]if\f[R]. +\f[V]empty\f[R]: Warns about an empty statement after \f[V]if\f[R]. .IP \[bu] 2 -\f[CB]exports\f[R]: Warns about the issues regarding module exports. +\f[V]exports\f[R]: Warns about the issues regarding module exports. .IP \[bu] 2 -\f[CB]fallthrough\f[R]: Warns about the falling through from one case of a -switch statement to the next. +\f[V]fallthrough\f[R]: Warns about the falling through from one case of +a switch statement to the next. .IP \[bu] 2 -\f[CB]finally\f[R]: Warns about \f[CB]finally\f[R] clauses that do not +\f[V]finally\f[R]: Warns about \f[V]finally\f[R] clauses that do not terminate normally. .IP \[bu] 2 -\f[CB]lossy\-conversions\f[R]: Warns about possible lossy conversions -in compound assignment. -.IP \[bu] 2 -\f[CB]missing\-explicit\-ctor\f[R]: Warns about missing explicit +\f[V]missing-explicit-ctor\f[R]: Warns about missing explicit constructors in public and protected classes in exported packages. .IP \[bu] 2 -\f[CB]module\f[R]: Warns about the module system\-related issues. +\f[V]module\f[R]: Warns about the module system-related issues. .IP \[bu] 2 -\f[CB]opens\f[R]: Warns about the issues related to module opens. +\f[V]opens\f[R]: Warns about the issues related to module opens. .IP \[bu] 2 -\f[CB]options\f[R]: Warns about the issues relating to use of command line -options. +\f[V]options\f[R]: Warns about the issues relating to use of command +line options. .IP \[bu] 2 -\f[CB]overloads\f[R]: Warns about the issues related to method overloads. +\f[V]overloads\f[R]: Warns about the issues related to method overloads. .IP \[bu] 2 -\f[CB]overrides\f[R]: Warns about the issues related to method overrides. +\f[V]overrides\f[R]: Warns about the issues related to method overrides. .IP \[bu] 2 -\f[CB]path\f[R]: Warns about the invalid path elements on the command +\f[V]path\f[R]: Warns about the invalid path elements on the command line. .IP \[bu] 2 -\f[CB]preview\f[R]: Warns about the use of preview language features. +\f[V]preview\f[R]: Warns about the use of preview language features. .IP \[bu] 2 -\f[CB]processing\f[R]: Warns about the issues related to annotation +\f[V]processing\f[R]: Warns about the issues related to annotation processing. .IP \[bu] 2 -\f[CB]rawtypes\f[R]: Warns about the use of raw types. +\f[V]rawtypes\f[R]: Warns about the use of raw types. .IP \[bu] 2 -\f[CB]removal\f[R]: Warns about the use of an API that has been marked for -removal. +\f[V]removal\f[R]: Warns about the use of an API that has been marked +for removal. .IP \[bu] 2 -\f[CB]requires\-automatic\f[R]: Warns developers about the use of +\f[V]requires-automatic\f[R]: Warns developers about the use of automatic modules in requires clauses. .IP \[bu] 2 -\f[CB]requires\-transitive\-automatic\f[R]: Warns about automatic modules +\f[V]requires-transitive-automatic\f[R]: Warns about automatic modules in requires transitive. .IP \[bu] 2 -\f[CB]serial\f[R]: Warns about the serializable classes that do not +\f[V]serial\f[R]: Warns about the serializable classes that do not provide a serial version ID. -Also warns about access to non\-public members from a serializable +Also warns about access to non-public members from a serializable element. .IP \[bu] 2 -\f[CB]static\f[R]: Warns about the accessing a static member using an +\f[V]static\f[R]: Warns about the accessing a static member using an instance. .IP \[bu] 2 -\f[CB]strictfp\f[R]: Warns about unnecessary use of the \f[CB]strictfp\f[R] -modifier. +\f[V]strictfp\f[R]: Warns about unnecessary use of the +\f[V]strictfp\f[R] modifier. .IP \[bu] 2 -\f[CB]synchronization\f[R]: Warns about synchronization attempts on -instances of value\-based classes. +\f[V]synchronization\f[R]: Warns about synchronization attempts on +instances of value-based classes. .IP \[bu] 2 -\f[CB]text\-blocks\f[R]: Warns about inconsistent white space characters +\f[V]text-blocks\f[R]: Warns about inconsistent white space characters in text block indentation. .IP \[bu] 2 -\f[CB]try\f[R]: Warns about the issues relating to the use of try blocks -(that is, try\-with\-resources). +\f[V]try\f[R]: Warns about the issues relating to the use of try blocks +(that is, try-with-resources). .IP \[bu] 2 -\f[CB]unchecked\f[R]: Warns about the unchecked operations. +\f[V]unchecked\f[R]: Warns about the unchecked operations. .IP \[bu] 2 -\f[CB]varargs\f[R]: Warns about the potentially unsafe \f[CB]vararg\f[R] +\f[V]varargs\f[R]: Warns about the potentially unsafe \f[V]vararg\f[R] methods. .IP \[bu] 2 -\f[CB]none\f[R]: Disables all warnings. +\f[V]none\f[R]: Disables all warnings. .PP -With the exception of \f[CB]all\f[R] and \f[CB]none\f[R], the keys can be -used with the \f[CB]\@SuppressWarnings\f[R] annotation to suppress +With the exception of \f[V]all\f[R] and \f[V]none\f[R], the keys can be +used with the \f[V]\[at]SuppressWarnings\f[R] annotation to suppress warnings in a part of the source code being compiled. .PP -See \f[B]Examples of Using \-Xlint keys\f[R]. +See \f[B]Examples of Using -Xlint keys\f[R]. .RE .TP -.B \f[CB]\-Xmaxerrs\f[R] \f[I]number\f[R] +\f[V]-Xmaxerrs\f[R] \f[I]number\f[R] Sets the maximum number of errors to print. -.RS -.RE .TP -.B \f[CB]\-Xmaxwarns\f[R] \f[I]number\f[R] +\f[V]-Xmaxwarns\f[R] \f[I]number\f[R] Sets the maximum number of warnings to print. -.RS -.RE .TP -.B \f[CB]\-Xpkginfo:\f[R][\f[CB]always\f[R], \f[CB]legacy\f[R], \f[CB]nonempty\f[R]] -Specifies when and how the \f[CB]javac\f[R] command generates -\f[CB]package\-info.class\f[R] files from \f[CB]package\-info.java\f[R] +\f[V]-Xpkginfo:\f[R][\f[V]always\f[R], \f[V]legacy\f[R], \f[V]nonempty\f[R]] +Specifies when and how the \f[V]javac\f[R] command generates +\f[V]package-info.class\f[R] files from \f[V]package-info.java\f[R] files using one of the following options: .RS .TP -.B \f[CB]always\f[R] -Generates a \f[CB]package\-info.class\f[R] file for every -\f[CB]package\-info.java\f[R] file. +\f[V]always\f[R] +Generates a \f[V]package-info.class\f[R] file for every +\f[V]package-info.java\f[R] file. This option may be useful if you use a build system such as Ant, which -checks that each \f[CB]\&.java\f[R] file has a corresponding -\f[CB]\&.class\f[R] file. -.RS -.RE +checks that each \f[V].java\f[R] file has a corresponding +\f[V].class\f[R] file. .TP -.B \f[CB]legacy\f[R] -Generates a \f[CB]package\-info.class\f[R] file only if -\f[CB]package\-info.java\f[R] contains annotations. -This option does not generate a \f[CB]package\-info.class\f[R] file if -\f[CB]package\-info.java\f[R] contains only comments. +\f[V]legacy\f[R] +Generates a \f[V]package-info.class\f[R] file only if +\f[V]package-info.java\f[R] contains annotations. +This option does not generate a \f[V]package-info.class\f[R] file if +\f[V]package-info.java\f[R] contains only comments. .RS .PP -\f[B]Note:\f[R] A \f[CB]package\-info.class\f[R] file might be generated -but be empty if all the annotations in the \f[CB]package\-info.java\f[R] -file have \f[CB]RetentionPolicy.SOURCE\f[R]. +\f[B]Note:\f[R] A \f[V]package-info.class\f[R] file might be generated +but be empty if all the annotations in the \f[V]package-info.java\f[R] +file have \f[V]RetentionPolicy.SOURCE\f[R]. .RE .TP -.B \f[CB]nonempty\f[R] -Generates a \f[CB]package\-info.class\f[R] file only if -\f[CB]package\-info.java\f[R] contains annotations with -\f[CB]RetentionPolicy.CLASS\f[R] or \f[CB]RetentionPolicy.RUNTIME\f[R]. -.RS -.RE +\f[V]nonempty\f[R] +Generates a \f[V]package-info.class\f[R] file only if +\f[V]package-info.java\f[R] contains annotations with +\f[V]RetentionPolicy.CLASS\f[R] or \f[V]RetentionPolicy.RUNTIME\f[R]. .RE .TP -.B \f[CB]\-Xplugin:\f[R]\f[I]name\f[R] \f[I]args\f[R] -Specifies the name and optional arguments for a plug\-in to be run. -If \f[I]args\f[R] are provided, \f[I]name\f[R] and \f[I]args\f[R] should be -quoted or otherwise escape the whitespace characters between the name +\f[V]-Xplugin:\f[R]\f[I]name\f[R] \f[I]args\f[R] +Specifies the name and optional arguments for a plug-in to be run. +If \f[I]args\f[R] are provided, \f[I]name\f[R] and \f[I]args\f[R] should +be quoted or otherwise escape the whitespace characters between the name and all the arguments. For details on the API for a plugin, see the API documentation for \f[B]jdk.compiler/com.sun.source.util.Plugin\f[R]. -.RS -.RE .TP -.B \f[CB]\-Xprefer:\f[R][\f[CB]source\f[R], \f[CB]newer\f[R]] +\f[V]-Xprefer:\f[R][\f[V]source\f[R], \f[V]newer\f[R]] Specifies which file to read when both a source file and class file are found for an implicitly compiled class using one of the following options. See \f[B]Searching for Module, Package and Type Declarations\f[R]. .RS .IP \[bu] 2 -\f[CB]\-Xprefer:newer\f[R]: Reads the newer of the source or class files +\f[V]-Xprefer:newer\f[R]: Reads the newer of the source or class files for a type (default). .IP \[bu] 2 -\f[CB]\-Xprefer:source\f[R] : Reads the source file. -Use \f[CB]\-Xprefer:source\f[R] when you want to be sure that any +\f[V]-Xprefer:source\f[R] : Reads the source file. +Use \f[V]-Xprefer:source\f[R] when you want to be sure that any annotation processors can access annotations declared with a retention -policy of \f[CB]SOURCE\f[R]. +policy of \f[V]SOURCE\f[R]. .RE .TP -.B \f[CB]\-Xprint\f[R] +\f[V]-Xprint\f[R] Prints a textual representation of specified types for debugging purposes. This does not perform annotation processing or compilation. The format of the output could change. -.RS -.RE .TP -.B \f[CB]\-XprintProcessorInfo\f[R] +\f[V]-XprintProcessorInfo\f[R] Prints information about which annotations a processor is asked to process. -.RS -.RE .TP -.B \f[CB]\-XprintRounds\f[R] +\f[V]-XprintRounds\f[R] Prints information about initial and subsequent annotation processing rounds. -.RS -.RE .TP -.B \f[CB]\-Xstdout\f[R] \f[I]filename\f[R] +\f[V]-Xstdout\f[R] \f[I]filename\f[R] Sends compiler messages to the named file. -By default, compiler messages go to \f[CB]System.err\f[R]. -.RS -.RE +By default, compiler messages go to \f[V]System.err\f[R]. .SH ENVIRONMENT VARIABLES .SS CLASSPATH .PP -If the \f[B]\f[BC]\-\-class\-path\f[B]\f[R] option or any of its -alternate forms are not specified, the class path will default to the -value of the \f[CB]CLASSPATH\f[R] environment variable if it is set. +If the \f[B]\f[VB]--class-path\f[B]\f[R] option or any of its alternate +forms are not specified, the class path will default to the value of the +\f[V]CLASSPATH\f[R] environment variable if it is set. However, it is recommended that this environment variable should -\f[I]not\f[R] be set, and that the \f[CB]\-\-class\-path\f[R] option should +\f[I]not\f[R] be set, and that the \f[V]--class-path\f[R] option should be used to provide an explicit value for the class path when one is required. .SS JDK_JAVAC_OPTIONS .PP -The content of the \f[CB]JDK_JAVAC_OPTIONS\f[R] environment variable, -separated by white\-spaces ( ) or white\-space characters (\f[CB]\\n\f[R], -\f[CB]\\t\f[R], \f[CB]\\r\f[R], or \f[CB]\\f\f[R]) is prepended to the command -line arguments passed to \f[CB]javac\f[R] as a list of arguments. +The content of the \f[V]JDK_JAVAC_OPTIONS\f[R] environment variable, +separated by white-spaces ( ) or white-space characters +(\f[V]\[rs]n\f[R], \f[V]\[rs]t\f[R], \f[V]\[rs]r\f[R], or +\f[V]\[rs]f\f[R]) is prepended to the command line arguments passed to +\f[V]javac\f[R] as a list of arguments. .PP The encoding requirement for the environment variable is the same as the -\f[CB]javac\f[R] command line on the system. -\f[CB]JDK_JAVAC_OPTIONS\f[R] environment variable content is treated in +\f[V]javac\f[R] command line on the system. +\f[V]JDK_JAVAC_OPTIONS\f[R] environment variable content is treated in the same manner as that specified in the command line. .PP -Single quotes (\f[CB]\[aq]\f[R]) or double quotes (\f[CB]"\f[R]) can be used -to enclose arguments that contain whitespace characters. +Single quotes (\f[V]\[aq]\f[R]) or double quotes (\f[V]\[dq]\f[R]) can +be used to enclose arguments that contain whitespace characters. All content between the open quote and the first matching close quote are preserved by simply removing the pair of quotes. In case a matching quote is not found, the launcher will abort with an error message. -\f[CB]\@\f[R]\f[I]files\f[R] are supported as they are specified in the -command line. -However, as in \f[CB]\@\f[R]\f[I]files\f[R], use of a wildcard is not +\f[V]\[at]\f[R]\f[I]files\f[R] are supported as they are specified in +the command line. +However, as in \f[V]\[at]\f[R]\f[I]files\f[R], use of a wildcard is not supported. .PP \f[B]Examples of quoting arguments containing white spaces:\f[R] .RS .PP -\f[CB]export\ JDK_JAVAC_OPTIONS=\[aq]\@"C:\\white\ spaces\\argfile"\[aq]\f[R] +\f[V]export JDK_JAVAC_OPTIONS=\[aq]\[at]\[dq]C:\[rs]white spaces\[rs]argfile\[dq]\[aq]\f[R] .RE .RS .PP -\f[CB]export\ JDK_JAVAC_OPTIONS=\[aq]"\@C:\\white\ spaces\\argfile"\[aq]\f[R] +\f[V]export JDK_JAVAC_OPTIONS=\[aq]\[dq]\[at]C:\[rs]white spaces\[rs]argfile\[dq]\[aq]\f[R] .RE .RS .PP -\f[CB]export\ JDK_JAVAC_OPTIONS=\[aq]\@C:\\"white\ spaces"\\argfile\[aq]\f[R] +\f[V]export JDK_JAVAC_OPTIONS=\[aq]\[at]C:\[rs]\[dq]white spaces\[dq]\[rs]argfile\[aq]\f[R] .RE -.SH COMMAND\-LINE ARGUMENT FILES +.SH COMMAND-LINE ARGUMENT FILES .PP -An argument file can include command\-line options and source file names +An argument file can include command-line options and source file names in any combination. The arguments within a file can be separated by spaces or new line characters. @@ -1006,48 +925,48 @@ double quotation marks. .PP File names within an argument file are relative to the current directory, not to the location of the argument file. -Wildcards (\f[CB]*\f[R]) are not allowed in these lists (such as for -specifying \f[CB]*.java\f[R]). -Use of the at sign (\f[CB]\@\f[R]) to recursively interpret files is not -supported. -The \f[CB]\-J\f[R] options are not supported because they\[aq]re passed to +Wildcards (\f[V]*\f[R]) are not allowed in these lists (such as for +specifying \f[V]*.java\f[R]). +Use of the at sign (\f[V]\[at]\f[R]) to recursively interpret files is +not supported. +The \f[V]-J\f[R] options are not supported because they\[aq]re passed to the launcher, which does not support argument files. .PP -When executing the \f[CB]javac\f[R] command, pass in the path and name of -each argument file with the at sign (\f[CB]\@\f[R]) leading character. -When the \f[CB]javac\f[R] command encounters an argument beginning with -the at sign (\f[CB]\@\f[R]), it expands the contents of that file into the -argument list. -.SS Examples of Using javac \@filename +When executing the \f[V]javac\f[R] command, pass in the path and name of +each argument file with the at sign (\f[V]\[at]\f[R]) leading character. +When the \f[V]javac\f[R] command encounters an argument beginning with +the at sign (\f[V]\[at]\f[R]), it expands the contents of that file into +the argument list. +.SS Examples of Using javac \[at]filename .TP -.B Single Argument File -You could use a single argument file named \f[CB]argfile\f[R] to hold all -\f[CB]javac\f[R] arguments: +Single Argument File +You could use a single argument file named \f[V]argfile\f[R] to hold all +\f[V]javac\f[R] arguments: .RS .RS .PP -\f[CB]javac\ \@argfile\f[R] +\f[V]javac \[at]argfile\f[R] .RE .PP This argument file could contain the contents of both files shown in the following \f[B]Two Argument Files\f[R] example. .RE .TP -.B Two Argument Files -You can create two argument files: one for the \f[CB]javac\f[R] options +Two Argument Files +You can create two argument files: one for the \f[V]javac\f[R] options and the other for the source file names. -Note that the following lists have no line\-continuation characters. +Note that the following lists have no line-continuation characters. .RS .PP -Create a file named \f[CB]options\f[R] that contains the following: +Create a file named \f[V]options\f[R] that contains the following: .PP \f[B]Linux and macOS:\f[R] .IP .nf \f[CB] -\-d\ classes -\-g -\-sourcepath\ /java/pubs/ws/1.3/src/share/classes +-d classes +-g +-sourcepath /java/pubs/ws/1.3/src/share/classes \f[R] .fi .PP @@ -1055,13 +974,13 @@ Create a file named \f[CB]options\f[R] that contains the following: .IP .nf \f[CB] -\-d\ classes -\-g -\-sourcepath\ C:\\java\\pubs\\ws\\1.3\\src\\share\\classes +-d classes +-g +-sourcepath C:\[rs]java\[rs]pubs\[rs]ws\[rs]1.3\[rs]src\[rs]share\[rs]classes \f[R] .fi .PP -Create a file named \f[CB]sources\f[R] that contains the following: +Create a file named \f[V]sources\f[R] that contains the following: .IP .nf \f[CB] @@ -1071,34 +990,34 @@ MyClass3.java \f[R] .fi .PP -Then, run the \f[CB]javac\f[R] command as follows: +Then, run the \f[V]javac\f[R] command as follows: .RS .PP -\f[CB]javac\ \@options\ \@sources\f[R] +\f[V]javac \[at]options \[at]sources\f[R] .RE .RE .TP -.B Argument Files with Paths +Argument Files with Paths The argument files can have paths, but any file names inside the files -are relative to the current working directory (not \f[CB]path1\f[R] or -\f[CB]path2\f[R]): +are relative to the current working directory (not \f[V]path1\f[R] or +\f[V]path2\f[R]): .RS .RS .PP -\f[CB]javac\ \@path1/options\ \@path2/sources\f[R] +\f[V]javac \[at]path1/options \[at]path2/sources\f[R] .RE .RE .SH ARRANGEMENT OF SOURCE CODE .PP In the Java language, classes and interfaces can be organized into packages, and packages can be organized into modules. -\f[CB]javac\f[R] expects that the physical arrangement of source files in +\f[V]javac\f[R] expects that the physical arrangement of source files in directories of the file system will mirror the organization of classes into packages, and packages into modules. .PP It is a widely adopted convention that module names and package names -begin with a lower\-case letter, and that class names begin with an -upper\-case letter. +begin with a lower-case letter, and that class names begin with an +upper-case letter. .SS Arrangement of Source Code for a Package .PP When classes and interfaces are organized into a package, the package is @@ -1107,41 +1026,43 @@ subdirectories. .PP For example: .IP \[bu] 2 -The package \f[CB]p\f[R] is represented as a directory called \f[CB]p\f[R]. +The package \f[V]p\f[R] is represented as a directory called +\f[V]p\f[R]. .IP \[bu] 2 -The package \f[CB]p.q\f[R] \-\- that is, the subpackage \f[CB]q\f[R] of -package \f[CB]p\f[R] \-\- is represented as the subdirectory \f[CB]q\f[R] of -directory \f[CB]p\f[R]. -The directory tree representing package \f[CB]p.q\f[R] is therefore -\f[CB]p\\q\f[R] on Windows, and \f[CB]p/q\f[R] on other systems. +The package \f[V]p.q\f[R] -- that is, the subpackage \f[V]q\f[R] of +package \f[V]p\f[R] -- is represented as the subdirectory \f[V]q\f[R] of +directory \f[V]p\f[R]. +The directory tree representing package \f[V]p.q\f[R] is therefore +\f[V]p\[rs]q\f[R] on Windows, and \f[V]p/q\f[R] on other systems. .IP \[bu] 2 -The package \f[CB]p.q.r\f[R] is represented as the directory tree -\f[CB]p\\q\\r\f[R] (on Windows) or \f[CB]p/q/r\f[R] (on other systems). +The package \f[V]p.q.r\f[R] is represented as the directory tree +\f[V]p\[rs]q\[rs]r\f[R] (on Windows) or \f[V]p/q/r\f[R] (on other +systems). .PP -Within a directory or subdirectory, \f[CB]\&.java\f[R] files represent +Within a directory or subdirectory, \f[V].java\f[R] files represent classes and interfaces in the corresponding package or subpackage. .PP For example: .IP \[bu] 2 -The class \f[CB]X\f[R] declared in package \f[CB]p\f[R] is represented by -the file \f[CB]X.java\f[R] in the \f[CB]p\f[R] directory. +The class \f[V]X\f[R] declared in package \f[V]p\f[R] is represented by +the file \f[V]X.java\f[R] in the \f[V]p\f[R] directory. .IP \[bu] 2 -The class \f[CB]Y\f[R] declared in package \f[CB]p.q\f[R] is represented by -the file \f[CB]Y.java\f[R] in the \f[CB]q\f[R] subdirectory of directory -\f[CB]p\f[R]. +The class \f[V]Y\f[R] declared in package \f[V]p.q\f[R] is represented +by the file \f[V]Y.java\f[R] in the \f[V]q\f[R] subdirectory of +directory \f[V]p\f[R]. .IP \[bu] 2 -The class \f[CB]Z\f[R] declared in package \f[CB]p.q.r\f[R] is represented -by the file \f[CB]Z.java\f[R] in the \f[CB]r\f[R] subdirectory of -\f[CB]p\\q\f[R] (on Windows) or \f[CB]p/q\f[R] (on other systems). +The class \f[V]Z\f[R] declared in package \f[V]p.q.r\f[R] is represented +by the file \f[V]Z.java\f[R] in the \f[V]r\f[R] subdirectory of +\f[V]p\[rs]q\f[R] (on Windows) or \f[V]p/q\f[R] (on other systems). .PP In some situations, it is convenient to split the code into separate directories, each structured as described above, and the aggregate list -of directories specified to \f[CB]javac\f[R]. +of directories specified to \f[V]javac\f[R]. .SS Arrangement of Source Code for a Module .PP In the Java language, a module is a set of packages designed for reuse. -In addition to \f[CB]\&.java\f[R] files for classes and interfaces, each -module has a source file called \f[CB]module\-info.java\f[R] which: +In addition to \f[V].java\f[R] files for classes and interfaces, each +module has a source file called \f[V]module-info.java\f[R] which: .IP "1." 3 declares the module\[aq]s name; .IP "2." 3 @@ -1153,9 +1074,9 @@ packages). .PP When packages are organized into a module, the module is represented by one or more directories representing the packages in the module, one of -which contains the \f[CB]module\-info.java\f[R] file. +which contains the \f[V]module-info.java\f[R] file. It may be convenient, but it is not required, to use a single directory, -named after the module, to contain the \f[CB]module\-info.java\f[R] file +named after the module, to contain the \f[V]module-info.java\f[R] file alongside the directory tree which represents the packages in the module (i.e., the \f[I]package hierarchy\f[R] described above). The exact arrangement of source code for a module is typically dictated @@ -1164,31 +1085,32 @@ system. .PP For example: .IP \[bu] 2 -The module \f[CB]a.b.c\f[R] may be represented by the directory -\f[CB]a.b.c\f[R], on all systems. +The module \f[V]a.b.c\f[R] may be represented by the directory +\f[V]a.b.c\f[R], on all systems. .IP \[bu] 2 The module\[aq]s declaration is represented by the file -\f[CB]module\-info.java\f[R] in the \f[CB]a.b.c\f[R] directory. +\f[V]module-info.java\f[R] in the \f[V]a.b.c\f[R] directory. .IP \[bu] 2 -If the module contains package \f[CB]p.q.r\f[R], then the \f[CB]a.b.c\f[R] -directory contains the directory tree \f[CB]p\\q\\r\f[R] (on Windows) or -\f[CB]p/q/r\f[R] (on other systems). +If the module contains package \f[V]p.q.r\f[R], then the \f[V]a.b.c\f[R] +directory contains the directory tree \f[V]p\[rs]q\[rs]r\f[R] (on +Windows) or \f[V]p/q/r\f[R] (on other systems). .PP The development environment may prescribe some directory hierarchy between the directory named for the module and the source files to be -read by \f[CB]javac\f[R]. +read by \f[V]javac\f[R]. .PP For example: .IP \[bu] 2 -The module \f[CB]a.b.c\f[R] may be represented by the directory -\f[CB]a.b.c\f[R] +The module \f[V]a.b.c\f[R] may be represented by the directory +\f[V]a.b.c\f[R] .IP \[bu] 2 The module\[aq]s declaration and the module\[aq]s packages may be in -some subdirectory of \f[CB]a.b.c\f[R], such as \f[CB]src\\main\\java\f[R] -(on Windows) or \f[CB]src/main/java\f[R] (on other systems). +some subdirectory of \f[V]a.b.c\f[R], such as +\f[V]src\[rs]main\[rs]java\f[R] (on Windows) or \f[V]src/main/java\f[R] +(on other systems). .SH CONFIGURING A COMPILATION .PP -This section describes how to configure \f[CB]javac\f[R] to perform a +This section describes how to configure \f[V]javac\f[R] to perform a basic compilation. .PP See \f[B]Configuring the Module System\f[R] for additional details for @@ -1204,11 +1126,11 @@ Some systems may limit the amount you can put on a command line; to work around those limits, you can use \f[B]argument files\f[R]. .PP When compiling code for modules, you can also specify source files -indirectly, by using the \f[B]\f[BC]\-\-module\f[B]\f[R] or \f[CB]\-m\f[R] +indirectly, by using the \f[B]\f[VB]--module\f[B]\f[R] or \f[V]-m\f[R] option. .SS Output Directory .IP \[bu] 2 -Use the \f[B]\f[BC]\-d\f[B]\f[R] option to specify an output directory in +Use the \f[B]\f[VB]-d\f[B]\f[R] option to specify an output directory in which to put the compiled class files. .PP This will normally be organized in a \f[B]package hierarchy\f[R], unless @@ -1227,18 +1149,18 @@ If so, you must place these libraries on the class path or module path. If the library code is not in a module, place it on the class path; if it is in a module, place it on the module path. .IP \[bu] 2 -Use the \f[B]\f[BC]\-\-class\-path\f[B]\f[R] option to specify libraries -to be placed on the class path. +Use the \f[B]\f[VB]--class-path\f[B]\f[R] option to specify libraries to +be placed on the class path. Locations on the class path should be organized in a \f[B]package hierarchy\f[R]. -You can also use alternate forms of the option: \f[CB]\-classpath\f[R] or -\f[CB]\-cp\f[R]. +You can also use alternate forms of the option: \f[V]-classpath\f[R] or +\f[V]-cp\f[R]. .IP \[bu] 2 -Use the \f[B]\f[BC]\-\-module\-path\f[B]\f[R] option to specify libraries +Use the \f[B]\f[VB]--module-path\f[B]\f[R] option to specify libraries to be placed on the module path. Locations on the module path should either be modules or directories of modules. -You can also use an alternate form of the option: \f[CB]\-p\f[R]. +You can also use an alternate form of the option: \f[V]-p\f[R]. .RS 2 .PP See \f[B]Configuring the Module System\f[R] for details on how to modify @@ -1259,13 +1181,13 @@ for a module, or if you are only compiling code for a single module, use the source path; if you are compiling code for multiple modules, use the module source path. .IP \[bu] 2 -Use the \f[B]\f[BC]\-\-source\-path\f[B]\f[R] option to specify the +Use the \f[B]\f[VB]--source-path\f[B]\f[R] option to specify the locations of additional source files that may be read by javac. Locations on the source path should be organized in a \f[B]package hierarchy\f[R]. -You can also use an alternate form of the option: \f[CB]\-sourcepath\f[R]. +You can also use an alternate form of the option: \f[V]-sourcepath\f[R]. .IP \[bu] 2 -Use the \f[B]\f[BC]\-\-module\-source\-path\f[B]\f[R] option one or more +Use the \f[B]\f[VB]--module-source-path\f[B]\f[R] option one or more times to specify the location of additional source files in different modules that may be read by javac, or when compiling source files in multiple modules. @@ -1275,7 +1197,7 @@ can specify the locations all \f[B]together\f[R]. For more details, see \f[B]The Module Source Path Option\f[R]. .PP If you want to be able to refer to types in additional source files but -do not want them to be compiled, use the \f[B]\f[BC]\-implicit\f[B]\f[R] +do not want them to be compiled, use the \f[B]\f[VB]-implicit\f[B]\f[R] option. .PP \f[B]Note\f[R]: if you are compiling code for multiple modules, you must @@ -1284,18 +1206,18 @@ the command line must be in one of the directories on the module source path, or in a subdirectory thereof. .SS Example of Compiling Multiple Source Files .PP -This example compiles the \f[CB]Aloha.java\f[R], \f[CB]GutenTag.java\f[R], -\f[CB]Hello.java\f[R], and \f[CB]Hi.java\f[R] source files in the -\f[CB]greetings\f[R] package. +This example compiles the \f[V]Aloha.java\f[R], \f[V]GutenTag.java\f[R], +\f[V]Hello.java\f[R], and \f[V]Hi.java\f[R] source files in the +\f[V]greetings\f[R] package. .PP \f[B]Linux and macOS:\f[R] .IP .nf \f[CB] -%\ javac\ greetings/*.java -%\ ls\ greetings -Aloha.class\ \ \ \ \ \ \ \ \ GutenTag.class\ \ \ \ \ \ Hello.class\ \ \ \ \ \ \ \ \ Hi.class -Aloha.java\ \ \ \ \ \ \ \ \ \ GutenTag.java\ \ \ \ \ \ \ Hello.java\ \ \ \ \ \ \ \ \ \ Hi.java +% javac greetings/*.java +% ls greetings +Aloha.class GutenTag.class Hello.class Hi.class +Aloha.java GutenTag.java Hello.java Hi.java \f[R] .fi .PP @@ -1303,10 +1225,10 @@ Aloha.java\ \ \ \ \ \ \ \ \ \ GutenTag.java\ \ \ \ \ \ \ Hello.java\ \ \ \ \ \ \ .IP .nf \f[CB] -C:\\>javac\ greetings\\*.java -C:\\>dir\ greetings -Aloha.class\ \ \ \ \ \ \ \ \ GutenTag.class\ \ \ \ \ \ Hello.class\ \ \ \ \ \ \ \ \ Hi.class -Aloha.java\ \ \ \ \ \ \ \ \ \ GutenTag.java\ \ \ \ \ \ \ Hello.java\ \ \ \ \ \ \ \ \ \ Hi.java +C:\[rs]>javac greetings\[rs]*.java +C:\[rs]>dir greetings +Aloha.class GutenTag.class Hello.class Hi.class +Aloha.java GutenTag.java Hello.java Hi.java \f[R] .fi .SS Example of Specifying a User Class Path @@ -1320,7 +1242,7 @@ recompile it: \f[CB] pwd /examples -javac\ greetings/Hi.java +javac greetings/Hi.java \f[R] .fi .PP @@ -1328,43 +1250,43 @@ javac\ greetings/Hi.java .IP .nf \f[CB] -C:\\>cd -\\examples -C:\\>javac\ greetings\\Hi.java +C:\[rs]>cd +\[rs]examples +C:\[rs]>javac greetings\[rs]Hi.java \f[R] .fi .PP -Because \f[CB]greetings.Hi\f[R] refers to other classes in the -\f[CB]greetings\f[R] package, the compiler needs to find these other +Because \f[V]greetings.Hi\f[R] refers to other classes in the +\f[V]greetings\f[R] package, the compiler needs to find these other classes. The previous example works because the default user class path is the directory that contains the package directory. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by -setting \f[CB]CLASSPATH\f[R]. -This example uses the \f[CB]\-classpath\f[R] option. +setting \f[V]CLASSPATH\f[R]. +This example uses the \f[V]-classpath\f[R] option. .PP \f[B]Linux and macOS:\f[R] .RS .PP -\f[CB]javac\ \-classpath\ /examples\ /examples/greetings/Hi.java\f[R] +\f[V]javac -classpath /examples /examples/greetings/Hi.java\f[R] .RE .PP \f[B]Windows:\f[R] .RS .PP -\f[CB]C:\\>javac\ \-classpath\ \\examples\ \\examples\\greetings\\Hi.java\f[R] +\f[V]C:\[rs]>javac -classpath \[rs]examples \[rs]examples\[rs]greetings\[rs]Hi.java\f[R] .RE .PP -If you change \f[CB]greetings.Hi\f[R] to use a banner utility, then that +If you change \f[V]greetings.Hi\f[R] to use a banner utility, then that utility also needs to be accessible through the user class path. .PP \f[B]Linux and macOS:\f[R] .IP .nf \f[CB] -javac\ \-classpath\ /examples:/lib/Banners.jar\ \\ -\ \ \ \ \ \ \ \ \ \ \ \ /examples/greetings/Hi.java +javac -classpath /examples:/lib/Banners.jar \[rs] + /examples/greetings/Hi.java \f[R] .fi .PP @@ -1372,53 +1294,53 @@ javac\ \-classpath\ /examples:/lib/Banners.jar\ \\ .IP .nf \f[CB] -C:\\>javac\ \-classpath\ \\examples;\\lib\\Banners.jar\ ^ -\ \ \ \ \ \ \ \ \ \ \ \ \\examples\\greetings\\Hi.java +C:\[rs]>javac -classpath \[rs]examples;\[rs]lib\[rs]Banners.jar \[ha] + \[rs]examples\[rs]greetings\[rs]Hi.java \f[R] .fi .PP -To execute a class in the \f[CB]greetings\f[R] package, the program needs -access to the \f[CB]greetings\f[R] package, and to the classes that the -\f[CB]greetings\f[R] classes use. +To execute a class in the \f[V]greetings\f[R] package, the program needs +access to the \f[V]greetings\f[R] package, and to the classes that the +\f[V]greetings\f[R] classes use. .PP \f[B]Linux and macOS:\f[R] .RS .PP -\f[CB]java\ \-classpath\ /examples:/lib/Banners.jar\ greetings.Hi\f[R] +\f[V]java -classpath /examples:/lib/Banners.jar greetings.Hi\f[R] .RE .PP \f[B]Windows:\f[R] .RS .PP -\f[CB]C:\\>java\ \-classpath\ \\examples;\\lib\\Banners.jar\ greetings.Hi\f[R] +\f[V]C:\[rs]>java -classpath \[rs]examples;\[rs]lib\[rs]Banners.jar greetings.Hi\f[R] .RE .SH CONFIGURING THE MODULE SYSTEM .PP If you want to include additional modules in your compilation, use the -\f[B]\f[BC]\-\-add\-modules\f[B]\f[R] option. +\f[B]\f[VB]--add-modules\f[B]\f[R] option. This may be necessary when you are compiling code that is not in a module, or which is in an automatic module, and the code refers to API in the additional modules. .PP If you want to restrict the set of modules in your compilation, use the -\f[B]\f[BC]\-\-limit\-modules\f[B]\f[R] option. +\f[B]\f[VB]--limit-modules\f[B]\f[R] option. This may be useful if you want to ensure that the code you are compiling is capable of running on a system with a limited set of modules installed. .PP If you want to break encapsulation and specify that additional packages should be considered as exported from a module, use the -\f[B]\f[BC]\-\-add\-exports\f[B]\f[R] option. -This may be useful when performing white\-box testing; relying on access +\f[B]\f[VB]--add-exports\f[B]\f[R] option. +This may be useful when performing white-box testing; relying on access to internal API in production code is strongly discouraged. .PP If you want to specify that additional packages should be considered as -required by a module, use the \f[B]\f[BC]\-\-add\-reads\f[B]\f[R] option. -This may be useful when performing white\-box testing; relying on access +required by a module, use the \f[B]\f[VB]--add-reads\f[B]\f[R] option. +This may be useful when performing white-box testing; relying on access to internal API in production code is strongly discouraged. .PP You can patch additional content into any module using the -\f[B]\f[BC]\-\-patch\-module\f[B]\f[R] option. +\f[B]\f[VB]--patch-module\f[B]\f[R] option. See [Patching a Module] for more details. .SH SEARCHING FOR MODULE, PACKAGE AND TYPE DECLARATIONS .PP @@ -1426,51 +1348,51 @@ To compile a source file, the compiler often needs information about a module or type, but the declaration is not in the source files specified on the command line. .PP -\f[CB]javac\f[R] needs type information for every class or interface used, -extended, or implemented in the source file. +\f[V]javac\f[R] needs type information for every class or interface +used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance. .PP -For example, when you create a subclass of \f[CB]java.awt.Window\f[R], you -are also using the ancestor classes of \f[CB]Window\f[R]: -\f[CB]java.awt.Container\f[R], \f[CB]java.awt.Component\f[R], and -\f[CB]java.lang.Object\f[R]. +For example, when you create a subclass of \f[V]java.awt.Window\f[R], +you are also using the ancestor classes of \f[V]Window\f[R]: +\f[V]java.awt.Container\f[R], \f[V]java.awt.Component\f[R], and +\f[V]java.lang.Object\f[R]. .PP When compiling code for a module, the compiler also needs to have available the declaration of that module. .PP A successful search may produce a class file, a source file, or both. -If both are found, then you can use the \f[B]\f[BC]\-Xprefer\f[B]\f[R] +If both are found, then you can use the \f[B]\f[VB]-Xprefer\f[B]\f[R] option to instruct the compiler which to use. .PP -If a search finds and uses a source file, then by default \f[CB]javac\f[R] -compiles that source file. -This behavior can be altered with \f[B]\f[BC]\-implicit\f[B]\f[R]. +If a search finds and uses a source file, then by default +\f[V]javac\f[R] compiles that source file. +This behavior can be altered with \f[B]\f[VB]-implicit\f[B]\f[R]. .PP The compiler might not discover the need for some type information until after annotation processing completes. When the type information is found in a source file and no -\f[B]\f[BC]\-implicit\f[B]\f[R] option is specified, the compiler gives a +\f[B]\f[VB]-implicit\f[B]\f[R] option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the -\f[B]\f[BC]\-implicit\f[B]\f[R] option to specify whether or not class +\f[B]\f[VB]-implicit\f[B]\f[R] option to specify whether or not class files should be generated for such source files. .PP -The way that \f[CB]javac\f[R] locates the declarations of those types +The way that \f[V]javac\f[R] locates the declarations of those types depends on whether the reference exists within code for a module or not. .SS Searching Package Oriented Paths .PP When searching for a source or class file on a path composed of package -oriented locations, \f[CB]javac\f[R] will check each location on the path +oriented locations, \f[V]javac\f[R] will check each location on the path in turn for the possible presence of the file. The first occurrence of a particular file shadows (hides) any subsequent -occurrences of like\-named files. +occurrences of like-named files. This shadowing does not affect any search for any files with a different name. This can be convenient when searching for source files, which may be -grouped in different locations, such as shared code, platform\-specific +grouped in different locations, such as shared code, platform-specific code and generated code. It can also be useful when injecting alternate versions of a class file into a package, to debugging or other instrumentation reasons. @@ -1479,49 +1401,48 @@ different versions of a library on the class path. .SS Searching Module Oriented Paths .PP Prior to scanning any module paths for any package or type declarations, -\f[CB]javac\f[R] will lazily scan the following paths and locations to +\f[V]javac\f[R] will lazily scan the following paths and locations to determine the modules that will be used in the compilation. .IP \[bu] 2 The module source path (see the -\f[B]\f[BC]\-\-module\-source\-path\f[B]\f[R] option) +\f[B]\f[VB]--module-source-path\f[B]\f[R] option) .IP \[bu] 2 The path for upgradeable modules (see the -\f[B]\f[BC]\-\-upgrade\-module\-path\f[B]\f[R] option) +\f[B]\f[VB]--upgrade-module-path\f[B]\f[R] option) .IP \[bu] 2 -The system modules (see the \f[B]\f[BC]\-\-system\f[B]\f[R] option) +The system modules (see the \f[B]\f[VB]--system\f[B]\f[R] option) .IP \[bu] 2 -The user module path ( see the \f[B]\f[BC]\-\-module\-path\f[B]\f[R] +The user module path ( see the \f[B]\f[VB]--module-path\f[B]\f[R] option) .PP For any module, the first occurrence of the module during the scan -completely shadows (hides) any subsequent appearance of a like\-named +completely shadows (hides) any subsequent appearance of a like-named module. -While locating the modules, \f[CB]javac\f[R] is able to determine the +While locating the modules, \f[V]javac\f[R] is able to determine the packages exported by the module and to associate with each module a package oriented path for the contents of the module. For any previously compiled module, this path will typically be a single entry for either a directory or a file that provides an internal -directory\-like hierarchy, such as a JAR file. +directory-like hierarchy, such as a JAR file. Thus, when searching for a type that is in a package that is known to be -exported by a module, \f[CB]javac\f[R] can locate the declaration directly -and efficiently. +exported by a module, \f[V]javac\f[R] can locate the declaration +directly and efficiently. .SS Searching for the Declaration of a Module .PP If the module has been previously compiled, the module declaration is -located in a file named \f[CB]module\-info.class\f[R] in the root of the +located in a file named \f[V]module-info.class\f[R] in the root of the package hierarchy for the content of the module. .PP If the module is one of those currently being compiled, the module -declaration will be either the file named \f[CB]module\-info.class\f[R] in +declaration will be either the file named \f[V]module-info.class\f[R] in the root of the package hierarchy for the module in the class output -directory, or the file named \f[CB]module\-info.java\f[R] in one of the +directory, or the file named \f[V]module-info.java\f[R] in one of the locations on the source path or one the module source path for the module. -.SS Searching for the Declaration of a Type When the Reference is not in -a Module +.SS Searching for the Declaration of a Type When the Reference is not in a Module .PP When searching for a type that is referenced in code that is not in a -module, \f[CB]javac\f[R] will look in the following places: +module, \f[V]javac\f[R] will look in the following places: .IP \[bu] 2 The platform classes (or the types in exported packages of the platform modules) (This is for compiled class files only.) @@ -1533,10 +1454,10 @@ applicable. Types in packages on the class path and/or source path: .RS 2 .IP \[bu] 2 -If both are specified, \f[CB]javac\f[R] looks for compiled class files on +If both are specified, \f[V]javac\f[R] looks for compiled class files on the class path and for source files on the source path. .IP \[bu] 2 -If the class path is specified, but not source path, \f[CB]javac\f[R] +If the class path is specified, but not source path, \f[V]javac\f[R] looks for both compiled class files and source files on the class path. .IP \[bu] 2 If the class path is not specified, it defaults to the current @@ -1548,26 +1469,25 @@ compiled class file and a source file are found, the most recently modified file will be used by default. If the source file is newer, it will be compiled and will may override any previously compiled version of the file. -You can use the \f[B]\f[BC]\-Xprefer\f[B]\f[R] option to override the +You can use the \f[B]\f[VB]-Xprefer\f[B]\f[R] option to override the default behavior. -.SS Searching for the Declaration of a Type When the Reference is in a -Module +.SS Searching for the Declaration of a Type When the Reference is in a Module .PP When searching for a type that is referenced in code in a module, -\f[CB]javac\f[R] will examine the declaration of the enclosing module to +\f[V]javac\f[R] will examine the declaration of the enclosing module to determine if the type is in a package that is exported from another module that is readable by the enclosing module. -If so, \f[CB]javac\f[R] will simply and directly go to the definition of +If so, \f[V]javac\f[R] will simply and directly go to the definition of that module to find the definition of the required type. Unless the module is another of the modules being compiled, -\f[CB]javac\f[R] will only look for compiled class files files. -In other words, \f[CB]javac\f[R] will not look for source files in +\f[V]javac\f[R] will only look for compiled class files files. +In other words, \f[V]javac\f[R] will not look for source files in platform modules or modules on the module path. .PP If the type being referenced is not in some other readable module, -\f[CB]javac\f[R] will examine the module being compiled to try and find +\f[V]javac\f[R] will examine the module being compiled to try and find the declaration of the type. -\f[CB]javac\f[R] will look for the declaration of the type as follows: +\f[V]javac\f[R] will look for the declaration of the type as follows: .IP \[bu] 2 Source files specified on the command line or on the source path or module source path. @@ -1575,7 +1495,7 @@ module source path. Previously compiled files in the output directory. .SH DIRECTORY HIERARCHIES .PP -\f[CB]javac\f[R] generally assumes that source files and compiled class +\f[V]javac\f[R] generally assumes that source files and compiled class files will be organized in a file system directory hierarchy or in a type of file that supports in an internal directory hierarchy, such as a JAR file. @@ -1583,34 +1503,33 @@ Three different kinds of hierarchy are supported: a \f[I]package hierarchy\f[R], a \f[I]module hierarchy\f[R], and a \f[I]module source hierarchy\f[R]. .PP -While \f[CB]javac\f[R] is fairly relaxed about the organization of source +While \f[V]javac\f[R] is fairly relaxed about the organization of source code, beyond the expectation that source will be organized in one or package hierarchies, and can generally accommodate organizations prescribed by development environments and build tools, Java tools in -general, and \f[CB]javac\f[R] and the Java launcher in particular, are +general, and \f[V]javac\f[R] and the Java launcher in particular, are more stringent regarding the organization of compiled class files, and will be organized in package hierarchies or module hierarchies, as appropriate. .PP -The location of these hierarchies are specified to \f[CB]javac\f[R] with -command\-line options, whose names typically end in "path", like -\f[B]\f[BC]\-\-source\-path\f[B]\f[R] or -\f[B]\f[BC]\-\-class\-path\f[B]\f[R]. +The location of these hierarchies are specified to \f[V]javac\f[R] with +command-line options, whose names typically end in \[dq]path\[dq], like +\f[B]\f[VB]--source-path\f[B]\f[R] or \f[B]\f[VB]--class-path\f[B]\f[R]. Also as a general rule, path options whose name includes the word -\f[CB]module\f[R], like \f[B]\f[BC]\-\-module\-path\f[B]\f[R], are used to -specify module hierarchies, although some module\-related path options -allow a package hierarchy to be specified on a per\-module basis. +\f[V]module\f[R], like \f[B]\f[VB]--module-path\f[B]\f[R], are used to +specify module hierarchies, although some module-related path options +allow a package hierarchy to be specified on a per-module basis. All other path options are used to specify package hierarchies. .SS Package Hierarchy .PP In a package hierarchy, directories and subdirectories are used to represent the component parts of the package name, with the source file or compiled class file for a type being stored as a file with an -extension of \f[CB]\&.java\f[R] or \f[CB]\&.class\f[R] in the most nested +extension of \f[V].java\f[R] or \f[V].class\f[R] in the most nested directory. .PP For example, in a package hierarchy, the source file for a class -\f[CB]com.example.MyClass\f[R] will be stored in the file +\f[V]com.example.MyClass\f[R] will be stored in the file \f[I]com/example/MyClass.java\f[R] .SS Module Hierarchy .PP @@ -1619,11 +1538,11 @@ modules in the hierarchy; within each of those directories the contents of the module are organized in package hierarchies. .PP For example, in a module hierarchy, the compiled class file for a type -called \f[CB]com.example.MyClass\f[R] in a module called -\f[CB]my.library\f[R] will be stored in +called \f[V]com.example.MyClass\f[R] in a module called +\f[V]my.library\f[R] will be stored in \f[I]my.library/com/example/MyClass.class\f[R]. .PP -The various output directories used by \f[CB]javac\f[R] (the class output +The various output directories used by \f[V]javac\f[R] (the class output directory, the source output directory, and native header output directory) will all be organized in a module hierarchy when multiple modules are being compiled. @@ -1638,59 +1557,59 @@ directory that is the root of the package hierarchy for the source code of the module. .PP For example, in a module source hierarchy, the source file for a type -called \f[CB]com.example.MyClass\f[R] in a module called -\f[CB]my.library\f[R] may be stored in a file such as +called \f[V]com.example.MyClass\f[R] in a module called +\f[V]my.library\f[R] may be stored in a file such as \f[I]my.library/src/main/java/com/example/MyClass.java\f[R]. .SH THE MODULE SOURCE PATH OPTION .PP -The \f[B]\f[BC]\-\-module\-source\-path\f[B]\f[R] option has two forms: a -\f[I]module\-specific form\f[R], in which a package path is given for +The \f[B]\f[VB]--module-source-path\f[B]\f[R] option has two forms: a +\f[I]module-specific form\f[R], in which a package path is given for each module containing code to be compiled, and a -\f[I]module\-pattern\f[R] form, in which the source path for each module +\f[I]module-pattern\f[R] form, in which the source path for each module is specified by a pattern. -The module\-specific form is generally simpler to use when only a small -number of modules are involved; the module\-pattern form may be more +The module-specific form is generally simpler to use when only a small +number of modules are involved; the module-pattern form may be more convenient when the number of modules is large and the modules are organized in a regular manner that can be described by a pattern. .PP -Multiple instances of the \f[CB]\-\-module\-source\-path\f[R] option may -be given, each one using either the module\-pattern form or the -module\-specific form, subject to the following limitations: +Multiple instances of the \f[V]--module-source-path\f[R] option may be +given, each one using either the module-pattern form or the +module-specific form, subject to the following limitations: .IP \[bu] 2 -the module\-pattern form may be used at most once +the module-pattern form may be used at most once .IP \[bu] 2 -the module\-specific form may be used at most once for any given module +the module-specific form may be used at most once for any given module .PP -If the module\-specific form is used for any module, the associated +If the module-specific form is used for any module, the associated search path overrides any path that might otherwise have been inferred -from the module\-pattern form. -.SS Module\-specific form +from the module-pattern form. +.SS Module-specific form .PP -The module\-specific form allows an explicit search path to be given for +The module-specific form allows an explicit search path to be given for any specific module. This form is: .IP \[bu] 2 -\f[CB]\-\-module\-source\-path\f[R] -\f[I]module\-name\f[R]\f[CB]=\f[R]\f[I]file\-path\f[R] -(\f[I]path\-separator\f[R] \f[I]file\-path\f[R])* +\f[V]--module-source-path\f[R] +\f[I]module-name\f[R]\f[V]=\f[R]\f[I]file-path\f[R] +(\f[I]path-separator\f[R] \f[I]file-path\f[R])* .PP -The path separator character is \f[CB];\f[R] on Windows, and \f[CB]:\f[R] +The path separator character is \f[V];\f[R] on Windows, and \f[V]:\f[R] otherwise. .PP \f[B]Note:\f[R] this is similar to the form used for the -\f[B]\f[BC]\-\-patch\-module\f[B]\f[R] option. -.SS Module\-pattern form +\f[B]\f[VB]--patch-module\f[B]\f[R] option. +.SS Module-pattern form .PP -The module\-pattern form allows a concise specification of the module +The module-pattern form allows a concise specification of the module source path for any number of modules organized in regular manner. .IP \[bu] 2 -\f[CB]\-\-module\-source\-path\f[R] \f[I]pattern\f[R] +\f[V]--module-source-path\f[R] \f[I]pattern\f[R] .PP The pattern is defined by the following rules, which are applied in order: .IP \[bu] 2 The argument is considered to be a series of segments separated by the -path separator character (\f[CB];\f[R] on Windows, and \f[CB]:\f[R] +path separator character (\f[V];\f[R] on Windows, and \f[V]:\f[R] otherwise). .IP \[bu] 2 Each segment containing curly braces of the form @@ -1698,18 +1617,18 @@ Each segment containing curly braces of the form .IP .nf \f[CB] -string1{alt1\ (\ ,alt2\ )*\ }\ string2 +string1{alt1 ( ,alt2 )* } string2 \f[R] .fi .PP is considered to be replaced by a series of segments formed by -"expanding" the braces: +\[dq]expanding\[dq] the braces: .IP .nf \f[CB] -string1\ alt1\ string2 -string1\ alt2\ string2 -and\ so\ on... +string1 alt1 string2 +string1 alt2 string2 +and so on... \f[R] .fi .PP @@ -1718,7 +1637,7 @@ The braces may be nested. This rule is applied for all such usages of braces. .RE .IP \[bu] 2 -Each segment must have at most one asterisk (\f[CB]*\f[R]). +Each segment must have at most one asterisk (\f[V]*\f[R]). If a segment does not contain an asterisk, it is considered to be as though the file separator character and an asterisk are appended. .RS 2 @@ -1729,13 +1648,13 @@ from the series of segments obtained by substituting the module name .PP \f[B]Note\f[R]: in this context, the asterisk is just used as a special marker, to denote the position in the path of the module name. -It should not be confused with the use of \f[CB]*\f[R] as a file name +It should not be confused with the use of \f[V]*\f[R] as a file name wildcard character, as found on most operating systems. .RE .SH PATCHING MODULES .PP javac allows any content, whether in source or compiled form, to be -patched into any module using the \f[B]\f[BC]\-\-patch\-module\f[B]\f[R] +patched into any module using the \f[B]\f[VB]--patch-module\f[B]\f[R] option. You may want to do this to compile alternative implementations of a class to be patched at runtime into a JVM, or to inject additional @@ -1743,46 +1662,46 @@ classes into the module, such as when testing. .PP The form of the option is: .IP \[bu] 2 -\f[CB]\-\-patch\-module\f[R] -\f[I]module\-name\f[R]\f[CB]=\f[R]\f[I]file\-path\f[R] -(\f[I]path\-separator\f[R] \f[I]file\-path\f[R] )* +\f[V]--patch-module\f[R] +\f[I]module-name\f[R]\f[V]=\f[R]\f[I]file-path\f[R] +(\f[I]path-separator\f[R] \f[I]file-path\f[R] )* .PP -The path separator character is \f[CB];\f[R] on Windows, and \f[CB]:\f[R] +The path separator character is \f[V];\f[R] on Windows, and \f[V]:\f[R] otherwise. The paths given for the module must specify the root of a package hierarchy for the contents of the module .PP The option may be given at most once for any given module. -Any content on the path will hide any like\-named content later in the +Any content on the path will hide any like-named content later in the path and in the patched module. .PP When patching source code into more than one module, the -\f[B]\f[BC]\-\-module\-source\-path\f[B]\f[R] must also be used, so that -the output directory is organized in a module hierarchy, and capable of +\f[B]\f[VB]--module-source-path\f[B]\f[R] must also be used, so that the +output directory is organized in a module hierarchy, and capable of holding the compiled class files for the modules being compiled. .SH ANNOTATION PROCESSING .PP -The \f[CB]javac\f[R] command provides direct support for annotation +The \f[V]javac\f[R] command provides direct support for annotation processing. .PP The API for annotation processors is defined in the -\f[CB]javax.annotation.processing\f[R] and \f[CB]javax.lang.model\f[R] +\f[V]javax.annotation.processing\f[R] and \f[V]javax.lang.model\f[R] packages and subpackages. .SS How Annotation Processing Works .PP Unless annotation processing is disabled with the -\f[B]\f[BC]\-proc:none\f[B]\f[R] option, the compiler searches for any +\f[B]\f[VB]-proc:none\f[B]\f[R] option, the compiler searches for any annotation processors that are available. The search path can be specified with the -\f[B]\f[BC]\-processorpath\f[B]\f[R] option. +\f[B]\f[VB]-processorpath\f[B]\f[R] option. If no path is specified, then the user class path is used. -Processors are located by means of service provider\-configuration files -named \f[CB]META\-INF/services/javax.annotation.processing\f[R]. +Processors are located by means of service provider-configuration files +named \f[V]META-INF/services/javax.annotation.processing\f[R]. Processor on the search path. Such files should contain the names of any annotation processors to be used, listed one per line. Alternatively, processors can be specified explicitly, using the -\f[B]\f[BC]\-processor\f[B]\f[R] option. +\f[B]\f[VB]-processor\f[B]\f[R] option. .PP After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the @@ -1803,7 +1722,7 @@ This continues until no new source files are generated. After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work. -Finally, unless the \f[B]\f[BC]\-proc:only\f[B]\f[R] option is used, the +Finally, unless the \f[B]\f[VB]-proc:only\f[B]\f[R] option is used, the compiler compiles the original and all generated source files. .PP If you use an annotation processor that generates additional source @@ -1811,19 +1730,19 @@ files to be included in the compilation, you can specify a default module to be used for the newly generated files, for use when a module declaration is not also generated. In this case, use the -\f[B]\f[BC]\-\-default\-module\-for\-created\-files\f[B]\f[R] option. +\f[B]\f[VB]--default-module-for-created-files\f[B]\f[R] option. .SS Compilation Environment and Runtime Environment. .PP The declarations in source files and previously compiled class files are -analyzed by \f[CB]javac\f[R] in a \f[I]compilation environment\f[R] that is -distinct from the \f[I]runtime environment\f[R] used to execute -\f[CB]javac\f[R] itself. -Although there is a deliberate similarity between many \f[CB]javac\f[R] -options and like\-named options for the Java \f[B]launcher\f[R], such as -\f[CB]\-\-class\-path\f[R], \f[CB]\-\-module\-path\f[R] and so on, it is -important to understand that in general the \f[CB]javac\f[R] options just +analyzed by \f[V]javac\f[R] in a \f[I]compilation environment\f[R] that +is distinct from the \f[I]runtime environment\f[R] used to execute +\f[V]javac\f[R] itself. +Although there is a deliberate similarity between many \f[V]javac\f[R] +options and like-named options for the Java \f[B]launcher\f[R], such as +\f[V]--class-path\f[R], \f[V]--module-path\f[R] and so on, it is +important to understand that in general the \f[V]javac\f[R] options just affect the environment in which the source files are compiled, and do -not affect the operation of \f[CB]javac\f[R] itself. +not affect the operation of \f[V]javac\f[R] itself. .PP The distinction between the compilation environment and runtime environment is significant when it comes to using annotation processors. @@ -1833,27 +1752,27 @@ executed in the runtime environment. If an annotation processor has dependencies on libraries that are not in modules, the libraries can be placed, along with the annotation processor itself, on the processor path. -(See the \f[B]\f[BC]\-\-processor\-path\f[B]\f[R] option.) If the -annotation processor and its dependencies are in modules, you should use -the processor module path instead. -(See the \f[B]\f[BC]\-\-processor\-module\-path\f[B]\f[R] option.) When -those are insufficient, it may be necessary to provide further +(See the \f[B]\f[VB]--processor-path\f[B]\f[R] option.) +If the annotation processor and its dependencies are in modules, you +should use the processor module path instead. +(See the \f[B]\f[VB]--processor-module-path\f[B]\f[R] option.) +When those are insufficient, it may be necessary to provide further configuration of the runtime environment. This can be done in two ways: .IP "1." 3 -If \f[CB]javac\f[R] is invoked from the command line, options can be +If \f[V]javac\f[R] is invoked from the command line, options can be passed to the underlying runtime by prefixing the option with -\f[B]\f[BC]\-J\f[B]\f[R]. +\f[B]\f[VB]-J\f[B]\f[R]. .IP "2." 3 You can start an instance of a Java Virtual Machine directly and use command line options and API to configure an environment in which -\f[CB]javac\f[R] can be invoked via one of its \f[B]APIs\f[R]. +\f[V]javac\f[R] can be invoked via one of its \f[B]APIs\f[R]. .SH COMPILING FOR EARLIER RELEASES OF THE PLATFORM .PP -\f[CB]javac\f[R] can compile code that is to be used on other releases of -the platform, using either the \f[B]\f[BC]\-\-release\f[B]\f[R] option, -or the \f[B]\f[BC]\-\-source\f[B]\f[R]/\f[CB]\-source\f[R] and -\f[B]\f[BC]\-\-target\f[B]\f[R]/\f[CB]\-target\f[R] options, together with +\f[V]javac\f[R] can compile code that is to be used on other releases of +the platform, using either the \f[B]\f[VB]--release\f[B]\f[R] option, or +the \f[B]\f[VB]--source\f[B]\f[R]/\f[V]-source\f[R] and +\f[B]\f[VB]--target\f[B]\f[R]/\f[V]-target\f[R] options, together with additional options to specify the platform classes. .PP Depending on the desired platform release, there are some restrictions @@ -1864,17 +1783,16 @@ that is intended for use with the module system. This includes all of the following options: .RS 2 .IP \[bu] 2 -\f[B]\f[BC]\-\-module\-source\-path\f[B]\f[R], -\f[B]\f[BC]\-\-upgrade\-module\-path\f[B]\f[R], -\f[B]\f[BC]\-\-system\f[B]\f[R], \f[B]\f[BC]\-\-module\-path\f[B]\f[R], -\f[B]\f[BC]\-\-add\-modules\f[B]\f[R], -\f[B]\f[BC]\-\-add\-exports\f[B]\f[R], \f[CB]\-\-add\-opens\f[R], -\f[B]\f[BC]\-\-add\-reads\f[B]\f[R], -\f[B]\f[BC]\-\-limit\-modules\f[B]\f[R], -\f[B]\f[BC]\-\-patch\-module\f[B]\f[R] -.PP -If you use the \f[CB]\-\-source\f[R]/\f[CB]\-source\f[R] or -\f[CB]\-\-target\f[R]/\f[CB]\-target\f[R] options, you should also set the +\f[B]\f[VB]--module-source-path\f[B]\f[R], +\f[B]\f[VB]--upgrade-module-path\f[B]\f[R], +\f[B]\f[VB]--system\f[B]\f[R], \f[B]\f[VB]--module-path\f[B]\f[R], +\f[B]\f[VB]--add-modules\f[B]\f[R], \f[B]\f[VB]--add-exports\f[B]\f[R], +\f[V]--add-opens\f[R], \f[B]\f[VB]--add-reads\f[B]\f[R], +\f[B]\f[VB]--limit-modules\f[B]\f[R], +\f[B]\f[VB]--patch-module\f[B]\f[R] +.PP +If you use the \f[V]--source\f[R]/\f[V]-source\f[R] or +\f[V]--target\f[R]/\f[V]-target\f[R] options, you should also set the appropriate platform classes using the boot class path family of options. .RE @@ -1884,208 +1802,199 @@ that is intended to configure the boot class path. This includes all of the following options: .RS 2 .IP \[bu] 2 -\f[B]\f[BC]\-Xbootclasspath/p:\f[B]\f[R], -\f[B]\f[BC]\-Xbootclasspath\f[B]\f[R], -\f[B]\f[BC]\-Xbootclasspath/a:\f[B]\f[R], -\f[B]\f[BC]\-endorseddirs\f[B]\f[R], -\f[B]\f[BC]\-Djava.endorsed.dirs\f[B]\f[R], -\f[B]\f[BC]\-extdirs\f[B]\f[R], \f[B]\f[BC]\-Djava.ext.dirs\f[B]\f[R], -\f[B]\f[BC]\-profile\f[B]\f[R] +\f[B]\f[VB]-Xbootclasspath/p:\f[B]\f[R], +\f[B]\f[VB]-Xbootclasspath\f[B]\f[R], +\f[B]\f[VB]-Xbootclasspath/a:\f[B]\f[R], +\f[B]\f[VB]-endorseddirs\f[B]\f[R], +\f[B]\f[VB]-Djava.endorsed.dirs\f[B]\f[R], +\f[B]\f[VB]-extdirs\f[B]\f[R], \f[B]\f[VB]-Djava.ext.dirs\f[B]\f[R], +\f[B]\f[VB]-profile\f[B]\f[R] .PP -If you use the \f[CB]\-\-source\f[R]/\f[CB]\-source\f[R] or -\f[CB]\-\-target\f[R]/\f[CB]\-target\f[R] options, you should also set the -appropriate platform classes using the \f[CB]\-\-system\f[R] option to -give the location of an appropriate installed release of JDK. +If you use the \f[V]--source\f[R]/\f[V]-source\f[R] or +\f[V]--target\f[R]/\f[V]-target\f[R] options, you should also set the +appropriate platform classes using the \f[V]--system\f[R] option to give +the location of an appropriate installed release of JDK. .RE .PP -When using the \f[CB]\-\-release\f[R] option, only the supported -documented API for that release may be used; you cannot use any options -to break encapsulation to access any internal classes. +When using the \f[V]--release\f[R] option, only the supported documented +API for that release may be used; you cannot use any options to break +encapsulation to access any internal classes. .SH APIS .PP -The \f[CB]javac\f[R] compiler can be invoked using an API in three +The \f[V]javac\f[R] compiler can be invoked using an API in three different ways: .TP -.B The \f[B]Java Compiler API\f[R] +The \f[B]Java Compiler API\f[R] This provides the most flexible way to invoke the compiler, including the ability to compile source files provided in memory buffers or other -non\-standard file systems. -.RS -.RE +non-standard file systems. .TP -.B The \f[B]ToolProvider API\f[R] -A \f[CB]ToolProvider\f[R] for \f[CB]javac\f[R] can be obtained by calling -\f[CB]ToolProvider.findFirst("javac")\f[R]. +The \f[B]ToolProvider API\f[R] +A \f[V]ToolProvider\f[R] for \f[V]javac\f[R] can be obtained by calling +\f[V]ToolProvider.findFirst(\[dq]javac\[dq])\f[R]. This returns an object with the equivalent functionality of the -command\-line tool. +command-line tool. .RS .PP -\f[B]Note\f[R]: This API should not be confused with the like\-named API -in the \f[B]\f[BC]javax.tools\f[B]\f[R] package. +\f[B]Note\f[R]: This API should not be confused with the like-named API +in the \f[B]\f[VB]javax.tools\f[B]\f[R] package. .RE .TP -.B The \f[CB]javac\f[R] \f[B]Legacy API\f[R] +The \f[V]javac\f[R] \f[B]Legacy API\f[R] This API is retained for backward compatibility only. All new code should use either the Java Compiler API or the ToolProvider API. -.RS -.RE .PP \f[B]Note:\f[R] All other classes and methods found in a package with -names that start with \f[CB]com.sun.tools.javac\f[R] (subpackages of -\f[CB]com.sun.tools.javac\f[R]) are strictly internal and subject to +names that start with \f[V]com.sun.tools.javac\f[R] (subpackages of +\f[V]com.sun.tools.javac\f[R]) are strictly internal and subject to change at any time. -.SH EXAMPLES OF USING \-XLINT KEYS +.SH EXAMPLES OF USING -XLINT KEYS .TP -.B \f[CB]cast\f[R] +\f[V]cast\f[R] Warns about unnecessary and redundant casts, for example: .RS .RS .PP -\f[CB]String\ s\ =\ (String)\ "Hello!"\f[R] +\f[V]String s = (String) \[dq]Hello!\[dq]\f[R] .RE .RE .TP -.B \f[CB]classfile\f[R] +\f[V]classfile\f[R] Warns about issues related to class file contents. -.RS -.RE .TP -.B \f[CB]deprecation\f[R] +\f[V]deprecation\f[R] Warns about the use of deprecated items. For example: .RS .IP .nf \f[CB] -java.util.Date\ myDate\ =\ new\ java.util.Date(); -int\ currentDay\ =\ myDate.getDay(); +java.util.Date myDate = new java.util.Date(); +int currentDay = myDate.getDay(); \f[R] .fi .PP -The method \f[CB]java.util.Date.getDay\f[R] has been deprecated since JDK +The method \f[V]java.util.Date.getDay\f[R] has been deprecated since JDK 1.1. .RE .TP -.B \f[CB]dep\-ann\f[R] -Warns about items that are documented with the \f[CB]\@deprecated\f[R] -Javadoc comment, but do not have the \f[CB]\@Deprecated\f[R] annotation, -for example: +\f[V]dep-ann\f[R] +Warns about items that are documented with the \f[V]\[at]deprecated\f[R] +Javadoc comment, but do not have the \f[V]\[at]Deprecated\f[R] +annotation, for example: .RS .IP .nf \f[CB] /** -\ \ *\ \@deprecated\ As\ of\ Java\ SE\ 7,\ replaced\ by\ {\@link\ #newMethod()} -\ \ */ -public\ static\ void\ deprecatedMethod()\ {\ } -public\ static\ void\ newMethod()\ {\ } + * \[at]deprecated As of Java SE 7, replaced by {\[at]link #newMethod()} + */ +public static void deprecatedMethod() { } +public static void newMethod() { } \f[R] .fi .RE .TP -.B \f[CB]divzero\f[R] +\f[V]divzero\f[R] Warns about division by the constant integer 0, for example: .RS .RS .PP -\f[CB]int\ divideByZero\ =\ 42\ /\ 0;\f[R] +\f[V]int divideByZero = 42 / 0;\f[R] .RE .RE .TP -.B \f[CB]empty\f[R] -Warns about empty statements after \f[CB]if\f[R]statements, for example: +\f[V]empty\f[R] +Warns about empty statements after \f[V]if\f[R]statements, for example: .RS .IP .nf \f[CB] -class\ E\ { -\ \ \ \ void\ m()\ { -\ \ \ \ \ \ \ \ \ if\ (true)\ ; -\ \ \ \ } +class E { + void m() { + if (true) ; + } } \f[R] .fi .RE .TP -.B \f[CB]fallthrough\f[R] -Checks the switch blocks for fall\-through cases and provides a warning +\f[V]fallthrough\f[R] +Checks the switch blocks for fall-through cases and provides a warning message for any that are found. -Fall\-through cases are cases in a switch block, other than the last -case in the block, whose code does not include a \f[CB]break\f[R] -statement, allowing code execution to fall through from that case to the -next case. +Fall-through cases are cases in a switch block, other than the last case +in the block, whose code does not include a \f[V]break\f[R] statement, +allowing code execution to fall through from that case to the next case. For example, the code following the case 1 label in this switch block -does not end with a \f[CB]break\f[R] statement: +does not end with a \f[V]break\f[R] statement: .RS .IP .nf \f[CB] -switch\ (x)\ { -case\ 1: -\ \ System.out.println("1"); -\ \ //\ No\ break\ statement\ here. -case\ 2: -\ \ System.out.println("2"); +switch (x) { +case 1: + System.out.println(\[dq]1\[dq]); + // No break statement here. +case 2: + System.out.println(\[dq]2\[dq]); } \f[R] .fi .PP -If the \f[CB]\-Xlint:fallthrough\f[R] option was used when compiling this -code, then the compiler emits a warning about possible fall\-through -into case, with the line number of the case in question. +If the \f[V]-Xlint:fallthrough\f[R] option was used when compiling this +code, then the compiler emits a warning about possible fall-through into +case, with the line number of the case in question. .RE .TP -.B \f[CB]finally\f[R] -Warns about \f[CB]finally\f[R] clauses that cannot be completed normally, +\f[V]finally\f[R] +Warns about \f[V]finally\f[R] clauses that cannot be completed normally, for example: .RS .IP .nf \f[CB] -public\ static\ int\ m()\ { -\ \ try\ { -\ \ \ \ \ throw\ new\ NullPointerException(); -\ \ }\ \ catch\ (NullPointerException();\ { -\ \ \ \ \ System.err.println("Caught\ NullPointerException."); -\ \ \ \ \ return\ 1; -\ \ \ }\ finally\ { -\ \ \ \ \ return\ 0; -\ \ \ } -\ \ } +public static int m() { + try { + throw new NullPointerException(); + } catch (NullPointerException(); { + System.err.println(\[dq]Caught NullPointerException.\[dq]); + return 1; + } finally { + return 0; + } + } \f[R] .fi .PP -The compiler generates a warning for the \f[CB]finally\f[R] block in this +The compiler generates a warning for the \f[V]finally\f[R] block in this example. -When the \f[CB]int\f[R] method is called, it returns a value of 0. -A \f[CB]finally\f[R] block executes when the \f[CB]try\f[R] block exits. -In this example, when control is transferred to the \f[CB]catch\f[R] -block, the \f[CB]int\f[R] method exits. -However, the \f[CB]finally\f[R] block must execute, so it\[aq]s executed, +When the \f[V]int\f[R] method is called, it returns a value of 0. +A \f[V]finally\f[R] block executes when the \f[V]try\f[R] block exits. +In this example, when control is transferred to the \f[V]catch\f[R] +block, the \f[V]int\f[R] method exits. +However, the \f[V]finally\f[R] block must execute, so it\[aq]s executed, even though control was transferred outside the method. .RE .TP -.B \f[CB]options\f[R] -Warns about issues that related to the use of command\-line options. +\f[V]options\f[R] +Warns about issues that related to the use of command-line options. See \f[B]Compiling for Earlier Releases of the Platform\f[R]. -.RS -.RE .TP -.B \f[CB]overrides\f[R] +\f[V]overrides\f[R] Warns about issues related to method overrides. For example, consider the following two classes: .RS .IP .nf \f[CB] -public\ class\ ClassWithVarargsMethod\ { -\ \ void\ varargsMethod(String...\ s)\ {\ } +public class ClassWithVarargsMethod { + void varargsMethod(String... s) { } } -public\ class\ ClassWithOverridingMethod\ extends\ ClassWithVarargsMethod\ { -\ \ \ \@Override -\ \ \ void\ varargsMethod(String[]\ s)\ {\ } +public class ClassWithOverridingMethod extends ClassWithVarargsMethod { + \[at]Override + void varargsMethod(String[] s) { } } \f[R] .fi @@ -2094,39 +2003,39 @@ The compiler generates a warning similar to the following:. .IP .nf \f[CB] -warning:\ [override]\ varargsMethod(String[])\ in\ ClassWithOverridingMethod -overrides\ varargsMethod(String...)\ in\ ClassWithVarargsMethod;\ overriding -method\ is\ missing\ \[aq]...\[aq] +warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod +overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding +method is missing \[aq]...\[aq] \f[R] .fi .PP -When the compiler encounters a \f[CB]varargs\f[R] method, it translates -the \f[CB]varargs\f[R] formal parameter into an array. -In the method \f[CB]ClassWithVarargsMethod.varargsMethod\f[R], the -compiler translates the \f[CB]varargs\f[R] formal parameter -\f[CB]String...\ s\f[R] to the formal parameter \f[CB]String[]\ s\f[R], an +When the compiler encounters a \f[V]varargs\f[R] method, it translates +the \f[V]varargs\f[R] formal parameter into an array. +In the method \f[V]ClassWithVarargsMethod.varargsMethod\f[R], the +compiler translates the \f[V]varargs\f[R] formal parameter +\f[V]String... s\f[R] to the formal parameter \f[V]String[] s\f[R], an array that matches the formal parameter of the method -\f[CB]ClassWithOverridingMethod.varargsMethod\f[R]. +\f[V]ClassWithOverridingMethod.varargsMethod\f[R]. Consequently, this example compiles. .RE .TP -.B \f[CB]path\f[R] +\f[V]path\f[R] Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths). -Such warnings cannot be suppressed with the \f[CB]\@SuppressWarnings\f[R] -annotation. +Such warnings cannot be suppressed with the +\f[V]\[at]SuppressWarnings\f[R] annotation. For example: .RS .IP \[bu] 2 \f[B]Linux and macOS:\f[R] -\f[CB]javac\ \-Xlint:path\ \-classpath\ /nonexistentpath\ Example.java\f[R] +\f[V]javac -Xlint:path -classpath /nonexistentpath Example.java\f[R] .IP \[bu] 2 \f[B]Windows:\f[R] -\f[CB]javac\ \-Xlint:path\ \-classpath\ C:\\nonexistentpath\ Example.java\f[R] +\f[V]javac -Xlint:path -classpath C:\[rs]nonexistentpath Example.java\f[R] .RE .TP -.B \f[CB]processing\f[R] +\f[V]processing\f[R] Warns about issues related to annotation processing. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that @@ -2138,20 +2047,20 @@ For example, the following is a simple annotation processor: .IP .nf \f[CB] -import\ java.util.*; -import\ javax.annotation.processing.*; -import\ javax.lang.model.*; -import\ javax.lang.model.element.*; +import java.util.*; +import javax.annotation.processing.*; +import javax.lang.model.*; +import javax.lang.model.element.*; -\@SupportedAnnotationTypes("NotAnno") -public\ class\ AnnoProc\ extends\ AbstractProcessor\ { -\ \ public\ boolean\ process(Set\ elems,\ RoundEnvironment\ renv){ -\ \ \ \ \ return\ true; -\ \ } +\[at]SupportedAnnotationTypes(\[dq]NotAnno\[dq]) +public class AnnoProc extends AbstractProcessor { + public boolean process(Set elems, RoundEnvironment renv){ + return true; + } -\ \ public\ SourceVersion\ getSupportedSourceVersion()\ { -\ \ \ \ \ return\ SourceVersion.latest(); -\ \ \ } + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } } \f[R] .fi @@ -2160,83 +2069,83 @@ public\ class\ AnnoProc\ extends\ AbstractProcessor\ { .IP .nf \f[CB] -\@interface\ Anno\ {\ } +\[at]interface Anno { } -\@Anno -class\ AnnosWithoutProcessors\ {\ } +\[at]Anno +class AnnosWithoutProcessors { } \f[R] .fi .PP The following commands compile the annotation processor -\f[CB]AnnoProc\f[R], then run this annotation processor against the source -file \f[CB]AnnosWithoutProcessors.java\f[R]: +\f[V]AnnoProc\f[R], then run this annotation processor against the +source file \f[V]AnnosWithoutProcessors.java\f[R]: .IP .nf \f[CB] -javac\ AnnoProc.java -javac\ \-cp\ .\ \-Xlint:processing\ \-processor\ AnnoProc\ \-proc:only\ AnnosWithoutProcessors.java +javac AnnoProc.java +javac -cp . -Xlint:processing -processor AnnoProc -proc:only AnnosWithoutProcessors.java \f[R] .fi .PP When the compiler runs the annotation processor against the source file -\f[CB]AnnosWithoutProcessors.java\f[R], it generates the following +\f[V]AnnosWithoutProcessors.java\f[R], it generates the following warning: .IP .nf \f[CB] -warning:\ [processing]\ No\ processor\ claimed\ any\ of\ these\ annotations:\ Anno +warning: [processing] No processor claimed any of these annotations: Anno \f[R] .fi .PP To resolve this issue, you can rename the annotation defined and used in -the class \f[CB]AnnosWithoutProcessors\f[R] from \f[CB]Anno\f[R] to -\f[CB]NotAnno\f[R]. +the class \f[V]AnnosWithoutProcessors\f[R] from \f[V]Anno\f[R] to +\f[V]NotAnno\f[R]. .RE .TP -.B \f[CB]rawtypes\f[R] +\f[V]rawtypes\f[R] Warns about unchecked operations on raw types. -The following statement generates a \f[CB]rawtypes\f[R] warning: +The following statement generates a \f[V]rawtypes\f[R] warning: .RS .RS .PP -\f[CB]void\ countElements(List\ l)\ {\ ...\ }\f[R] +\f[V]void countElements(List l) { ... }\f[R] .RE .PP -The following example does not generate a \f[CB]rawtypes\f[R] warning: +The following example does not generate a \f[V]rawtypes\f[R] warning: .RS .PP -\f[CB]void\ countElements(List\ l)\ {\ ...\ }\f[R] +\f[V]void countElements(List l) { ... }\f[R] .RE .PP -\f[CB]List\f[R] is a raw type. -However, \f[CB]List\f[R] is an unbounded wildcard parameterized type. -Because \f[CB]List\f[R] is a parameterized interface, always specify its +\f[V]List\f[R] is a raw type. +However, \f[V]List\f[R] is an unbounded wildcard parameterized type. +Because \f[V]List\f[R] is a parameterized interface, always specify its type argument. -In this example, the \f[CB]List\f[R] formal argument is specified with an -unbounded wildcard (\f[CB]?\f[R]) as its formal type parameter, which -means that the \f[CB]countElements\f[R] method can accept any -instantiation of the \f[CB]List\f[R] interface. +In this example, the \f[V]List\f[R] formal argument is specified with an +unbounded wildcard (\f[V]?\f[R]) as its formal type parameter, which +means that the \f[V]countElements\f[R] method can accept any +instantiation of the \f[V]List\f[R] interface. .RE .TP -.B \f[CB]serial\f[R] -Warns about missing \f[CB]serialVersionUID\f[R] definitions on +\f[V]serial\f[R] +Warns about missing \f[V]serialVersionUID\f[R] definitions on serializable classes. For example: .RS .IP .nf \f[CB] -public\ class\ PersistentTime\ implements\ Serializable +public class PersistentTime implements Serializable { -\ \ private\ Date\ time; + private Date time; -\ \ \ public\ PersistentTime()\ { -\ \ \ \ \ time\ =\ Calendar.getInstance().getTime(); -\ \ \ } + public PersistentTime() { + time = Calendar.getInstance().getTime(); + } -\ \ \ public\ Date\ getTime()\ { -\ \ \ \ \ return\ time; -\ \ \ } + public Date getTime() { + return time; + } } \f[R] .fi @@ -2245,37 +2154,37 @@ The compiler generates the following warning: .IP .nf \f[CB] -warning:\ [serial]\ serializable\ class\ PersistentTime\ has\ no\ definition\ of +warning: [serial] serializable class PersistentTime has no definition of serialVersionUID \f[R] .fi .PP If a serializable class does not explicitly declare a field named -\f[CB]serialVersionUID\f[R], then the serialization runtime environment -calculates a default \f[CB]serialVersionUID\f[R] value for that class +\f[V]serialVersionUID\f[R], then the serialization runtime environment +calculates a default \f[V]serialVersionUID\f[R] value for that class based on various aspects of the class, as described in the Java Object Serialization Specification. However, it\[aq]s strongly recommended that all serializable classes -explicitly declare \f[CB]serialVersionUID\f[R] values because the default -process of computing \f[CB]serialVersionUID\f[R] values is highly +explicitly declare \f[V]serialVersionUID\f[R] values because the default +process of computing \f[V]serialVersionUID\f[R] values is highly sensitive to class details that can vary depending on compiler implementations. As a result, this might cause an unexpected -\f[CB]InvalidClassExceptions\f[R] during deserialization. -To guarantee a consistent \f[CB]serialVersionUID\f[R] value across +\f[V]InvalidClassExceptions\f[R] during deserialization. +To guarantee a consistent \f[V]serialVersionUID\f[R] value across different Java compiler implementations, a serializable class must -declare an explicit \f[CB]serialVersionUID\f[R] value. +declare an explicit \f[V]serialVersionUID\f[R] value. .RE .TP -.B \f[CB]static\f[R] +\f[V]static\f[R] Warns about issues relating to the use of static variables, for example: .RS .IP .nf \f[CB] -class\ XLintStatic\ { -\ \ \ \ static\ void\ m1()\ {\ } -\ \ \ \ void\ m2()\ {\ this.m1();\ } +class XLintStatic { + static void m1() { } + void m2() { this.m1(); } } \f[R] .fi @@ -2284,112 +2193,115 @@ The compiler generates the following warning: .IP .nf \f[CB] -warning:\ [static]\ static\ method\ should\ be\ qualified\ by\ type\ name, -XLintStatic,\ instead\ of\ by\ an\ expression +warning: [static] static method should be qualified by type name, +XLintStatic, instead of by an expression \f[R] .fi .PP -To resolve this issue, you can call the \f[CB]static\f[R] method -\f[CB]m1\f[R] as follows: +To resolve this issue, you can call the \f[V]static\f[R] method +\f[V]m1\f[R] as follows: .RS .PP -\f[CB]XLintStatic.m1();\f[R] +\f[V]XLintStatic.m1();\f[R] .RE .PP -Alternately, you can remove the \f[CB]static\f[R] keyword from the -declaration of the method \f[CB]m1\f[R]. +Alternately, you can remove the \f[V]static\f[R] keyword from the +declaration of the method \f[V]m1\f[R]. .RE .TP -.B \f[CB]try\f[R] -Warns about issues relating to the use of \f[CB]try\f[R] blocks, including -try\-with\-resources statements. +\f[V]try\f[R] +Warns about issues relating to the use of \f[V]try\f[R] blocks, +including try-with-resources statements. For example, a warning is generated for the following statement because -the resource \f[CB]ac\f[R] declared in the \f[CB]try\f[R] block is not used: +the resource \f[V]ac\f[R] declared in the \f[V]try\f[R] block is not +used: .RS .IP .nf \f[CB] -try\ (\ AutoCloseable\ ac\ =\ getResource()\ )\ {\ \ \ \ //\ do\ nothing} +try ( AutoCloseable ac = getResource() ) { // do nothing} \f[R] .fi .RE .TP -.B \f[CB]unchecked\f[R] +\f[V]unchecked\f[R] Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example: .RS .IP .nf \f[CB] -List\ l\ =\ new\ ArrayList(); -List\ ls\ =\ l;\ \ \ \ \ \ \ //\ unchecked\ warning +List l = new ArrayList(); +List ls = l; // unchecked warning \f[R] .fi .PP -During type erasure, the types \f[CB]ArrayList\f[R] and -\f[CB]List\f[R] become \f[CB]ArrayList\f[R] and \f[CB]List\f[R], +During type erasure, the types \f[V]ArrayList\f[R] and +\f[V]List\f[R] become \f[V]ArrayList\f[R] and \f[V]List\f[R], respectively. .PP -The \f[CB]ls\f[R] command has the parameterized type -\f[CB]List\f[R]. -When the \f[CB]List\f[R] referenced by \f[CB]l\f[R] is assigned to -\f[CB]ls\f[R], the compiler generates an unchecked warning. +The \f[V]ls\f[R] command has the parameterized type +\f[V]List\f[R]. +When the \f[V]List\f[R] referenced by \f[V]l\f[R] is assigned to +\f[V]ls\f[R], the compiler generates an unchecked warning. At compile time, the compiler and JVM cannot determine whether -\f[CB]l\f[R] refers to a \f[CB]List\f[R] type. -In this case, \f[CB]l\f[R] does not refer to a \f[CB]List\f[R] type. +\f[V]l\f[R] refers to a \f[V]List\f[R] type. +In this case, \f[V]l\f[R] does not refer to a \f[V]List\f[R] +type. As a result, heap pollution occurs. .PP -A heap pollution situation occurs when the \f[CB]List\f[R] object -\f[CB]l\f[R], whose static type is \f[CB]List\f[R], is assigned to -another \f[CB]List\f[R] object, \f[CB]ls\f[R], that has a different static -type, \f[CB]List\f[R]. +A heap pollution situation occurs when the \f[V]List\f[R] object +\f[V]l\f[R], whose static type is \f[V]List\f[R], is assigned to +another \f[V]List\f[R] object, \f[V]ls\f[R], that has a different static +type, \f[V]List\f[R]. However, the compiler still allows this assignment. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics. -Because of type erasure, \f[CB]List\f[R] and \f[CB]List\f[R] -both become \f[CB]List\f[R]. +Because of type erasure, \f[V]List\f[R] and +\f[V]List\f[R] both become \f[V]List\f[R]. Consequently, the compiler allows the assignment of the object -\f[CB]l\f[R], which has a raw type of \f[CB]List\f[R], to the object -\f[CB]ls\f[R]. +\f[V]l\f[R], which has a raw type of \f[V]List\f[R], to the object +\f[V]ls\f[R]. .RE .TP -.B \f[CB]varargs\f[R] -Warns about unsafe use of variable arguments (\f[CB]varargs\f[R]) methods, -in particular, those that contain non\-reifiable arguments, for example: +\f[V]varargs\f[R] +Warns about unsafe use of variable arguments (\f[V]varargs\f[R]) +methods, in particular, those that contain non-reifiable arguments, for +example: .RS .IP .nf \f[CB] -public\ class\ ArrayBuilder\ { -\ \ public\ static\ \ void\ addToList\ (List\ listArg,\ T...\ elements)\ { -\ \ \ \ for\ (T\ x\ :\ elements)\ { -\ \ \ \ \ \ listArg.add(x); -\ \ \ \ } -\ \ } +public class ArrayBuilder { + public static void addToList (List listArg, T... elements) { + for (T x : elements) { + listArg.add(x); + } + } } \f[R] .fi .PP -A non\-reifiable type is a type whose type information is not fully +A non-reifiable type is a type whose type information is not fully available at runtime. .PP The compiler generates the following warning for the definition of the -method \f[CB]ArrayBuilder.addToList\f[R]: +method \f[V]ArrayBuilder.addToList\f[R]: .IP .nf \f[CB] -warning:\ [varargs]\ Possible\ heap\ pollution\ from\ parameterized\ vararg\ type\ T +warning: [varargs] Possible heap pollution from parameterized vararg type T \f[R] .fi .PP When the compiler encounters a varargs method, it translates the -\f[CB]varargs\f[R] formal parameter into an array. +\f[V]varargs\f[R] formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. -In the method \f[CB]ArrayBuilder.addToList\f[R], the compiler translates -the \f[CB]varargs\f[R] formal parameter \f[CB]T...\f[R] elements to the -formal parameter \f[CB]T[]\f[R] elements, an array. +In the method \f[V]ArrayBuilder.addToList\f[R], the compiler translates +the \f[V]varargs\f[R] formal parameter \f[V]T...\f[R] elements to the +formal parameter \f[V]T[]\f[R] elements, an array. However, because of type erasure, the compiler converts the -\f[CB]varargs\f[R] formal parameter to \f[CB]Object[]\f[R] elements. +\f[V]varargs\f[R] formal parameter to \f[V]Object[]\f[R] elements. Consequently, there\[aq]s a possibility of heap pollution. .RE diff --git a/src/jdk.compiler/share/man/serialver.1 b/src/jdk.compiler/share/man/serialver.1 index a2e3db1ec237f..893f561c8e896 100644 --- a/src/jdk.compiler/share/man/serialver.1 +++ b/src/jdk.compiler/share/man/serialver.1 @@ -19,66 +19,72 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "SERIALVER" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "SERIALVER" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -serialver \- return the \f[CB]serialVersionUID\f[R] for one or more +serialver - return the \f[V]serialVersionUID\f[R] for one or more classes in a form suitable for copying into an evolving class .SH SYNOPSIS .PP -\f[CB]serialver\f[R] [\f[I]options\f[R]] [\f[I]classnames\f[R]] +\f[V]serialver\f[R] [\f[I]options\f[R]] [\f[I]classnames\f[R]] .TP -.B \f[I]options\f[R] -This represents the command\-line options for the \f[CB]serialver\f[R] +\f[I]options\f[R] +This represents the command-line options for the \f[V]serialver\f[R] command. See \f[B]Options for serialver\f[R]. -.RS -.RE .TP -.B \f[I]classnames\f[R] -The classes for which \f[CB]serialVersionUID\f[R] is to be returned. -.RS -.RE +\f[I]classnames\f[R] +The classes for which \f[V]serialVersionUID\f[R] is to be returned. .SH DESCRIPTION .PP -The \f[CB]serialver\f[R] command returns the \f[CB]serialVersionUID\f[R] for -one or more classes in a form suitable for copying into an evolving +The \f[V]serialver\f[R] command returns the \f[V]serialVersionUID\f[R] +for one or more classes in a form suitable for copying into an evolving class. -When called with no arguments, the \f[CB]serialver\f[R] command prints a +When called with no arguments, the \f[V]serialver\f[R] command prints a usage line. .SH OPTIONS FOR SERIALVER .TP -.B \f[CB]\-classpath\f[R] \f[I]path\-files\f[R] +\f[V]-classpath\f[R] \f[I]path-files\f[R] Sets the search path for application classes and resources. Separate classes and resources with a colon (:). -.RS -.RE .TP -.B \f[CB]\-J\f[R]\f[I]option\f[R] +\f[V]-J\f[R]\f[I]option\f[R] Passes the specified \f[I]option\f[R] to the Java Virtual Machine, where \f[I]option\f[R] is one of the options described on the reference page for the Java application launcher. -For example, \f[CB]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. -.RS -.RE +For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB. .SH NOTES .PP -The \f[CB]serialver\f[R] command loads and initializes the specified +The \f[V]serialver\f[R] command loads and initializes the specified classes in its virtual machine, and by default, it doesn\[aq]t set a security manager. -If the \f[CB]serialver\f[R] command is to be run with untrusted classes, +If the \f[V]serialver\f[R] command is to be run with untrusted classes, then a security manager can be set with the following option: .RS .PP -\f[CB]\-J\-Djava.security.manager\f[R] +\f[V]-J-Djava.security.manager\f[R] .RE .PP When necessary, a security policy can be specified with the following option: .RS .PP -\f[CB]\-J\-Djava.security.policy=\f[R]\f[I]policy_file\f[R] +\f[V]-J-Djava.security.policy=\f[R]\f[I]policy_file\f[R] .RE diff --git a/src/jdk.hotspot.agent/share/man/jhsdb.1 b/src/jdk.hotspot.agent/share/man/jhsdb.1 index 421290b4887db..c0b58fa5110e6 100644 --- a/src/jdk.hotspot.agent/share/man/jhsdb.1 +++ b/src/jdk.hotspot.agent/share/man/jhsdb.1 @@ -19,242 +19,196 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JHSDB" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JHSDB" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jhsdb \- attach to a Java process or launch a postmortem debugger to +jhsdb - attach to a Java process or launch a postmortem debugger to analyze the content of a core dump from a crashed Java Virtual Machine (JVM) .SH SYNOPSIS .PP -\f[CB]jhsdb\f[R] \f[CB]clhsdb\f[R] [\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] +\f[V]jhsdb\f[R] \f[V]clhsdb\f[R] [\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R]] .PP -\f[CB]jhsdb\f[R] \f[CB]hsdb\f[R] [\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] +\f[V]jhsdb\f[R] \f[V]hsdb\f[R] [\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R]] .PP -\f[CB]jhsdb\f[R] \f[CB]debugd\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] +\f[V]jhsdb\f[R] \f[V]debugd\f[R] (\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R]) [\f[I]options\f[R]] .PP -\f[CB]jhsdb\f[R] \f[CB]jstack\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R] -| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R]) +\f[V]jhsdb\f[R] \f[V]jstack\f[R] (\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R] +| \f[V]--connect\f[R] \f[I][server-id\[at]]debugd-host\f[R]) [\f[I]options\f[R]] .PP -\f[CB]jhsdb\f[R] \f[CB]jmap\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R] -| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R]) +\f[V]jhsdb\f[R] \f[V]jmap\f[R] (\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R] +| \f[V]--connect\f[R] \f[I][server-id\[at]]debugd-host\f[R]) [\f[I]options\f[R]] .PP -\f[CB]jhsdb\f[R] \f[CB]jinfo\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R] -| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R]) +\f[V]jhsdb\f[R] \f[V]jinfo\f[R] (\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R] +| \f[V]--connect\f[R] \f[I][server-id\[at]]debugd-host\f[R]) [\f[I]options\f[R]] .PP -\f[CB]jhsdb\f[R] \f[CB]jsnap\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] | -\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R] -| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R]) +\f[V]jhsdb\f[R] \f[V]jsnap\f[R] (\f[V]--pid\f[R] \f[I]pid\f[R] | +\f[V]--exe\f[R] \f[I]executable\f[R] \f[V]--core\f[R] \f[I]coredump\f[R] +| \f[V]--connect\f[R] \f[I][server-id\[at]]debugd-host\f[R]) [\f[I]options\f[R]] .TP -.B \f[I]pid\f[R] -The process ID to which the \f[CB]jhsdb\f[R] tool should attach. +\f[I]pid\f[R] +The process ID to which the \f[V]jhsdb\f[R] tool should attach. The process must be a Java process. To get a list of Java processes running on a machine, use the -\f[CB]ps\f[R] command or, if the JVM processes are not running in a +\f[V]ps\f[R] command or, if the JVM processes are not running in a separate docker instance, the \f[B]jps\f[R] command. -.RS -.RE .TP -.B \f[I]executable\f[R] +\f[I]executable\f[R] The Java executable file from which the core dump was produced. -.RS -.RE .TP -.B \f[I]coredump\f[R] -The core file to which the \f[CB]jhsdb\f[R] tool should attach. -.RS -.RE +\f[I]coredump\f[R] +The core file to which the \f[V]jhsdb\f[R] tool should attach. .TP -.B \f[I][server\-id\@]debugd\-host\f[R] +\f[I][server-id\[at]]debugd-host\f[R] An optional server ID and the address of the remote debug server (debugd). -.RS -.RE .TP -.B \f[I]options\f[R] -The command\-line options for a \f[CB]jhsdb\f[R] mode. +\f[I]options\f[R] +The command-line options for a \f[V]jhsdb\f[R] mode. See \f[B]Options for the debugd Mode\f[R], \f[B]Options for the jstack -Mode\f[R], \f[B]Options for the jmap Mode\f[R], \f[B]Options for the jinfo -Mode\f[R], and \f[B]Options for the jsnap Mode\f[R]. -.RS -.RE +Mode\f[R], \f[B]Options for the jmap Mode\f[R], \f[B]Options for the +jinfo Mode\f[R], and \f[B]Options for the jsnap Mode\f[R]. .PP \f[B]Note:\f[R] .PP Either the \f[I]pid\f[R] or the pair of \f[I]executable\f[R] and -\f[I]core\f[R] files or the \f[I][server\-id\@]debugd\-host\f[R] must be -provided for \f[CB]debugd\f[R], \f[CB]jstack\f[R], \f[CB]jmap\f[R], -\f[CB]jinfo\f[R] and \f[CB]jsnap\f[R] modes. +\f[I]core\f[R] files or the \f[I][server-id\[at]]debugd-host\f[R] must +be provided for \f[V]debugd\f[R], \f[V]jstack\f[R], \f[V]jmap\f[R], +\f[V]jinfo\f[R] and \f[V]jsnap\f[R] modes. .SH DESCRIPTION .PP -You can use the \f[CB]jhsdb\f[R] tool to attach to a Java process or to -launch a postmortem debugger to analyze the content of a core\-dump from +You can use the \f[V]jhsdb\f[R] tool to attach to a Java process or to +launch a postmortem debugger to analyze the content of a core-dump from a crashed Java Virtual Machine (JVM). This command is experimental and unsupported. .PP \f[B]Note:\f[R] .PP -Attaching the \f[CB]jhsdb\f[R] tool to a live process will cause the +Attaching the \f[V]jhsdb\f[R] tool to a live process will cause the process to hang and the process will probably crash when the debugger detaches. .PP -The \f[CB]jhsdb\f[R] tool can be launched in any one of the following +The \f[V]jhsdb\f[R] tool can be launched in any one of the following modes: .TP -.B \f[CB]jhsdb\ clhsdb\f[R] -Starts the interactive command\-line debugger. -.RS -.RE +\f[V]jhsdb clhsdb\f[R] +Starts the interactive command-line debugger. .TP -.B \f[CB]jhsdb\ hsdb\f[R] +\f[V]jhsdb hsdb\f[R] Starts the interactive GUI debugger. -.RS -.RE .TP -.B \f[CB]jhsdb\ debugd\f[R] +\f[V]jhsdb debugd\f[R] Starts the remote debug server. -.RS -.RE .TP -.B \f[CB]jhsdb\ jstack\f[R] +\f[V]jhsdb jstack\f[R] Prints stack and locks information. -.RS -.RE .TP -.B \f[CB]jhsdb\ jmap\f[R] +\f[V]jhsdb jmap\f[R] Prints heap information. -.RS -.RE .TP -.B \f[CB]jhsdb\ jinfo\f[R] +\f[V]jhsdb jinfo\f[R] Prints basic JVM information. -.RS -.RE .TP -.B \f[CB]jhsdb\ jsnap\f[R] +\f[V]jhsdb jsnap\f[R] Prints performance counter information. -.RS -.RE .TP -.B \f[CB]jhsdb\f[R] \f[I]command\f[R] \f[CB]\-\-help\f[R] +\f[V]jhsdb\f[R] \f[I]command\f[R] \f[V]--help\f[R] Displays the options available for the \f[I]command\f[R]. -.RS -.RE .SH OPTIONS FOR THE DEBUGD MODE .TP -.B \f[CB]\-\-serverid\f[R] \f[I]server\-id\f[R] +\f[V]--serverid\f[R] \f[I]server-id\f[R] An optional unique ID for this debug server. This is required if multiple debug servers are run on the same machine. -.RS -.RE .TP -.B \f[CB]\-\-rmiport\f[R] \f[I]port\f[R] +\f[V]--rmiport\f[R] \f[I]port\f[R] Sets the port number to which the RMI connector is bound. If not specified a random available port is used. -.RS -.RE .TP -.B \f[CB]\-\-registryport\f[R] \f[I]port\f[R] +\f[V]--registryport\f[R] \f[I]port\f[R] Sets the RMI registry port. This option overrides the system property \[aq]sun.jvm.hotspot.rmi.port\[aq]. If not specified, the system property is used. If the system property is not set, the default port 1099 is used. -.RS -.RE .TP -.B \f[CB]\-\-hostname\f[R] \f[I]hostname\f[R] +\f[V]--hostname\f[R] \f[I]hostname\f[R] Sets the hostname the RMI connector is bound. The value could be a hostname or an IPv4/IPv6 address. This option overrides the system property \[aq]java.rmi.server.hostname\[aq]. If not specified, the system property is used. If the system property is not set, a system hostname is used. -.RS -.RE .SH OPTIONS FOR THE JINFO MODE .TP -.B \f[CB]\-\-flags\f[R] +\f[V]--flags\f[R] Prints the VM flags. -.RS -.RE .TP -.B \f[CB]\-\-sysprops\f[R] +\f[V]--sysprops\f[R] Prints the Java system properties. -.RS -.RE .TP -.B no option +no option Prints the VM flags and the Java system properties. -.RS -.RE .SH OPTIONS FOR THE JMAP MODE .TP -.B no option -Prints the same information as Solaris \f[CB]pmap\f[R]. -.RS -.RE +no option +Prints the same information as Solaris \f[V]pmap\f[R]. .TP -.B \f[CB]\-\-heap\f[R] -Prints the \f[CB]java\f[R] heap summary. -.RS -.RE +\f[V]--heap\f[R] +Prints the \f[V]java\f[R] heap summary. .TP -.B \f[CB]\-\-binaryheap\f[R] -Dumps the \f[CB]java\f[R] heap in \f[CB]hprof\f[R] binary format. -.RS -.RE +\f[V]--binaryheap\f[R] +Dumps the \f[V]java\f[R] heap in \f[V]hprof\f[R] binary format. .TP -.B \f[CB]\-\-dumpfile\f[R] \f[I]name\f[R] +\f[V]--dumpfile\f[R] \f[I]name\f[R] The name of the dumpfile. -.RS -.RE .TP -.B \f[CB]\-\-histo\f[R] -Prints the histogram of \f[CB]java\f[R] object heap. -.RS -.RE +\f[V]--histo\f[R] +Prints the histogram of \f[V]java\f[R] object heap. .TP -.B \f[CB]\-\-clstats\f[R] +\f[V]--clstats\f[R] Prints the class loader statistics. -.RS -.RE .TP -.B \f[CB]\-\-finalizerinfo\f[R] +\f[V]--finalizerinfo\f[R] Prints the information on objects awaiting finalization. -.RS -.RE .SH OPTIONS FOR THE JSTACK MODE .TP -.B \f[CB]\-\-locks\f[R] -Prints the \f[CB]java.util.concurrent\f[R] locks information. -.RS -.RE +\f[V]--locks\f[R] +Prints the \f[V]java.util.concurrent\f[R] locks information. .TP -.B \f[CB]\-\-mixed\f[R] -Attempts to print both \f[CB]java\f[R] and native frames if the platform +\f[V]--mixed\f[R] +Attempts to print both \f[V]java\f[R] and native frames if the platform allows it. -.RS -.RE .SH OPTIONS FOR THE JSNAP MODE .TP -.B \f[CB]\-\-all\f[R] +\f[V]--all\f[R] Prints all performance counters. -.RS -.RE diff --git a/src/jdk.httpserver/share/man/jwebserver.1 b/src/jdk.httpserver/share/man/jwebserver.1 index c31bb8ed47251..2a738c90343ac 100644 --- a/src/jdk.httpserver/share/man/jwebserver.1 +++ b/src/jdk.httpserver/share/man/jwebserver.1 @@ -19,32 +19,44 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JWEBSERVER" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JWEBSERVER" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jwebserver \- launch the Java Simple Web Server +jwebserver - launch the Java Simple Web Server .SH SYNOPSIS .PP -\f[CB]jwebserver\f[R] [\f[I]options\f[R]] +\f[V]jwebserver\f[R] [\f[I]options\f[R]] .TP -.B \f[I]options\f[R] -Command\-line options. +\f[I]options\f[R] +Command-line options. For a detailed description of the options, see \f[B]Options\f[R]. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jwebserver\f[R] tool provides a minimal HTTP server, designed to -be used for prototyping, testing, and debugging. +The \f[V]jwebserver\f[R] tool provides a minimal HTTP server, designed +to be used for prototyping, testing, and debugging. It serves a single directory hierarchy, and only serves static files. Only HTTP/1.1 is supported; HTTP/2 and HTTPS are not supported. .PP Only idempotent HEAD and GET requests are served. -Any other requests receive a \f[CB]501\ \-\ Not\ Implemented\f[R] or a -\f[CB]405\ \-\ Not\ Allowed\f[R] response. +Any other requests receive a \f[V]501 - Not Implemented\f[R] or a +\f[V]405 - Not Allowed\f[R] response. GET requests are mapped to the directory being served, as follows: .IP \[bu] 2 If the requested resource is a file, its content is served. @@ -56,103 +68,88 @@ Otherwise, the names of all files and subdirectories of the directory are listed. Symbolic links and hidden files are not listed or served. .PP -MIME types are configured automatically, using the built\-in table. -For example, \f[CB]\&.html\f[R] files are served as \f[CB]text/html\f[R] and -\f[CB]\&.java\f[R] files are served as \f[CB]text/plain\f[R]. +MIME types are configured automatically, using the built-in table. +For example, \f[V].html\f[R] files are served as \f[V]text/html\f[R] and +\f[V].java\f[R] files are served as \f[V]text/plain\f[R]. .PP -\f[CB]jwebserver\f[R] is located in the jdk.httpserver module, and can -alternatively be started with \f[CB]java\ \-m\ jdk.httpserver\f[R]. +\f[V]jwebserver\f[R] is located in the jdk.httpserver module, and can +alternatively be started with \f[V]java -m jdk.httpserver\f[R]. It is based on the web server implementation in the -\f[CB]com.sun.net.httpserver\f[R] package. -The \f[CB]com.sun.net.httpserver.SimpleFileServer\f[R] class provides a +\f[V]com.sun.net.httpserver\f[R] package. +The \f[V]com.sun.net.httpserver.SimpleFileServer\f[R] class provides a programmatic way to retrieve the server and its components for reuse and extension. .SH USAGE .IP .nf \f[CB] -jwebserver\ [\-b\ bind\ address]\ [\-p\ port]\ [\-d\ directory] -\ \ \ \ \ \ \ \ \ \ \ [\-o\ none|info|verbose]\ [\-h\ to\ show\ options] -\ \ \ \ \ \ \ \ \ \ \ [\-version\ to\ show\ version\ information] +jwebserver [-b bind address] [-p port] [-d directory] + [-o none|info|verbose] [-h to show options] + [-version to show version information] \f[R] .fi .SH OPTIONS .TP -.B \f[CB]\-h\f[R] or \f[CB]\-?\f[R] or \f[CB]\-\-help\f[R] +\f[V]-h\f[R] or \f[V]-?\f[R] or \f[V]--help\f[R] Prints the help message and exits. -.RS -.RE .TP -.B \f[CB]\-b\f[R] \f[I]addr\f[R] or \f[CB]\-\-bind\-address\f[R] \f[I]addr\f[R] +\f[V]-b\f[R] \f[I]addr\f[R] or \f[V]--bind-address\f[R] \f[I]addr\f[R] Specifies the address to bind to. Default: 127.0.0.1 or ::1 (loopback). -For all interfaces use \f[CB]\-b\ 0.0.0.0\f[R] or \f[CB]\-b\ ::\f[R]. -.RS -.RE +For all interfaces use \f[V]-b 0.0.0.0\f[R] or \f[V]-b ::\f[R]. .TP -.B \f[CB]\-d\f[R] \f[I]dir\f[R] or \f[CB]\-\-directory\f[R] \f[I]dir\f[R] +\f[V]-d\f[R] \f[I]dir\f[R] or \f[V]--directory\f[R] \f[I]dir\f[R] Specifies the directory to serve. Default: current directory. -.RS -.RE .TP -.B \f[CB]\-o\f[R] \f[I]level\f[R] or \f[CB]\-\-output\f[R] \f[I]level\f[R] +\f[V]-o\f[R] \f[I]level\f[R] or \f[V]--output\f[R] \f[I]level\f[R] Specifies the output format. -\f[CB]none\f[R] | \f[CB]info\f[R] | \f[CB]verbose\f[R]. -Default: \f[CB]info\f[R]. -.RS -.RE +\f[V]none\f[R] | \f[V]info\f[R] | \f[V]verbose\f[R]. +Default: \f[V]info\f[R]. .TP -.B \f[CB]\-p\f[R] \f[I]port\f[R] or \f[CB]\-\-port\f[R] \f[I]port\f[R] +\f[V]-p\f[R] \f[I]port\f[R] or \f[V]--port\f[R] \f[I]port\f[R] Specifies the port to listen on. Default: 8000. -.RS -.RE .TP -.B \f[CB]\-version\f[R] or \f[CB]\-\-version\f[R] +\f[V]-version\f[R] or \f[V]--version\f[R] Prints the version information and exits. -.RS -.RE .PP -To stop the server, press \f[CB]Ctrl\ +\ C\f[R]. +To stop the server, press \f[V]Ctrl + C\f[R]. .SH STARTING THE SERVER .PP The following command starts the Simple Web Server: .IP .nf \f[CB] -$\ jwebserver +$ jwebserver \f[R] .fi .PP If startup is successful, the server prints a message to -\f[CB]System.out\f[R] listing the local address and the absolute path of +\f[V]System.out\f[R] listing the local address and the absolute path of the directory being served. For example: .IP .nf \f[CB] -$\ jwebserver -Binding\ to\ loopback\ by\ default.\ For\ all\ interfaces\ use\ "\-b\ 0.0.0.0"\ or\ "\-b\ ::". -Serving\ /cwd\ and\ subdirectories\ on\ 127.0.0.1\ port\ 8000 -URL\ http://127.0.0.1:8000/ +$ jwebserver +Binding to loopback by default. For all interfaces use \[dq]-b 0.0.0.0\[dq] or \[dq]-b ::\[dq]. +Serving /cwd and subdirectories on 127.0.0.1 port 8000 +URL http://127.0.0.1:8000/ \f[R] .fi .SH CONFIGURATION .PP By default, the server runs in the foreground and binds to the loopback address and port 8000. -This can be changed with the \f[CB]\-b\f[R] and \f[CB]\-p\f[R] options. -.PD 0 -.P -.PD +This can be changed with the \f[V]-b\f[R] and \f[V]-p\f[R] options. For example, to bind the Simple Web Server to all interfaces, use: .IP .nf \f[CB] -$\ jwebserver\ \-b\ 0.0.0.0 -Serving\ /cwd\ and\ subdirectories\ on\ 0.0.0.0\ (all\ interfaces)\ port\ 8000 -URL\ http://123.456.7.891:8000/ +$ jwebserver -b 0.0.0.0 +Serving /cwd and subdirectories on 0.0.0.0 (all interfaces) port 8000 +URL http://123.456.7.891:8000/ \f[R] .fi .PP @@ -165,32 +162,32 @@ As another example, use the following command to run on port 9000: .IP .nf \f[CB] -$\ jwebserver\ \-p\ 9000 +$ jwebserver -p 9000 \f[R] .fi .PP By default, the files of the current directory are served. -A different directory can be specified with the \f[CB]\-d\f[R] option. +A different directory can be specified with the \f[V]-d\f[R] option. .PP By default, every request is logged on the console. The output looks like this: .IP .nf \f[CB] -127.0.0.1\ \-\ \-\ [10/Feb/2021:14:34:11\ +0000]\ "GET\ /some/subdirectory/\ HTTP/1.1"\ 200\ \- +127.0.0.1 - - [10/Feb/2021:14:34:11 +0000] \[dq]GET /some/subdirectory/ HTTP/1.1\[dq] 200 - \f[R] .fi .PP -Logging output can be changed with the \f[CB]\-o\f[R] option. -The default setting is \f[CB]info\f[R]. -The \f[CB]verbose\f[R] setting additionally includes the request and +Logging output can be changed with the \f[V]-o\f[R] option. +The default setting is \f[V]info\f[R]. +The \f[V]verbose\f[R] setting additionally includes the request and response headers as well as the absolute path of the requested resource. .SH STOPPING THE SERVER .PP Once started successfully, the server runs until it is stopped. On Unix platforms, the server can be stopped by sending it a -\f[CB]SIGINT\f[R] signal (\f[CB]Ctrl+C\f[R] in a terminal window). +\f[V]SIGINT\f[R] signal (\f[V]Ctrl+C\f[R] in a terminal window). .SH HELP OPTION .PP -The \f[CB]\-h\f[R] option displays a help message describing the usage and -the options of the \f[CB]jwebserver\f[R]. +The \f[V]-h\f[R] option displays a help message describing the usage and +the options of the \f[V]jwebserver\f[R]. diff --git a/src/jdk.jartool/share/man/jar.1 b/src/jdk.jartool/share/man/jar.1 index 9ca6c8de7dfdb..a48327f875c9a 100644 --- a/src/jdk.jartool/share/man/jar.1 +++ b/src/jdk.jartool/share/man/jar.1 @@ -19,30 +19,46 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JAR" "1" "2022" "JDK 20\-internal" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JAR" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jar \- create an archive for classes and resources, and manipulate or +jar - create an archive for classes and resources, and manipulate or restore individual classes or resources from an archive .SH SYNOPSIS .PP -\f[CB]jar\f[R] [\f[I]OPTION\f[R] ...] [ [\f[CB]\-\-release\f[R] -\f[I]VERSION\f[R]] [\f[CB]\-C\f[R] \f[I]dir\f[R]] \f[I]files\f[R]] ... +\f[V]jar\f[R] [\f[I]OPTION\f[R] ...] +[ [\f[V]--release\f[R] \f[I]VERSION\f[R]] [\f[V]-C\f[R] \f[I]dir\f[R]] +\f[I]files\f[R]] ... .SH DESCRIPTION .PP -The \f[CB]jar\f[R] command is a general\-purpose archiving and compression +The \f[V]jar\f[R] command is a general-purpose archiving and compression tool, based on the ZIP and ZLIB compression formats. -Initially, the \f[CB]jar\f[R] command was designed to package Java applets -(not supported since JDK 11) or applications; however, beginning with -JDK 9, users can use the \f[CB]jar\f[R] command to create modular JARs. +Initially, the \f[V]jar\f[R] command was designed to package Java +applets (not supported since JDK 11) or applications; however, beginning +with JDK 9, users can use the \f[V]jar\f[R] command to create modular +JARs. For transportation and deployment, it\[aq]s usually more convenient to package modules as modular JARs. .PP -The syntax for the \f[CB]jar\f[R] command resembles the syntax for the -\f[CB]tar\f[R] command. +The syntax for the \f[V]jar\f[R] command resembles the syntax for the +\f[V]tar\f[R] command. It has several main operation modes, defined by one of the mandatory operation arguments. Other arguments are either options that modify the behavior of the @@ -53,25 +69,25 @@ sounds) are combined into a single archive, they can be downloaded by a Java agent (such as a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. -The \f[CB]jar\f[R] command also compresses files, which further improves +The \f[V]jar\f[R] command also compresses files, which further improves download time. -The \f[CB]jar\f[R] command also enables individual entries in a file to be -signed so that their origin can be authenticated. +The \f[V]jar\f[R] command also enables individual entries in a file to +be signed so that their origin can be authenticated. A JAR file can be used as a class path entry, whether or not it\[aq]s compressed. .PP An archive becomes a modular JAR when you include a module descriptor, -\f[CB]module\-info.class\f[R], in the root of the given directories or in -the root of the \f[CB]\&.jar\f[R] archive. +\f[V]module-info.class\f[R], in the root of the given directories or in +the root of the \f[V].jar\f[R] archive. The following operations described in \f[B]Operation Modifiers Valid Only in Create and Update Modes\f[R] are valid only when creating or -updating a modular jar or updating an existing non\-modular jar: +updating a modular jar or updating an existing non-modular jar: .IP \[bu] 2 -\f[CB]\-\-module\-version\f[R] +\f[V]--module-version\f[R] .IP \[bu] 2 -\f[CB]\-\-hash\-modules\f[R] +\f[V]--hash-modules\f[R] .IP \[bu] 2 -\f[CB]\-\-module\-path\f[R] +\f[V]--module-path\f[R] .PP \f[B]Note:\f[R] .PP @@ -79,285 +95,245 @@ All mandatory or optional arguments for long options are also mandatory or optional for any corresponding short options. .SH MAIN OPERATION MODES .PP -When using the \f[CB]jar\f[R] command, you must specify the operation for +When using the \f[V]jar\f[R] command, you must specify the operation for it to perform. -You specify the operation mode for the \f[CB]jar\f[R] command by including -the appropriate operation arguments described in this section. -You can mix an operation argument with other one\-letter options. +You specify the operation mode for the \f[V]jar\f[R] command by +including the appropriate operation arguments described in this section. +You can mix an operation argument with other one-letter options. Generally the operation argument is the first argument specified on the command line. .TP -.B \f[CB]\-c\f[R] or \f[CB]\-\-create\f[R] +\f[V]-c\f[R] or \f[V]--create\f[R] Creates the archive. -.RS -.RE .TP -.B \f[CB]\-i\f[R] \f[I]FILE\f[R] or \f[CB]\-\-generate\-index=\f[R]\f[I]FILE\f[R] +\f[V]-i\f[R] \f[I]FILE\f[R] or \f[V]--generate-index=\f[R]\f[I]FILE\f[R] Generates index information for the specified JAR file. -.RS -.RE .TP -.B \f[CB]\-t\f[R] or \f[CB]\-\-list\f[R] +\f[V]-t\f[R] or \f[V]--list\f[R] Lists the table of contents for the archive. -.RS -.RE .TP -.B \f[CB]\-u\f[R] or \f[CB]\-\-update\f[R] +\f[V]-u\f[R] or \f[V]--update\f[R] Updates an existing JAR file. -.RS -.RE .TP -.B \f[CB]\-x\f[R] or \f[CB]\-\-extract\f[R] +\f[V]-x\f[R] or \f[V]--extract\f[R] Extracts the named (or all) files from the archive. -.RS -.RE .TP -.B \f[CB]\-d\f[R] or \f[CB]\-\-describe\-module\f[R] +\f[V]-d\f[R] or \f[V]--describe-module\f[R] Prints the module descriptor or automatic module name. -.RS -.RE .SH OPERATION MODIFIERS VALID IN ANY MODE .PP You can use the following options to customize the actions of any -operation mode included in the \f[CB]jar\f[R] command. +operation mode included in the \f[V]jar\f[R] command. .TP -.B \f[CB]\-C\f[R] \f[I]DIR\f[R] +\f[V]-C\f[R] \f[I]DIR\f[R] Changes the specified directory and includes the \f[I]files\f[R] specified at the end of the command line. .RS .PP -\f[CB]jar\f[R] [\f[I]OPTION\f[R] ...] [ [\f[CB]\-\-release\f[R] -\f[I]VERSION\f[R]] [\f[CB]\-C\f[R] \f[I]dir\f[R]] \f[I]files\f[R]] +\f[V]jar\f[R] [\f[I]OPTION\f[R] ...] +[ [\f[V]--release\f[R] \f[I]VERSION\f[R]] [\f[V]-C\f[R] \f[I]dir\f[R]] +\f[I]files\f[R]] .RE .TP -.B \f[CB]\-f\f[R] \f[I]FILE\f[R] or \f[CB]\-\-file=\f[R]\f[I]FILE\f[R] +\f[V]-f\f[R] \f[I]FILE\f[R] or \f[V]--file=\f[R]\f[I]FILE\f[R] Specifies the archive file name. -.RS -.RE .TP -.B \f[CB]\-\-release\f[R] \f[I]VERSION\f[R] +\f[V]--release\f[R] \f[I]VERSION\f[R] Creates a multirelease JAR file. Places all files specified after the option into a versioned directory of the JAR file named -\f[CB]META\-INF/versions/\f[R]\f[I]VERSION\f[R]\f[CB]/\f[R], where +\f[V]META-INF/versions/\f[R]\f[I]VERSION\f[R]\f[V]/\f[R], where \f[I]VERSION\f[R] must be must be a positive integer whose value is 9 or greater. .RS .PP At run time, where more than one version of a class exists in the JAR, the JDK will use the first one it finds, searching initially in the -directory tree whose \f[I]VERSION\f[R] number matches the JDK\[aq]s major -version number. +directory tree whose \f[I]VERSION\f[R] number matches the JDK\[aq]s +major version number. It will then look in directories with successively lower \f[I]VERSION\f[R] numbers, and finally look in the root of the JAR. .RE .TP -.B \f[CB]\-v\f[R] or \f[CB]\-\-verbose\f[R] +\f[V]-v\f[R] or \f[V]--verbose\f[R] Sends or prints verbose output to standard output. -.RS -.RE .SH OPERATION MODIFIERS VALID ONLY IN CREATE AND UPDATE MODES .PP You can use the following options to customize the actions of the create and the update main operation modes: .TP -.B \f[CB]\-e\f[R] \f[I]CLASSNAME\f[R] or \f[CB]\-\-main\-class=\f[R]\f[I]CLASSNAME\f[R] +\f[V]-e\f[R] \f[I]CLASSNAME\f[R] or \f[V]--main-class=\f[R]\f[I]CLASSNAME\f[R] Specifies the application entry point for standalone applications bundled into a modular or executable modular JAR file. -.RS -.RE .TP -.B \f[CB]\-m\f[R] \f[I]FILE\f[R] or \f[CB]\-\-manifest=\f[R]\f[I]FILE\f[R] +\f[V]-m\f[R] \f[I]FILE\f[R] or \f[V]--manifest=\f[R]\f[I]FILE\f[R] Includes the manifest information from the given manifest file. -.RS -.RE .TP -.B \f[CB]\-M\f[R] or \f[CB]\-\-no\-manifest\f[R] +\f[V]-M\f[R] or \f[V]--no-manifest\f[R] Doesn\[aq]t create a manifest file for the entries. -.RS -.RE .TP -.B \f[CB]\-\-module\-version=\f[R]\f[I]VERSION\f[R] +\f[V]--module-version=\f[R]\f[I]VERSION\f[R] Specifies the module version, when creating or updating a modular JAR -file, or updating a non\-modular JAR file. -.RS -.RE +file, or updating a non-modular JAR file. .TP -.B \f[CB]\-\-hash\-modules=\f[R]\f[I]PATTERN\f[R] +\f[V]--hash-modules=\f[R]\f[I]PATTERN\f[R] Computes and records the hashes of modules matched by the given pattern and that depend upon directly or indirectly on a modular JAR file being -created or a non\-modular JAR file being updated. -.RS -.RE +created or a non-modular JAR file being updated. .TP -.B \f[CB]\-p\f[R] or \f[CB]\-\-module\-path\f[R] +\f[V]-p\f[R] or \f[V]--module-path\f[R] Specifies the location of module dependence for generating the hash. -.RS -.RE .TP -.B \f[CB]\@\f[R]\f[I]file\f[R] -Reads \f[CB]jar\f[R] options and file names from a text file. -.RS -.RE -.SH OPERATION MODIFIERS VALID ONLY IN CREATE, UPDATE, AND -GENERATE\-INDEX MODES +\f[V]\[at]\f[R]\f[I]file\f[R] +Reads \f[V]jar\f[R] options and file names from a text file. +.SH OPERATION MODIFIERS VALID ONLY IN CREATE, UPDATE, AND GENERATE-INDEX MODES .PP You can use the following options to customize the actions of the create -(\f[CB]\-c\f[R] or \f[CB]\-\-create\f[R]) the update (\f[CB]\-u\f[R] or -\f[CB]\-\-update\f[R] ) and the generate\-index (\f[CB]\-i\f[R] or -\f[CB]\-\-generate\-index=\f[R]\f[I]FILE\f[R]) main operation modes: +(\f[V]-c\f[R] or \f[V]--create\f[R]) the update (\f[V]-u\f[R] or +\f[V]--update\f[R] ) and the generate-index (\f[V]-i\f[R] or +\f[V]--generate-index=\f[R]\f[I]FILE\f[R]) main operation modes: .TP -.B \f[CB]\-0\f[R] or \f[CB]\-\-no\-compress\f[R] +\f[V]-0\f[R] or \f[V]--no-compress\f[R] Stores without using ZIP compression. -.RS -.RE .TP -.B \f[CB]\-\-date=\f[R]\f[I]TIMESTAMP\f[R] -The timestamp in ISO\-8601 extended offset date\-time with optional -time\-zone format, to use for the timestamp of the entries, e.g. -"2022\-02\-12T12:30:00\-05:00". -.RS -.RE +\f[V]--date=\f[R]\f[I]TIMESTAMP\f[R] +The timestamp in ISO-8601 extended offset date-time with optional +time-zone format, to use for the timestamp of the entries, e.g. +\[dq]2022-02-12T12:30:00-05:00\[dq]. .SH OTHER OPTIONS .PP -The following options are recognized by the \f[CB]jar\f[R] command and not -used with operation modes: +The following options are recognized by the \f[V]jar\f[R] command and +not used with operation modes: .TP -.B \f[CB]\-h\f[R] or \f[CB]\-\-help\f[R][\f[CB]:compat\f[R]] -Displays the command\-line help for the \f[CB]jar\f[R] command or +\f[V]-h\f[R] or \f[V]--help\f[R][\f[V]:compat\f[R]] +Displays the command-line help for the \f[V]jar\f[R] command or optionally the compatibility help. -.RS -.RE .TP -.B \f[CB]\-\-help\-extra\f[R] +\f[V]--help-extra\f[R] Displays help on extra options. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Prints the program version. -.RS -.RE .SH EXAMPLES OF JAR COMMAND SYNTAX .IP \[bu] 2 -Create an archive, \f[CB]classes.jar\f[R], that contains two class files, -\f[CB]Foo.class\f[R] and \f[CB]Bar.class\f[R]. +Create an archive, \f[V]classes.jar\f[R], that contains two class files, +\f[V]Foo.class\f[R] and \f[V]Bar.class\f[R]. .RS 2 .RS .PP -\f[CB]jar\ \-\-create\ \-\-file\ classes.jar\ Foo.class\ Bar.class\f[R] +\f[V]jar --create --file classes.jar Foo.class Bar.class\f[R] .RE .RE .IP \[bu] 2 -Create an archive, \f[CB]classes.jar\f[R], that contains two class files, -\f[CB]Foo.class\f[R] and \f[CB]Bar.class\f[R] setting the last modified date -and time to \f[CB]2021\ Jan\ 6\ 12:36:00\f[R]. +Create an archive, \f[V]classes.jar\f[R], that contains two class files, +\f[V]Foo.class\f[R] and \f[V]Bar.class\f[R] setting the last modified +date and time to \f[V]2021 Jan 6 12:36:00\f[R]. .RS 2 .RS .PP -\f[CB]jar\ \-\-create\ \-\-date="2021\-01\-06T14:36:00+02:00"\ \-\-file=classes.jar\ Foo.class\ Bar.class\f[R] +\f[V]jar --create --date=\[dq]2021-01-06T14:36:00+02:00\[dq] --file=classes.jar Foo.class Bar.class\f[R] .RE .RE .IP \[bu] 2 -Create an archive, \f[CB]classes.jar\f[R], by using an existing manifest, -\f[CB]mymanifest\f[R], that contains all of the files in the directory -\f[CB]foo/\f[R]. +Create an archive, \f[V]classes.jar\f[R], by using an existing manifest, +\f[V]mymanifest\f[R], that contains all of the files in the directory +\f[V]foo/\f[R]. .RS 2 .RS .PP -\f[CB]jar\ \-\-create\ \-\-file\ classes.jar\ \-\-manifest\ mymanifest\ \-C\ foo/\f[R] +\f[V]jar --create --file classes.jar --manifest mymanifest -C foo/\f[R] .RE .RE .IP \[bu] 2 -Create a modular JAR archive,\f[CB]foo.jar\f[R], where the module -descriptor is located in \f[CB]classes/module\-info.class\f[R]. +Create a modular JAR archive,\f[V]foo.jar\f[R], where the module +descriptor is located in \f[V]classes/module-info.class\f[R]. .RS 2 .RS .PP -\f[CB]jar\ \-\-create\ \-\-file\ foo.jar\ \-\-main\-class\ com.foo.Main\ \-\-module\-version\ 1.0\ \-C\ foo/classes\ resources\f[R] +\f[V]jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0 -C foo/classes resources\f[R] .RE .RE .IP \[bu] 2 -Update an existing non\-modular JAR, \f[CB]foo.jar\f[R], to a modular JAR +Update an existing non-modular JAR, \f[V]foo.jar\f[R], to a modular JAR file. .RS 2 .RS .PP -\f[CB]jar\ \-\-update\ \-\-file\ foo.jar\ \-\-main\-class\ com.foo.Main\ \-\-module\-version\ 1.0\ \-C\ foo/module\-info.class\f[R] +\f[V]jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0 -C foo/module-info.class\f[R] .RE .RE .IP \[bu] 2 -Create a versioned or multi\-release JAR, \f[CB]foo.jar\f[R], that places -the files in the \f[CB]classes\f[R] directory at the root of the JAR, and -the files in the \f[CB]classes\-10\f[R] directory in the -\f[CB]META\-INF/versions/10\f[R] directory of the JAR. +Create a versioned or multi-release JAR, \f[V]foo.jar\f[R], that places +the files in the \f[V]classes\f[R] directory at the root of the JAR, and +the files in the \f[V]classes-10\f[R] directory in the +\f[V]META-INF/versions/10\f[R] directory of the JAR. .RS 2 .PP -In this example, the \f[CB]classes/com/foo\f[R] directory contains two -classes, \f[CB]com.foo.Hello\f[R] (the entry point class) and -\f[CB]com.foo.NameProvider\f[R], both compiled for JDK 8. -The \f[CB]classes\-10/com/foo\f[R] directory contains a different version -of the \f[CB]com.foo.NameProvider\f[R] class, this one containing JDK 10 +In this example, the \f[V]classes/com/foo\f[R] directory contains two +classes, \f[V]com.foo.Hello\f[R] (the entry point class) and +\f[V]com.foo.NameProvider\f[R], both compiled for JDK 8. +The \f[V]classes-10/com/foo\f[R] directory contains a different version +of the \f[V]com.foo.NameProvider\f[R] class, this one containing JDK 10 specific code and compiled for JDK 10. .PP -Given this setup, create a multirelease JAR file \f[CB]foo.jar\f[R] by +Given this setup, create a multirelease JAR file \f[V]foo.jar\f[R] by running the following command from the directory containing the -directories \f[CB]classes\f[R] and \f[CB]classes\-10\f[R] . +directories \f[V]classes\f[R] and \f[V]classes-10\f[R] . .RS .PP -\f[CB]jar\ \-\-create\ \-\-file\ foo.jar\ \-\-main\-class\ com.foo.Hello\ \-C\ classes\ .\ \-\-release\ 10\ \-C\ classes\-10\ .\f[R] +\f[V]jar --create --file foo.jar --main-class com.foo.Hello -C classes . --release 10 -C classes-10 .\f[R] .RE .PP -The JAR file \f[CB]foo.jar\f[R] now contains: +The JAR file \f[V]foo.jar\f[R] now contains: .IP .nf \f[CB] -%\ jar\ \-tf\ foo.jar +% jar -tf foo.jar -META\-INF/ -META\-INF/MANIFEST.MF +META-INF/ +META-INF/MANIFEST.MF com/ com/foo/ com/foo/Hello.class com/foo/NameProvider.class -META\-INF/versions/10/com/ -META\-INF/versions/10/com/foo/ -META\-INF/versions/10/com/foo/NameProvider.class +META-INF/versions/10/com/ +META-INF/versions/10/com/foo/ +META-INF/versions/10/com/foo/NameProvider.class \f[R] .fi .PP -As well as other information, the file \f[CB]META\-INF/MANIFEST.MF\f[R], +As well as other information, the file \f[V]META-INF/MANIFEST.MF\f[R], will contain the following lines to indicate that this is a multirelease -JAR file with an entry point of \f[CB]com.foo.Hello\f[R]. +JAR file with an entry point of \f[V]com.foo.Hello\f[R]. .IP .nf \f[CB] \&... -Main\-Class:\ com.foo.Hello -Multi\-Release:\ true +Main-Class: com.foo.Hello +Multi-Release: true \f[R] .fi .PP -Assuming that the \f[CB]com.foo.Hello\f[R] class calls a method on the -\f[CB]com.foo.NameProvider\f[R] class, running the program using JDK 10 -will ensure that the \f[CB]com.foo.NameProvider\f[R] class is the one in -\f[CB]META\-INF/versions/10/com/foo/\f[R]. +Assuming that the \f[V]com.foo.Hello\f[R] class calls a method on the +\f[V]com.foo.NameProvider\f[R] class, running the program using JDK 10 +will ensure that the \f[V]com.foo.NameProvider\f[R] class is the one in +\f[V]META-INF/versions/10/com/foo/\f[R]. Running the program using JDK 8 will ensure that the -\f[CB]com.foo.NameProvider\f[R] class is the one at the root of the JAR, -in \f[CB]com/foo\f[R]. +\f[V]com.foo.NameProvider\f[R] class is the one at the root of the JAR, +in \f[V]com/foo\f[R]. .RE .IP \[bu] 2 -Create an archive, \f[CB]my.jar\f[R], by reading options and lists of -class files from the file \f[CB]classes.list\f[R]. +Create an archive, \f[V]my.jar\f[R], by reading options and lists of +class files from the file \f[V]classes.list\f[R]. .RS 2 .PP \f[B]Note:\f[R] .PP -To shorten or simplify the \f[CB]jar\f[R] command, you can specify -arguments in a separate text file and pass it to the \f[CB]jar\f[R] -command with the at sign (\f[CB]\@\f[R]) as a prefix. +To shorten or simplify the \f[V]jar\f[R] command, you can specify +arguments in a separate text file and pass it to the \f[V]jar\f[R] +command with the at sign (\f[V]\[at]\f[R]) as a prefix. .RS .PP -\f[CB]jar\ \-\-create\ \-\-file\ my.jar\ \@classes.list\f[R] +\f[V]jar --create --file my.jar \[at]classes.list\f[R] .RE .RE diff --git a/src/jdk.jartool/share/man/jarsigner.1 b/src/jdk.jartool/share/man/jarsigner.1 index 9105c6ac6711c..2f0bffd103b83 100644 --- a/src/jdk.jartool/share/man/jarsigner.1 +++ b/src/jdk.jartool/share/man/jarsigner.1 @@ -19,67 +19,76 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\"t -.\" Automatically generated by Pandoc 2.3.1 +'\" t +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JARSIGNER" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JARSIGNER" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jarsigner \- sign and verify Java Archive (JAR) files +jarsigner - sign and verify Java Archive (JAR) files .SH SYNOPSIS .PP -\f[CB]jarsigner\f[R] [\f[I]options\f[R]] \f[I]jar\-file\f[R] \f[I]alias\f[R] +\f[V]jarsigner\f[R] [\f[I]options\f[R]] \f[I]jar-file\f[R] +\f[I]alias\f[R] .PP -\f[CB]jarsigner\f[R] \f[CB]\-verify\f[R] [\f[I]options\f[R]] -\f[I]jar\-file\f[R] [\f[I]alias\f[R] ...] +\f[V]jarsigner\f[R] \f[V]-verify\f[R] [\f[I]options\f[R]] +\f[I]jar-file\f[R] [\f[I]alias\f[R] ...] .PP -\f[CB]jarsigner\f[R] \f[CB]\-version\f[R] +\f[V]jarsigner\f[R] \f[V]-version\f[R] .TP -.B \f[I]options\f[R] -The command\-line options. +\f[I]options\f[R] +The command-line options. See \f[B]Options for jarsigner\f[R]. -.RS -.RE .TP -.B \f[CB]\-verify\f[R] -The \f[CB]\-verify\f[R] option can take zero or more keystore alias names +\f[V]-verify\f[R] +The \f[V]-verify\f[R] option can take zero or more keystore alias names after the JAR file name. -When the \f[CB]\-verify\f[R] option is specified, the \f[CB]jarsigner\f[R] +When the \f[V]-verify\f[R] option is specified, the \f[V]jarsigner\f[R] command checks that the certificate used to verify each signed entry in the JAR file matches one of the keystore aliases. -The aliases are defined in the keystore specified by \f[CB]\-keystore\f[R] +The aliases are defined in the keystore specified by \f[V]-keystore\f[R] or the default keystore. .RS .PP -If you also specify the \f[CB]\-strict\f[R] option, and the -\f[CB]jarsigner\f[R] command detects severe warnings, the message, "jar -verified, with signer errors" is displayed. +If you also specify the \f[V]-strict\f[R] option, and the +\f[V]jarsigner\f[R] command detects severe warnings, the message, +\[dq]jar verified, with signer errors\[dq] is displayed. .RE .TP -.B \f[I]jar\-file\f[R] +\f[I]jar-file\f[R] The JAR file to be signed. .RS .PP -If you also specified the \f[CB]\-strict\f[R] option, and the -\f[CB]jarsigner\f[R] command detected severe warnings, the message, "jar -signed, with signer errors" is displayed. +If you also specified the \f[V]-strict\f[R] option, and the +\f[V]jarsigner\f[R] command detected severe warnings, the message, +\[dq]jar signed, with signer errors\[dq] is displayed. .RE .TP -.B \f[I]alias\f[R] -The aliases are defined in the keystore specified by \f[CB]\-keystore\f[R] +\f[I]alias\f[R] +The aliases are defined in the keystore specified by \f[V]-keystore\f[R] or the default keystore. -.RS -.RE .TP -.B \f[CB]\-version\f[R] -The \f[CB]\-version\f[R] option prints the program version of -\f[CB]jarsigner\f[R]. -.RS -.RE +\f[V]-version\f[R] +The \f[V]-version\f[R] option prints the program version of +\f[V]jarsigner\f[R]. .SH DESCRIPTION .PP -The \f[CB]jarsigner\f[R] tool has two purposes: +The \f[V]jarsigner\f[R] tool has two purposes: .IP \[bu] 2 To sign Java Archive (JAR) files. .IP \[bu] 2 @@ -88,11 +97,11 @@ To verify the signatures and integrity of signed JAR files. The JAR feature enables the packaging of class files, images, sounds, and other digital data in a single file for faster and easier distribution. -A tool named \f[CB]jar\f[R] enables developers to produce JAR files. +A tool named \f[V]jar\f[R] enables developers to produce JAR files. (Technically, any ZIP file can also be considered a JAR file, although -when created by the \f[CB]jar\f[R] command or processed by the -\f[CB]jarsigner\f[R] command, JAR files also contain a -\f[CB]META\-INF/MANIFEST.MF\f[R] file.) +when created by the \f[V]jar\f[R] command or processed by the +\f[V]jarsigner\f[R] command, JAR files also contain a +\f[V]META-INF/MANIFEST.MF\f[R] file.) .PP A digital signature is a string of bits that is computed from some data (the data being signed) and the private key of an entity (a person, @@ -118,56 +127,57 @@ certificates that authenticate its public key. A certificate is a digitally signed statement from one entity that says that the public key of another entity has a particular value. .PP -The \f[CB]jarsigner\f[R] command uses key and certificate information from -a keystore to generate digital signatures for JAR files. +The \f[V]jarsigner\f[R] command uses key and certificate information +from a keystore to generate digital signatures for JAR files. A keystore is a database of private keys and their associated X.509 certificate chains that authenticate the corresponding public keys. -The \f[CB]keytool\f[R] command is used to create and administer keystores. +The \f[V]keytool\f[R] command is used to create and administer +keystores. .PP -The \f[CB]jarsigner\f[R] command uses an entity\[aq]s private key to +The \f[V]jarsigner\f[R] command uses an entity\[aq]s private key to generate a signature. The signed JAR file contains, among other things, a copy of the certificate from the keystore for the public key corresponding to the private key used to sign the file. -The \f[CB]jarsigner\f[R] command can verify the digital signature of the +The \f[V]jarsigner\f[R] command can verify the digital signature of the signed JAR file using the certificate inside it (in its signature block file). .PP -The \f[CB]jarsigner\f[R] command can generate signatures that include a +The \f[V]jarsigner\f[R] command can generate signatures that include a time stamp that enables a systems or deployer to check whether the JAR file was signed while the signing certificate was still valid. .PP In addition, APIs allow applications to obtain the timestamp information. .PP -At this time, the \f[CB]jarsigner\f[R] command can only sign JAR files -created by the \f[CB]jar\f[R] command or zip files. +At this time, the \f[V]jarsigner\f[R] command can only sign JAR files +created by the \f[V]jar\f[R] command or zip files. JAR files are the same as zip files, except they also have a -\f[CB]META\-INF/MANIFEST.MF\f[R] file. -A \f[CB]META\-INF/MANIFEST.MF\f[R] file is created when the -\f[CB]jarsigner\f[R] command signs a zip file. +\f[V]META-INF/MANIFEST.MF\f[R] file. +A \f[V]META-INF/MANIFEST.MF\f[R] file is created when the +\f[V]jarsigner\f[R] command signs a zip file. .PP -The default \f[CB]jarsigner\f[R] command behavior is to sign a JAR or zip +The default \f[V]jarsigner\f[R] command behavior is to sign a JAR or zip file. -Use the \f[CB]\-verify\f[R] option to verify a signed JAR file. +Use the \f[V]-verify\f[R] option to verify a signed JAR file. .PP -The \f[CB]jarsigner\f[R] command also attempts to validate the +The \f[V]jarsigner\f[R] command also attempts to validate the signer\[aq]s certificate after signing or verifying. During validation, it checks the revocation status of each certificate -in the signer\[aq]s certificate chain when the \f[CB]\-revCheck\f[R] +in the signer\[aq]s certificate chain when the \f[V]-revCheck\f[R] option is specified. If there is a validation error or any other problem, the command generates warning messages. -If you specify the \f[CB]\-strict\f[R] option, then the command treats +If you specify the \f[V]-strict\f[R] option, then the command treats severe warnings as errors. See \f[B]Errors and Warnings\f[R]. .SH KEYSTORE ALIASES .PP All keystore entities are accessed with unique aliases. .PP -When you use the \f[CB]jarsigner\f[R] command to sign a JAR file, you must -specify the alias for the keystore entry that contains the private key -needed to generate the signature. +When you use the \f[V]jarsigner\f[R] command to sign a JAR file, you +must specify the alias for the keystore entry that contains the private +key needed to generate the signature. If no output file is specified, it overwrites the original JAR file with the signed JAR file. .PP @@ -181,125 +191,125 @@ for the password when you don\[aq]t specify it on the command line and it isn\[aq]t the same as the store password. .SH KEYSTORE LOCATION .PP -The \f[CB]jarsigner\f[R] command has a \f[CB]\-keystore\f[R] option for +The \f[V]jarsigner\f[R] command has a \f[V]-keystore\f[R] option for specifying the URL of the keystore to be used. -The keystore is by default stored in a file named \f[CB]\&.keystore\f[R] -in the user\[aq]s home directory, as determined by the -\f[CB]user.home\f[R] system property. +The keystore is by default stored in a file named \f[V].keystore\f[R] in +the user\[aq]s home directory, as determined by the \f[V]user.home\f[R] +system property. .PP -\f[B]Linux and OS X:\f[R] \f[CB]user.home\f[R] defaults to the user\[aq]s +\f[B]Linux and OS X:\f[R] \f[V]user.home\f[R] defaults to the user\[aq]s home directory. .PP -The input stream from the \f[CB]\-keystore\f[R] option is passed to the -\f[CB]KeyStore.load\f[R] method. -If \f[CB]NONE\f[R] is specified as the URL, then a null stream is passed -to the \f[CB]KeyStore.load\f[R] method. -\f[CB]NONE\f[R] should be specified when the \f[CB]KeyStore\f[R] class +The input stream from the \f[V]-keystore\f[R] option is passed to the +\f[V]KeyStore.load\f[R] method. +If \f[V]NONE\f[R] is specified as the URL, then a null stream is passed +to the \f[V]KeyStore.load\f[R] method. +\f[V]NONE\f[R] should be specified when the \f[V]KeyStore\f[R] class isn\[aq]t file based, for example, when it resides on a hardware token device. .SH KEYSTORE IMPLEMENTATION .PP -The \f[CB]KeyStore\f[R] class provided in the \f[CB]java.security\f[R] -package supplies a number of well\-defined interfaces to access and +The \f[V]KeyStore\f[R] class provided in the \f[V]java.security\f[R] +package supplies a number of well-defined interfaces to access and modify the information in a keystore. You can have multiple different concrete implementations, where each implementation is for a particular type of keystore. .PP -Currently, there are two command\-line tools that use keystore -implementations (\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R]). +Currently, there are two command-line tools that use keystore +implementations (\f[V]keytool\f[R] and \f[V]jarsigner\f[R]). .PP -The default keystore implementation is \f[CB]PKCS12\f[R]. +The default keystore implementation is \f[V]PKCS12\f[R]. This is a cross platform keystore based on the RSA PKCS12 Personal Information Exchange Syntax Standard. This standard is primarily meant for storing or transporting a user\[aq]s private keys, certificates, and miscellaneous secrets. -There is another built\-in implementation, provided by Oracle. +There is another built-in implementation, provided by Oracle. It implements the keystore as a file with a proprietary keystore type -(format) named \f[CB]JKS\f[R]. +(format) named \f[V]JKS\f[R]. It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. .PP -Keystore implementations are provider\-based, which means the -application interfaces supplied by the \f[CB]KeyStore\f[R] class are -implemented in terms of a Service Provider Interface (SPI). -There is a corresponding abstract \f[CB]KeystoreSpi\f[R] class, also in -the \f[CB]java.security\ package\f[R], that defines the Service Provider +Keystore implementations are provider-based, which means the application +interfaces supplied by the \f[V]KeyStore\f[R] class are implemented in +terms of a Service Provider Interface (SPI). +There is a corresponding abstract \f[V]KeystoreSpi\f[R] class, also in +the \f[V]java.security package\f[R], that defines the Service Provider Interface methods that providers must implement. The term provider refers to a package or a set of packages that supply a concrete implementation of a subset of services that can be accessed by the Java Security API. To provide a keystore implementation, clients must implement a provider -and supply a \f[CB]KeystoreSpi\f[R] subclass implementation, as described +and supply a \f[V]KeystoreSpi\f[R] subclass implementation, as described in \f[B]How to Implement a Provider in the Java Cryptography Architecture\f[R] -[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JSSEC\-GUID\-2BCFDD85\-D533\-4E6C\-8CE9\-29990DEB0190]. +[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase&id=security_guide_implement_provider_jca]. .PP Applications can choose different types of keystore implementations from -different providers, with the \f[CB]getInstance\f[R] factory method in the -\f[CB]KeyStore\f[R] class. +different providers, with the \f[V]getInstance\f[R] factory method in +the \f[V]KeyStore\f[R] class. A keystore type defines the storage and data format of the keystore information and the algorithms used to protect private keys in the keystore and the integrity of the keystore itself. Keystore implementations of different types aren\[aq]t compatible. .PP -The \f[CB]jarsigner\f[R] commands can read file\-based keystores from any +The \f[V]jarsigner\f[R] commands can read file-based keystores from any location that can be specified using a URL. -In addition, these commands can read non\-file\-based keystores such as +In addition, these commands can read non-file-based keystores such as those provided by MSCAPI on Windows and PKCS11 on all platforms. .PP -For the \f[CB]jarsigner\f[R] and \f[CB]keytool\f[R] commands, you can +For the \f[V]jarsigner\f[R] and \f[V]keytool\f[R] commands, you can specify a keystore type at the command line with the -\f[CB]\-storetype\f[R] option. +\f[V]-storetype\f[R] option. .PP If you don\[aq]t explicitly specify a keystore type, then the tools choose a keystore implementation based on the value of the -\f[CB]keystore.type\f[R] property specified in the security properties +\f[V]keystore.type\f[R] property specified in the security properties file. -The security properties file is called \f[CB]java.security\f[R], and it +The security properties file is called \f[V]java.security\f[R], and it resides in the JDK security properties directory, -\f[CB]java.home/conf/security\f[R]. +\f[V]java.home/conf/security\f[R]. .PP -Each tool gets the \f[CB]keystore.type\f[R] value and then examines all +Each tool gets the \f[V]keystore.type\f[R] value and then examines all the installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider. .PP -The \f[CB]KeyStore\f[R] class defines a static method named -\f[CB]getDefaultType\f[R] that lets applications retrieve the value of the -\f[CB]keystore.type\f[R] property. +The \f[V]KeyStore\f[R] class defines a static method named +\f[V]getDefaultType\f[R] that lets applications retrieve the value of +the \f[V]keystore.type\f[R] property. The following line of code creates an instance of the default keystore -type as specified in the \f[CB]keystore.type\f[R] property: +type as specified in the \f[V]keystore.type\f[R] property: .RS .PP -\f[CB]KeyStore\ keyStore\ =\ KeyStore.getInstance(KeyStore.getDefaultType());\f[R] +\f[V]KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\f[R] .RE .PP -The default keystore type is \f[CB]pkcs12\f[R], which is a cross platform +The default keystore type is \f[V]pkcs12\f[R], which is a cross platform keystore based on the RSA PKCS12 Personal Information Exchange Syntax Standard. This is specified by the following line in the security properties file: .RS .PP -\f[CB]keystore.type=pkcs12\f[R] +\f[V]keystore.type=pkcs12\f[R] .RE .PP Case doesn\[aq]t matter in keystore type designations. -For example, \f[CB]JKS\f[R] is the same as \f[CB]jks\f[R]. +For example, \f[V]JKS\f[R] is the same as \f[V]jks\f[R]. .PP To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. -For example, if you want to use the Oracle\[aq]s \f[CB]jks\f[R] keystore +For example, if you want to use the Oracle\[aq]s \f[V]jks\f[R] keystore implementation, then change the line to the following: .RS .PP -\f[CB]keystore.type=jks\f[R] +\f[V]keystore.type=jks\f[R] .RE .SH SUPPORTED ALGORITHMS .PP -By default, the \f[CB]jarsigner\f[R] command signs a JAR file using one of -the following algorithms and block file extensions depending on the type -and size of the private key: +By default, the \f[V]jarsigner\f[R] command signs a JAR file using one +of the following algorithms and block file extensions depending on the +type and size of the private key: .PP Default Signature Algorithms and Block File Extensions .TS @@ -364,11 +374,11 @@ SHA512withECDSA T}@T{ T} T{ -RSASSA\-PSS +RSASSA-PSS T}@T{ < 624 T}@T{ -RSASSA\-PSS (with SHA\-256) +RSASSA-PSS (with SHA-256) T}@T{ \&.RSA T} @@ -376,14 +386,14 @@ T{ T}@T{ <= 7680 T}@T{ -RSASSA\-PSS (with SHA\-384) +RSASSA-PSS (with SHA-384) T}@T{ T} T{ T}@T{ > 7680 T}@T{ -RSASSA\-PSS (with SHA\-512) +RSASSA-PSS (with SHA-512) T}@T{ T} T{ @@ -404,19 +414,19 @@ T}@T{ T} .TE .IP \[bu] 2 -If an RSASSA\-PSS key is encoded with parameters, then jarsigner will -use the same parameters in the signature. +If an RSASSA-PSS key is encoded with parameters, then jarsigner will use +the same parameters in the signature. Otherwise, jarsigner will use parameters that are determined by the size of the key as specified in the table above. -For example, an 3072\-bit RSASSA\-PSS key will use RSASSA\-PSS as the -signature algorithm and SHA\-384 as the hash and MGF1 algorithms. +For example, an 3072-bit RSASSA-PSS key will use RSASSA-PSS as the +signature algorithm and SHA-384 as the hash and MGF1 algorithms. .PP These default signature algorithms can be overridden by using the -\f[CB]\-sigalg\f[R] option. +\f[V]-sigalg\f[R] option. .PP -The \f[CB]jarsigner\f[R] command uses the -\f[CB]jdk.jar.disabledAlgorithms\f[R] and -\f[CB]jdk.security.legacyAlgorithms\f[R] security properties to determine +The \f[V]jarsigner\f[R] command uses the +\f[V]jdk.jar.disabledAlgorithms\f[R] and +\f[V]jdk.security.legacyAlgorithms\f[R] security properties to determine which algorithms are considered a security risk. If the JAR file was signed with any algorithms that are disabled, it will be treated as an unsigned JAR file. @@ -424,11 +434,11 @@ If the JAR file was signed with any legacy algorithms, it will be treated as signed with an informational warning to inform users that the legacy algorithm will be disabled in a future update. For detailed verification output, include -\f[CB]\-J\-Djava.security.debug=jar\f[R]. -The \f[CB]jdk.jar.disabledAlgorithms\f[R] and -\f[CB]jdk.security.legacyAlgorithms\f[R] security properties are defined -in the \f[CB]java.security\f[R] file (located in the JDK\[aq]s -\f[CB]$JAVA_HOME/conf/security\f[R] directory). +\f[V]-J-Djava.security.debug=jar\f[R]. +The \f[V]jdk.jar.disabledAlgorithms\f[R] and +\f[V]jdk.security.legacyAlgorithms\f[R] security properties are defined +in the \f[V]java.security\f[R] file (located in the JDK\[aq]s +\f[V]$JAVA_HOME/conf/security\f[R] directory). .PP \f[B]Note:\f[R] .PP @@ -437,27 +447,27 @@ signature algorithm names are periodically updated to stronger values with each release of the JDK. If interoperability with older releases of the JDK is important, please make sure the defaults are supported by those releases, or alternatively -use the \f[CB]\-sigalg\f[R] option to override the default values at your +use the \f[V]-sigalg\f[R] option to override the default values at your own risk. .SH THE SIGNED JAR FILE .PP -When the \f[CB]jarsigner\f[R] command is used to sign a JAR file, the +When the \f[V]jarsigner\f[R] command is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except -that it has two additional files placed in the META\-INF directory: +that it has two additional files placed in the META-INF directory: .IP \[bu] 2 -A signature file with an \f[CB]\&.SF\f[R] extension +A signature file with an \f[V].SF\f[R] extension .IP \[bu] 2 -A signature block file with a \f[CB]\&.DSA\f[R], \f[CB]\&.RSA\f[R], or -\f[CB]\&.EC\f[R] extension +A signature block file with a \f[V].DSA\f[R], \f[V].RSA\f[R], or +\f[V].EC\f[R] extension .PP The base file names for these two files come from the value of the -\f[CB]\-sigfile\f[R] option. -For example, when the option is \f[CB]\-sigfile\ MKSIGN\f[R], the files -are named \f[CB]MKSIGN.SF\f[R] and \f[CB]MKSIGN.RSA\f[R]. +\f[V]-sigfile\f[R] option. +For example, when the option is \f[V]-sigfile MKSIGN\f[R], the files are +named \f[V]MKSIGN.SF\f[R] and \f[V]MKSIGN.RSA\f[R]. In this document, we assume the signer always uses an RSA key. .PP -If no \f[CB]\-sigfile\f[R] option appears on the command line, then the -base file name for the \f[CB]\&.SF\f[R] and the signature block files is +If no \f[V]-sigfile\f[R] option appears on the command line, then the +base file name for the \f[V].SF\f[R] and the signature block files is the first 8 characters of the alias name specified on the command line, all converted to uppercase. If the alias name has fewer than 8 characters, then the full alias name @@ -468,10 +478,10 @@ underscore (_) character in forming the file name. Valid characters include letters, digits, underscores, and hyphens. .SH SIGNATURE FILE .PP -A signature file (\f[CB]\&.SF\f[R] file) looks similar to the manifest -file that is always included in a JAR file when the \f[CB]jarsigner\f[R] +A signature file (\f[V].SF\f[R] file) looks similar to the manifest file +that is always included in a JAR file when the \f[V]jarsigner\f[R] command is used to sign the file. -For each source file included in the JAR file, the \f[CB]\&.SF\f[R] file +For each source file included in the JAR file, the \f[V].SF\f[R] file has two lines, such as in the manifest file, that list the following: .IP \[bu] 2 File name @@ -487,7 +497,7 @@ the same line. .PP In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file. -In the \f[CB]\&.SF\f[R] file, the digest value for a specified source file +In the \f[V].SF\f[R] file, the digest value for a specified source file is the hash of the two lines in the manifest file for the source file. .PP The signature file, by default, includes a header with a hash of the @@ -497,26 +507,26 @@ The presence of the header enables verification optimization. See \f[B]JAR File Verification\f[R]. .SH SIGNATURE BLOCK FILE .PP -The \f[CB]\&.SF\f[R] file is signed and the signature is placed in the +The \f[V].SF\f[R] file is signed and the signature is placed in the signature block file. This file also contains, encoded inside it, the certificate or certificate chain from the keystore that authenticates the public key corresponding to the private key used for signing. -The file has the extension \f[CB]\&.DSA\f[R], \f[CB]\&.RSA\f[R], or -\f[CB]\&.EC\f[R], depending on the key algorithm used. +The file has the extension \f[V].DSA\f[R], \f[V].RSA\f[R], or +\f[V].EC\f[R], depending on the key algorithm used. See the table in \f[B]Supported Algorithms\f[R]. .SH SIGNATURE TIME STAMP .PP -The \f[CB]jarsigner\f[R] command used with the following options generates -and stores a signature time stamp when signing a JAR file: +The \f[V]jarsigner\f[R] command used with the following options +generates and stores a signature time stamp when signing a JAR file: .IP \[bu] 2 -\f[CB]\-tsa\f[R] \f[I]url\f[R] +\f[V]-tsa\f[R] \f[I]url\f[R] .IP \[bu] 2 -\f[CB]\-tsacert\f[R] \f[I]alias\f[R] +\f[V]-tsacert\f[R] \f[I]alias\f[R] .IP \[bu] 2 -\f[CB]\-tsapolicyid\f[R] \f[I]policyid\f[R] +\f[V]-tsapolicyid\f[R] \f[I]policyid\f[R] .IP \[bu] 2 -\f[CB]\-tsadigestalg\f[R] \f[I]algorithm\f[R] +\f[V]-tsadigestalg\f[R] \f[I]algorithm\f[R] .PP See \f[B]Options for jarsigner\f[R]. .SH JAR FILE VERIFICATION @@ -526,7 +536,7 @@ and none of the files that were in the JAR file when the signatures were generated have changed since then. JAR file verification involves the following steps: .IP "1." 3 -Verify the signature of the \f[CB]\&.SF\f[R] file. +Verify the signature of the \f[V].SF\f[R] file. .RS 4 .PP The verification ensures that the signature stored in each signature @@ -534,46 +544,46 @@ block file was generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the signature block file. It also ensures that the signature is a valid signature of the -corresponding signature (\f[CB]\&.SF\f[R]) file, and thus the -\f[CB]\&.SF\f[R] file wasn\[aq]t tampered with. +corresponding signature (\f[V].SF\f[R]) file, and thus the \f[V].SF\f[R] +file wasn\[aq]t tampered with. .RE .IP "2." 3 -Verify the digest listed in each entry in the \f[CB]\&.SF\f[R] file with +Verify the digest listed in each entry in the \f[V].SF\f[R] file with each corresponding section in the manifest. .RS 4 .PP -The \f[CB]\&.SF\f[R] file by default includes a header that contains a -hash of the entire manifest file. +The \f[V].SF\f[R] file by default includes a header that contains a hash +of the entire manifest file. When the header is present, the verification can check to see whether or not the hash in the header matches the hash of the manifest file. If there is a match, then verification proceeds to the next step. .PP If there is no match, then a less optimized verification is required to ensure that the hash in each source file information section in the -\f[CB]\&.SF\f[R] file equals the hash of its corresponding section in the +\f[V].SF\f[R] file equals the hash of its corresponding section in the manifest file. See Signature File. .PP One reason the hash of the manifest file that is stored in the -\f[CB]\&.SF\f[R] file header might not equal the hash of the current +\f[V].SF\f[R] file header might not equal the hash of the current manifest file is that it might contain sections for newly added files after the file was signed. For example, suppose one or more files were added to the signed JAR file -(using the \f[CB]jar\f[R] tool) that already contains a signature and a -\f[CB]\&.SF\f[R] file. +(using the \f[V]jar\f[R] tool) that already contains a signature and a +\f[V].SF\f[R] file. If the JAR file is signed again by a different signer, then the manifest file is changed (sections are added to it for the new files by the -\f[CB]jarsigner\f[R] tool) and a new \f[CB]\&.SF\f[R] file is created, but -the original \f[CB]\&.SF\f[R] file is unchanged. +\f[V]jarsigner\f[R] tool) and a new \f[V].SF\f[R] file is created, but +the original \f[V].SF\f[R] file is unchanged. A verification is still considered successful if none of the files that were in the JAR file when the original signature was generated have been changed since then. -This is because the hashes in the non\-header sections of the -\f[CB]\&.SF\f[R] file equal the hashes of the corresponding sections in -the manifest file. +This is because the hashes in the non-header sections of the +\f[V].SF\f[R] file equal the hashes of the corresponding sections in the +manifest file. .RE .IP "3." 3 -Read each file in the JAR file that has an entry in the \f[CB]\&.SF\f[R] +Read each file in the JAR file that has an entry in the \f[V].SF\f[R] file. While reading, compute the file\[aq]s digest and compare the result with the digest for this file in the manifest section. @@ -582,7 +592,7 @@ The digests should be the same or verification fails. .PP If any serious verification failures occur during the verification process, then the process is stopped and a security exception is thrown. -The \f[CB]jarsigner\f[R] command catches and displays the exception. +The \f[V]jarsigner\f[R] command catches and displays the exception. .RE .IP "4." 3 Check for disabled algorithm usage. @@ -591,24 +601,24 @@ See \f[B]Supported Algorithms\f[R]. \f[B]Note:\f[R] .PP You should read any addition warnings (or errors if you specified the -\f[CB]\-strict\f[R] option), as well as the content of the certificate (by -specifying the \f[CB]\-verbose\f[R] and \f[CB]\-certs\f[R] options) to +\f[V]-strict\f[R] option), as well as the content of the certificate (by +specifying the \f[V]-verbose\f[R] and \f[V]-certs\f[R] options) to determine if the signature can be trusted. .SH MULTIPLE SIGNATURES FOR A JAR FILE .PP A JAR file can be signed by multiple people by running the -\f[CB]jarsigner\f[R] command on the file multiple times and specifying the -alias for a different person each time, as follows: +\f[V]jarsigner\f[R] command on the file multiple times and specifying +the alias for a different person each time, as follows: .IP .nf \f[CB] -jarsigner\ myBundle.jar\ susan -jarsigner\ myBundle.jar\ kevin +jarsigner myBundle.jar susan +jarsigner myBundle.jar kevin \f[R] .fi .PP When a JAR file is signed multiple times, there are multiple -\f[CB]\&.SF\f[R] and signature block files in the resulting JAR file, one +\f[V].SF\f[R] and signature block files in the resulting JAR file, one pair for each signature. In the previous example, the output JAR file includes files with the following names: @@ -623,29 +633,29 @@ KEVIN.RSA .fi .SH OPTIONS FOR JARSIGNER .PP -The following sections describe the options for the \f[CB]jarsigner\f[R]. +The following sections describe the options for the \f[V]jarsigner\f[R]. Be aware of the following standards: .IP \[bu] 2 -All option names are preceded by a hyphen sign (\-). +All option names are preceded by a hyphen sign (-). .IP \[bu] 2 The options can be provided in any order. .IP \[bu] 2 Items that are in italics or underlined (option values) represent the actual values that must be supplied. .IP \[bu] 2 -The \f[CB]\-storepass\f[R], \f[CB]\-keypass\f[R], \f[CB]\-sigfile\f[R], -\f[CB]\-sigalg\f[R], \f[CB]\-digestalg\f[R], \f[CB]\-signedjar\f[R], and -TSA\-related options are only relevant when signing a JAR file; they +The \f[V]-storepass\f[R], \f[V]-keypass\f[R], \f[V]-sigfile\f[R], +\f[V]-sigalg\f[R], \f[V]-digestalg\f[R], \f[V]-signedjar\f[R], and +TSA-related options are only relevant when signing a JAR file; they aren\[aq]t relevant when verifying a signed JAR file. -The \f[CB]\-keystore\f[R] option is relevant for signing and verifying a +The \f[V]-keystore\f[R] option is relevant for signing and verifying a JAR file. In addition, aliases are specified when signing and verifying a JAR file. .TP -.B \f[CB]\-keystore\f[R] \f[I]url\f[R] +\f[V]-keystore\f[R] \f[I]url\f[R] Specifies the URL that tells the keystore location. -This defaults to the file \f[CB]\&.keystore\f[R] in the user\[aq]s home -directory, as determined by the \f[CB]user.home\f[R] system property. +This defaults to the file \f[V].keystore\f[R] in the user\[aq]s home +directory, as determined by the \f[V]user.home\f[R] system property. .RS .PP A keystore is required when signing. @@ -653,52 +663,52 @@ You must explicitly specify a keystore when the default keystore doesn\[aq]t exist or if you want to use one other than the default. .PP A keystore isn\[aq]t required when verifying, but if one is specified or -the default exists and the \f[CB]\-verbose\f[R] option was also specified, +the default exists and the \f[V]-verbose\f[R] option was also specified, then additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore. .PP -The \f[CB]\-keystore\f[R] argument can be a file name and path +The \f[V]-keystore\f[R] argument can be a file name and path specification rather than a URL, in which case it is treated the same as a file: URL, for example, the following are equivalent: .IP \[bu] 2 -\f[CB]\-keystore\f[R] \f[I]filePathAndName\f[R] +\f[V]-keystore\f[R] \f[I]filePathAndName\f[R] .IP \[bu] 2 -\f[CB]\-keystore\ file:\f[R]\f[I]filePathAndName\f[R] +\f[V]-keystore file:\f[R]\f[I]filePathAndName\f[R] .PP If the Sun PKCS #11 provider was configured in the -\f[CB]java.security\f[R] security properties file (located in the -JDK\[aq]s \f[CB]$JAVA_HOME/conf/security\f[R] directory), then the -\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R] tools can operate on the PKCS +\f[V]java.security\f[R] security properties file (located in the +JDK\[aq]s \f[V]$JAVA_HOME/conf/security\f[R] directory), then the +\f[V]keytool\f[R] and \f[V]jarsigner\f[R] tools can operate on the PKCS #11 token by specifying these options: .RS .PP -\f[CB]\-keystore\ NONE\ \-storetype\ PKCS11\f[R] +\f[V]-keystore NONE -storetype PKCS11\f[R] .RE .PP For example, the following command lists the contents of the configured PKCS#11 token: .RS .PP -\f[CB]keytool\ \-keystore\ NONE\ \-storetype\ PKCS11\ \-list\f[R] +\f[V]keytool -keystore NONE -storetype PKCS11 -list\f[R] .RE .RE .TP -.B \f[CB]\-storepass\f[R] [\f[CB]:env\f[R] | \f[CB]:file\f[R]] \f[I]argument\f[R] +\f[V]-storepass\f[R] [\f[V]:env\f[R] | \f[V]:file\f[R]] \f[I]argument\f[R] Specifies the password that is required to access the keystore. This is only needed when signing (not verifying) a JAR file. -In that case, if a \f[CB]\-storepass\f[R] option isn\[aq]t provided at the +In that case, if a \f[V]-storepass\f[R] option isn\[aq]t provided at the command line, then the user is prompted for the password. .RS .PP -If the modifier \f[CB]env\f[R] or \f[CB]file\f[R] isn\[aq]t specified, then -the password has the value \f[CB]argument\f[R]. +If the modifier \f[V]env\f[R] or \f[V]file\f[R] isn\[aq]t specified, +then the password has the value \f[V]argument\f[R]. Otherwise, the password is retrieved as follows: .IP \[bu] 2 -\f[CB]env\f[R]: Retrieve the password from the environment variable named +\f[V]env\f[R]: Retrieve the password from the environment variable named \f[I]argument\f[R]. .IP \[bu] 2 -\f[CB]file\f[R]: Retrieve the password from the file named +\f[V]file\f[R]: Retrieve the password from the file named \f[I]argument\f[R]. .PP \f[B]Note:\f[R] @@ -707,41 +717,41 @@ The password shouldn\[aq]t be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. .RE .TP -.B \f[CB]\-storetype\f[R] \f[I]storetype\f[R] +\f[V]-storetype\f[R] \f[I]storetype\f[R] Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of -the \f[CB]keystore.type\f[R] property in the security properties file, -which is returned by the static \f[CB]getDefaultType\f[R] method in -\f[CB]java.security.KeyStore\f[R]. +the \f[V]keystore.type\f[R] property in the security properties file, +which is returned by the static \f[V]getDefaultType\f[R] method in +\f[V]java.security.KeyStore\f[R]. .RS .PP The PIN for a PKCS #11 token can also be specified with the -\f[CB]\-storepass\f[R] option. -If none is specified, then the \f[CB]keytool\f[R] and \f[CB]jarsigner\f[R] +\f[V]-storepass\f[R] option. +If none is specified, then the \f[V]keytool\f[R] and \f[V]jarsigner\f[R] commands prompt for the token PIN. If the token has a protected authentication path (such as a dedicated -PIN\-pad or a biometric reader), then the \f[CB]\-protected\f[R] option +PIN-pad or a biometric reader), then the \f[V]-protected\f[R] option must be specified and no password options can be specified. .RE .TP -.B \f[CB]\-keypass\f[R] [\f[CB]:env\f[R] | \f[CB]:file\f[R]] \f[I]argument\f[R] \f[CB]\-certchain\f[R] \f[I]file\f[R] +\f[V]-keypass\f[R] [\f[V]:env\f[R] | \f[V]:file\f[R]] \f[I]argument\f[R] \f[V]-certchain\f[R] \f[I]file\f[R] Specifies the password used to protect the private key of the keystore entry addressed by the alias specified on the command line. -The password is required when using \f[CB]jarsigner\f[R] to sign a JAR +The password is required when using \f[V]jarsigner\f[R] to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, then the user is prompted for it. .RS .PP -If the modifier \f[CB]env\f[R] or \f[CB]file\f[R] isn\[aq]t specified, then -the password has the value \f[CB]argument\f[R]. +If the modifier \f[V]env\f[R] or \f[V]file\f[R] isn\[aq]t specified, +then the password has the value \f[V]argument\f[R]. Otherwise, the password is retrieved as follows: .IP \[bu] 2 -\f[CB]env\f[R]: Retrieve the password from the environment variable named +\f[V]env\f[R]: Retrieve the password from the environment variable named \f[I]argument\f[R]. .IP \[bu] 2 -\f[CB]file\f[R]: Retrieve the password from the file named +\f[V]file\f[R]: Retrieve the password from the file named \f[I]argument\f[R]. .PP \f[B]Note:\f[R] @@ -750,7 +760,7 @@ The password shouldn\[aq]t be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. .RE .TP -.B \f[CB]\-certchain\f[R] \f[I]file\f[R] +\f[V]-certchain\f[R] \f[I]file\f[R] Specifies the certificate chain to be used when the certificate chain associated with the private key of the keystore entry that is addressed by the alias specified on the command line isn\[aq]t complete. @@ -761,26 +771,23 @@ single PKCS#7 formatted data block, either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by \f[B]Internet RFC 1421 Certificate Encoding Standard\f[R] [http://tools.ietf.org/html/rfc1421]. -.RS -.RE .TP -.B \f[CB]\-sigfile\f[R] \f[I]file\f[R] -Specifies the base file name to be used for the generated \f[CB]\&.SF\f[R] +\f[V]-sigfile\f[R] \f[I]file\f[R] +Specifies the base file name to be used for the generated \f[V].SF\f[R] and signature block files. -For example, if file is \f[CB]DUKESIGN\f[R], then the generated -\f[CB]\&.SF\f[R] and signature block files are named \f[CB]DUKESIGN.SF\f[R] -and \f[CB]DUKESIGN.RSA\f[R], and placed in the \f[CB]META\-INF\f[R] +For example, if file is \f[V]DUKESIGN\f[R], then the generated +\f[V].SF\f[R] and signature block files are named \f[V]DUKESIGN.SF\f[R] +and \f[V]DUKESIGN.RSA\f[R], and placed in the \f[V]META-INF\f[R] directory of the signed JAR file. .RS .PP -The characters in the file must come from the set -\f[CB]a\-zA\-Z0\-9_\-\f[R]. +The characters in the file must come from the set \f[V]a-zA-Z0-9_-\f[R]. Only letters, numbers, underscore, and hyphen characters are allowed. All lowercase characters are converted to uppercase for the -\f[CB]\&.SF\f[R] and signature block file names. +\f[V].SF\f[R] and signature block file names. .PP -If no \f[CB]\-sigfile\f[R] option appears on the command line, then the -base file name for the \f[CB]\&.SF\f[R] and signature block files is the +If no \f[V]-sigfile\f[R] option appears on the command line, then the +base file name for the \f[V].SF\f[R] and signature block files is the first 8 characters of the alias name specified on the command line, all converted to upper case. If the alias name has fewer than 8 characters, then the full alias name @@ -790,12 +797,10 @@ signature file name, then each such character is converted to an underscore (_) character to form the file name. .RE .TP -.B \f[CB]\-signedjar\f[R] \f[I]file\f[R] +\f[V]-signedjar\f[R] \f[I]file\f[R] Specifies the name of signed JAR file. -.RS -.RE .TP -.B \f[CB]\-digestalg\f[R] \f[I]algorithm\f[R] +\f[V]-digestalg\f[R] \f[I]algorithm\f[R] Specifies the name of the message digest algorithm to use when digesting the entries of a JAR file. .RS @@ -803,14 +808,14 @@ the entries of a JAR file. For a list of standard message digest algorithm names, see Java Security Standard Algorithm Names. .PP -If this option isn\[aq]t specified, then \f[CB]SHA\-384\f[R] is used. +If this option isn\[aq]t specified, then \f[V]SHA-384\f[R] is used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one -with the \f[CB]\-addprovider\f[R] or \f[CB]\-providerClass\f[R] options; +with the \f[V]-addprovider\f[R] or \f[V]-providerClass\f[R] options; otherwise, the command will not succeed. .RE .TP -.B \f[CB]\-sigalg\f[R] \f[I]algorithm\f[R] +\f[V]-sigalg\f[R] \f[I]algorithm\f[R] Specifies the name of the signature algorithm to use to sign the JAR file. .RS @@ -822,39 +827,37 @@ matching the private key as described in the \f[B]Supported Algorithms\f[R] section. There must either be a statically installed provider supplying an implementation of the specified algorithm or you must specify one with -the \f[CB]\-addprovider\f[R] or \f[CB]\-providerClass\f[R] option; +the \f[V]-addprovider\f[R] or \f[V]-providerClass\f[R] option; otherwise, the command doesn\[aq]t succeed. .PP For a list of standard message digest algorithm names, see Java Security Standard Algorithm Names. .RE .TP -.B \f[CB]\-verify\f[R] +\f[V]-verify\f[R] Verifies a signed JAR file. -.RS -.RE .TP -.B \f[CB]\-verbose\f[R][\f[CB]:\f[R]\f[I]suboptions\f[R]] -When the \f[CB]\-verbose\f[R] option appears on the command line, it -indicates that the \f[CB]jarsigner\f[R] use the verbose mode when signing +\f[V]-verbose\f[R][\f[V]:\f[R]\f[I]suboptions\f[R]] +When the \f[V]-verbose\f[R] option appears on the command line, it +indicates that the \f[V]jarsigner\f[R] use the verbose mode when signing or verifying with the suboptions determining how much information is shown. -This causes the , which causes \f[CB]jarsigner\f[R] to output extra +This causes the , which causes \f[V]jarsigner\f[R] to output extra information about the progress of the JAR signing or verification. -The \f[I]suboptions\f[R] can be \f[CB]all\f[R], \f[CB]grouped\f[R], or -\f[CB]summary\f[R]. +The \f[I]suboptions\f[R] can be \f[V]all\f[R], \f[V]grouped\f[R], or +\f[V]summary\f[R]. .RS .PP -If the \f[CB]\-certs\f[R] option is also specified, then the default mode -(or suboption \f[CB]all\f[R]) displays each entry as it is being +If the \f[V]-certs\f[R] option is also specified, then the default mode +(or suboption \f[V]all\f[R]) displays each entry as it is being processed, and after that, the certificate information for each signer of the JAR file. .PP -If the \f[CB]\-certs\f[R] and the \f[CB]\-verbose:grouped\f[R] suboptions +If the \f[V]-certs\f[R] and the \f[V]-verbose:grouped\f[R] suboptions are specified, then entries with the same signer info are grouped and displayed together with their certificate information. .PP -If \f[CB]\-certs\f[R] and the \f[CB]\-verbose:summary\f[R] suboptions are +If \f[V]-certs\f[R] and the \f[V]-verbose:summary\f[R] suboptions are specified, then entries with the same signer information are grouped and displayed together with their certificate information. .PP @@ -864,14 +867,14 @@ See \f[B]Example of Verifying a Signed JAR File\f[R] and \f[B]Example of Verification with Certificate Information\f[R]. .RE .TP -.B \f[CB]\-certs\f[R] -If the \f[CB]\-certs\f[R] option appears on the command line with the -\f[CB]\-verify\f[R] and \f[CB]\-verbose\f[R] options, then the output +\f[V]-certs\f[R] +If the \f[V]-certs\f[R] option appears on the command line with the +\f[V]-verify\f[R] and \f[V]-verbose\f[R] options, then the output includes certificate information for each signer of the JAR file. This information includes the name of the type of certificate (stored in the signature block file) that certifies the signer\[aq]s public key, and if the certificate is an X.509 certificate (an instance of the -\f[CB]java.security.cert.X509Certificate\f[R]), then the distinguished +\f[V]java.security.cert.X509Certificate\f[R]), then the distinguished name of the signer. .RS .PP @@ -883,36 +886,34 @@ keystore, then the alias name for the keystore entry for that signer is displayed in parentheses. .RE .TP -.B \f[CB]\-revCheck\f[R] +\f[V]-revCheck\f[R] This option enables revocation checking of certificates when signing or verifying a JAR file. -The \f[CB]jarsigner\f[R] command attempts to make network connections to -fetch OCSP responses and CRLs if the \f[CB]\-revCheck\f[R] option is +The \f[V]jarsigner\f[R] command attempts to make network connections to +fetch OCSP responses and CRLs if the \f[V]-revCheck\f[R] option is specified on the command line. Note that revocation checks are not enabled unless this option is specified. -.RS -.RE .TP -.B \f[CB]\-tsa\f[R] \f[I]url\f[R] -If \f[CB]\-tsa\ http://example.tsa.url\f[R] appears on the command line +\f[V]-tsa\f[R] \f[I]url\f[R] +If \f[V]-tsa http://example.tsa.url\f[R] appears on the command line when signing a JAR file then a time stamp is generated for the signature. -The URL, \f[CB]http://example.tsa.url\f[R], identifies the location of the -Time Stamping Authority (TSA) and overrides any URL found with the -\f[CB]\-tsacert\f[R] option. -The \f[CB]\-tsa\f[R] option doesn\[aq]t require the TSA public key +The URL, \f[V]http://example.tsa.url\f[R], identifies the location of +the Time Stamping Authority (TSA) and overrides any URL found with the +\f[V]-tsacert\f[R] option. +The \f[V]-tsa\f[R] option doesn\[aq]t require the TSA public key certificate to be present in the keystore. .RS .PP -To generate the time stamp, \f[CB]jarsigner\f[R] communicates with the TSA -with the Time\-Stamp Protocol (TSP) defined in RFC 3161. +To generate the time stamp, \f[V]jarsigner\f[R] communicates with the +TSA with the Time-Stamp Protocol (TSP) defined in RFC 3161. When successful, the time stamp token returned by the TSA is stored with the signature in the signature block file. .RE .TP -.B \f[CB]\-tsacert\f[R] \f[I]alias\f[R] -When \f[CB]\-tsacert\f[R] \f[I]alias\f[R] appears on the command line when +\f[V]-tsacert\f[R] \f[I]alias\f[R] +When \f[V]-tsacert\f[R] \f[I]alias\f[R] appears on the command line when signing a JAR file, a time stamp is generated for the signature. The alias identifies the TSA public key certificate in the keystore that is in effect. @@ -921,10 +922,10 @@ extension that contains a URL identifying the location of the TSA. .RS .PP The TSA public key certificate must be present in the keystore when -using the \f[CB]\-tsacert\f[R] option. +using the \f[V]-tsacert\f[R] option. .RE .TP -.B \f[CB]\-tsapolicyid\f[R] \f[I]policyid\f[R] +\f[V]-tsapolicyid\f[R] \f[I]policyid\f[R] Specifies the object identifier (OID) that identifies the policy ID to be sent to the TSA server. If this option isn\[aq]t specified, no policy ID is sent and the TSA @@ -932,15 +933,15 @@ server will choose a default policy ID. .RS .PP Object identifiers are defined by X.696, which is an ITU -Telecommunication Standardization Sector (ITU\-T) standard. -These identifiers are typically period\-separated sets of non\-negative -digits like \f[CB]1.2.3.4\f[R], for example. +Telecommunication Standardization Sector (ITU-T) standard. +These identifiers are typically period-separated sets of non-negative +digits like \f[V]1.2.3.4\f[R], for example. .RE .TP -.B \f[CB]\-tsadigestalg\f[R] \f[I]algorithm\f[R] +\f[V]-tsadigestalg\f[R] \f[I]algorithm\f[R] Specifies the message digest algorithm that is used to generate the message imprint to be sent to the TSA server. -If this option isn\[aq]t specified, SHA\-384 will be used. +If this option isn\[aq]t specified, SHA-384 will be used. .RS .PP See \f[B]Supported Algorithms\f[R]. @@ -949,25 +950,23 @@ For a list of standard message digest algorithm names, see Java Security Standard Algorithm Names. .RE .TP -.B \f[CB]\-internalsf\f[R] +\f[V]-internalsf\f[R] In the past, the signature block file generated when a JAR file was -signed included a complete encoded copy of the \f[CB]\&.SF\f[R] file +signed included a complete encoded copy of the \f[V].SF\f[R] file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the signature block -file by default doesn\[aq]t contain a copy of the \f[CB]\&.SF\f[R] file +file by default doesn\[aq]t contain a copy of the \f[V].SF\f[R] file anymore. -If \f[CB]\-internalsf\f[R] appears on the command line, then the old +If \f[V]-internalsf\f[R] appears on the command line, then the old behavior is utilized. This option is useful for testing. -In practice, don\[aq]t use the \f[CB]\-internalsf\f[R] option because it +In practice, don\[aq]t use the \f[V]-internalsf\f[R] option because it incurs higher overhead. -.RS -.RE .TP -.B \f[CB]\-sectionsonly\f[R] -If the \f[CB]\-sectionsonly\f[R] option appears on the command line, then -the \f[CB]\&.SF\f[R] file (signature file) generated when a JAR file is +\f[V]-sectionsonly\f[R] +If the \f[V]-sectionsonly\f[R] option appears on the command line, then +the \f[V].SF\f[R] file (signature file) generated when a JAR file is signed doesn\[aq]t include a header that contains a hash of the whole manifest file. It contains only the information and hashes related to each individual @@ -982,143 +981,132 @@ matches the hash of the whole manifest file. When there is a match, verification proceeds to the next step. When there is no match, it is necessary to do a less optimized verification that the hash in each source file information section in -the \f[CB]\&.SF\f[R] file equals the hash of its corresponding section in +the \f[V].SF\f[R] file equals the hash of its corresponding section in the manifest file. See \f[B]JAR File Verification\f[R]. .PP -The \f[CB]\-sectionsonly\f[R] option is primarily used for testing. +The \f[V]-sectionsonly\f[R] option is primarily used for testing. It shouldn\[aq]t be used other than for testing because using it incurs higher overhead. .RE .TP -.B \f[CB]\-protected\f[R] -Values can be either \f[CB]true\f[R] or \f[CB]false\f[R]. -Specify \f[CB]true\f[R] when a password must be specified through a +\f[V]-protected\f[R] +Values can be either \f[V]true\f[R] or \f[V]false\f[R]. +Specify \f[V]true\f[R] when a password must be specified through a protected authentication path such as a dedicated PIN reader. -.RS -.RE .TP -.B \f[CB]\-providerName\f[R] \f[I]providerName\f[R] -If more than one provider was configured in the \f[CB]java.security\f[R] -security properties file, then you can use the \f[CB]\-providerName\f[R] +\f[V]-providerName\f[R] \f[I]providerName\f[R] +If more than one provider was configured in the \f[V]java.security\f[R] +security properties file, then you can use the \f[V]-providerName\f[R] option to target a specific provider instance. The argument to this option is the name of the provider. .RS .PP For the Oracle PKCS #11 provider, \f[I]providerName\f[R] is of the form -\f[CB]SunPKCS11\-\f[R]\f[I]TokenName\f[R], where \f[I]TokenName\f[R] is the -name suffix that the provider instance has been configured with, as +\f[V]SunPKCS11-\f[R]\f[I]TokenName\f[R], where \f[I]TokenName\f[R] is +the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table. For example, the following command lists the contents of the -\f[CB]PKCS\ #11\f[R] keystore provider instance with name suffix -\f[CB]SmartCard\f[R]: +\f[V]PKCS #11\f[R] keystore provider instance with name suffix +\f[V]SmartCard\f[R]: .RS .PP -\f[CB]jarsigner\ \-keystore\ NONE\ \-storetype\ PKCS11\ \-providerName\ SunPKCS11\-SmartCard\ \-list\f[R] +\f[V]jarsigner -keystore NONE -storetype PKCS11 -providerName SunPKCS11-SmartCard -list\f[R] .RE .RE .TP -.B \f[CB]\-addprovider\f[R] \f[I]name\f[R] [\f[CB]\-providerArg\f[R] \f[I]arg\f[R]] +\f[V]-addprovider\f[R] \f[I]name\f[R] [\f[V]-providerArg\f[R] \f[I]arg\f[R]] Adds a security provider by name (such as SunPKCS11) and an optional configure argument. The value of the security provider is the name of a security provider that is defined in a module. .RS .PP -Used with the \f[CB]\-providerArg\ ConfigFilePath\f[R] option, the -\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R] tools install the provider -dynamically and use \f[CB]ConfigFilePath\f[R] for the path to the token +Used with the \f[V]-providerArg ConfigFilePath\f[R] option, the +\f[V]keytool\f[R] and \f[V]jarsigner\f[R] tools install the provider +dynamically and use \f[V]ConfigFilePath\f[R] for the path to the token configuration file. -The following example shows a command to list a \f[CB]PKCS\ #11\f[R] +The following example shows a command to list a \f[V]PKCS #11\f[R] keystore when the Oracle PKCS #11 provider wasn\[aq]t configured in the security properties file. .RS .PP -\f[CB]jarsigner\ \-keystore\ NONE\ \-storetype\ PKCS11\ \-addprovider\ SunPKCS11\ \-providerArg\ /mydir1/mydir2/token.config\f[R] +\f[V]jarsigner -keystore NONE -storetype PKCS11 -addprovider SunPKCS11 -providerArg /mydir1/mydir2/token.config\f[R] .RE .RE .TP -.B \f[CB]\-providerClass\f[R] \f[I]provider\-class\-name\f[R] [\f[CB]\-providerArg\f[R] \f[I]arg\f[R]] +\f[V]-providerClass\f[R] \f[I]provider-class-name\f[R] [\f[V]-providerArg\f[R] \f[I]arg\f[R]] Used to specify the name of cryptographic service provider\[aq]s master class file when the service provider isn\[aq]t listed in the -\f[CB]java.security\f[R] security properties file. -Adds a security provider by fully\-qualified class name and an optional +\f[V]java.security\f[R] security properties file. +Adds a security provider by fully-qualified class name and an optional configure argument. .RS .PP \f[B]Note:\f[R] .PP The preferred way to load PKCS11 is by using modules. -See \f[CB]\-addprovider\f[R]. +See \f[V]-addprovider\f[R]. .RE .TP -.B \f[CB]\-providerPath\f[R] \f[I]classpath\f[R] +\f[V]-providerPath\f[R] \f[I]classpath\f[R] Used to specify the classpath for providers specified by the -\f[CB]\-providerClass\f[R] option. -Multiple paths should be separated by the system\-dependent -path\-separator character. -.RS -.RE +\f[V]-providerClass\f[R] option. +Multiple paths should be separated by the system-dependent +path-separator character. .TP -.B \f[CB]\-J\f[R]\f[I]javaoption\f[R] +\f[V]-J\f[R]\f[I]javaoption\f[R] Passes through the specified \f[I]javaoption\f[R] string directly to the Java interpreter. -The \f[CB]jarsigner\f[R] command is a wrapper around the interpreter. +The \f[V]jarsigner\f[R] command is a wrapper around the interpreter. This option shouldn\[aq]t contain any spaces. It is useful for adjusting the execution environment or memory usage. -For a list of possible interpreter options, type \f[CB]java\ \-h\f[R] or -\f[CB]java\ \-X\f[R] at the command line. -.RS -.RE +For a list of possible interpreter options, type \f[V]java -h\f[R] or +\f[V]java -X\f[R] at the command line. .TP -.B \f[CB]\-strict\f[R] +\f[V]-strict\f[R] During the signing or verifying process, the command may issue warning messages. If you specify this option, the exit code of the tool reflects the severe warning messages that this command found. See \f[B]Errors and Warnings\f[R]. -.RS -.RE .TP -.B \f[CB]\-conf\f[R] \f[I]url\f[R] -Specifies a pre\-configured options file. +\f[V]-conf\f[R] \f[I]url\f[R] +Specifies a pre-configured options file. Read the \f[B]keytool documentation\f[R] for details. -The property keys supported are "jarsigner.all" for all actions, -"jarsigner.sign" for signing, and "jarsigner.verify" for verification. -\f[CB]jarsigner\f[R] arguments including the JAR file name and alias +The property keys supported are \[dq]jarsigner.all\[dq] for all actions, +\[dq]jarsigner.sign\[dq] for signing, and \[dq]jarsigner.verify\[dq] for +verification. +\f[V]jarsigner\f[R] arguments including the JAR file name and alias name(s) cannot be set in this file. -.RS -.RE .TP -.B \f[CB]\-version\f[R] +\f[V]-version\f[R] Prints the program version. -.RS -.RE .SH DEPRECATED OPTIONS .PP -The following \f[CB]jarsigner\f[R] options are deprecated as of JDK 9 and +The following \f[V]jarsigner\f[R] options are deprecated as of JDK 9 and might be removed in a future JDK release. .TP -.B \f[CB]\-altsigner\f[R] \f[I]class\f[R] +\f[V]-altsigner\f[R] \f[I]class\f[R] This option specifies an alternative signing mechanism. The fully qualified class name identifies a class file that extends the -\f[CB]com.sun.jarsigner.ContentSigner\f[R] abstract class. -The path to this class file is defined by the \f[CB]\-altsignerpath\f[R] +\f[V]com.sun.jarsigner.ContentSigner\f[R] abstract class. +The path to this class file is defined by the \f[V]-altsignerpath\f[R] option. -If the \f[CB]\-altsigner\f[R] option is used, then the \f[CB]jarsigner\f[R] +If the \f[V]-altsigner\f[R] option is used, then the \f[V]jarsigner\f[R] command uses the signing mechanism provided by the specified class. -Otherwise, the \f[CB]jarsigner\f[R] command uses its default signing +Otherwise, the \f[V]jarsigner\f[R] command uses its default signing mechanism. .RS .PP For example, to use the signing mechanism provided by a class named -\f[CB]com.sun.sun.jarsigner.AuthSigner\f[R], use the \f[CB]jarsigner\f[R] -option \f[CB]\-altsigner\ com.sun.jarsigner.AuthSigner\f[R]. +\f[V]com.sun.sun.jarsigner.AuthSigner\f[R], use the \f[V]jarsigner\f[R] +option \f[V]-altsigner com.sun.jarsigner.AuthSigner\f[R]. .RE .TP -.B \f[CB]\-altsignerpath\f[R] \f[I]classpathlist\f[R] +\f[V]-altsignerpath\f[R] \f[I]classpathlist\f[R] Specifies the path to the class file and any JAR file it depends on. -The class file name is specified with the \f[CB]\-altsigner\f[R] option. +The class file name is specified with the \f[V]-altsigner\f[R] option. If the class file is in a JAR file, then this option specifies the path to that JAR file. .RS @@ -1128,9 +1116,9 @@ specified. If \f[I]classpathlist\f[R] contains multiple paths or JAR files, then they should be separated with a: .IP \[bu] 2 -Colon (\f[CB]:\f[R]) on Linux and macOS +Colon (\f[V]:\f[R]) on Linux and macOS .IP \[bu] 2 -Semicolon (\f[CB];\f[R]) on Windows +Semicolon (\f[V];\f[R]) on Windows .PP This option isn\[aq]t necessary when the class is already in the search path. @@ -1140,7 +1128,7 @@ contains the class file. The JAR file name is included. .RS .PP -\f[CB]\-altsignerpath\ /home/user/lib/authsigner.jar\f[R] +\f[V]-altsignerpath /home/user/lib/authsigner.jar\f[R] .RE .PP The following example shows how to specify the path to the JAR file that @@ -1148,221 +1136,183 @@ contains the class file. The JAR file name is omitted. .RS .PP -\f[CB]\-altsignerpath\ /home/user/classes/com/sun/tools/jarsigner/\f[R] +\f[V]-altsignerpath /home/user/classes/com/sun/tools/jarsigner/\f[R] .RE .RE .SH ERRORS AND WARNINGS .PP -During the signing or verifying process, the \f[CB]jarsigner\f[R] command +During the signing or verifying process, the \f[V]jarsigner\f[R] command may issue various errors or warnings. .PP -If there is a failure, the \f[CB]jarsigner\f[R] command exits with code 1. +If there is a failure, the \f[V]jarsigner\f[R] command exits with code +1. If there is no failure, but there are one or more severe warnings, the -\f[CB]jarsigner\f[R] command exits with code 0 when the \f[CB]\-strict\f[R] -option is \f[B]not\f[R] specified, or exits with the OR\-value of the -warning codes when the \f[CB]\-strict\f[R] is specified. +\f[V]jarsigner\f[R] command exits with code 0 when the \f[V]-strict\f[R] +option is \f[B]not\f[R] specified, or exits with the OR-value of the +warning codes when the \f[V]-strict\f[R] is specified. If there is only informational warnings or no warning at all, the command always exits with code 0. .PP For example, if a certificate used to sign an entry is expired and has a KeyUsage extension that doesn\[aq]t allow it to sign a file, the -\f[CB]jarsigner\f[R] command exits with code 12 (=4+8) when the -\f[CB]\-strict\f[R] option is specified. +\f[V]jarsigner\f[R] command exits with code 12 (=4+8) when the +\f[V]-strict\f[R] option is specified. .PP \f[B]Note:\f[R] Exit codes are reused because only the values from 0 to 255 are legal on Linux and OS X. .PP The following sections describes the names, codes, and descriptions of -the errors and warnings that the \f[CB]jarsigner\f[R] command can issue. +the errors and warnings that the \f[V]jarsigner\f[R] command can issue. .SH FAILURE .PP -Reasons why the \f[CB]jarsigner\f[R] command fails include (but aren\[aq]t -limited to) a command line parsing error, the inability to find a -keypair to sign the JAR file, or the verification of a signed JAR fails. +Reasons why the \f[V]jarsigner\f[R] command fails include (but +aren\[aq]t limited to) a command line parsing error, the inability to +find a keypair to sign the JAR file, or the verification of a signed JAR +fails. .TP -.B failure +failure Code 1. The signing or verifying fails. -.RS -.RE .SH SEVERE WARNINGS .PP \f[B]Note:\f[R] .PP Severe warnings are reported as errors if you specify the -\f[CB]\-strict\f[R] option. +\f[V]-strict\f[R] option. .PP -Reasons why the \f[CB]jarsigner\f[R] command issues a severe warning +Reasons why the \f[V]jarsigner\f[R] command issues a severe warning include the certificate used to sign the JAR file has an error or the signed JAR file has other problems. .TP -.B hasExpiredCert +hasExpiredCert Code 4. This JAR contains entries whose signer certificate has expired. -.RS -.RE .TP -.B hasExpiredTsaCert +hasExpiredTsaCert Code 4. The timestamp has expired. -.RS -.RE .TP -.B notYetValidCert +notYetValidCert Code 4. This JAR contains entries whose signer certificate isn\[aq]t yet valid. -.RS -.RE .TP -.B chainNotValidated +chainNotValidated Code 4. This JAR contains entries whose certificate chain isn\[aq]t validated. -.RS -.RE .TP -.B tsaChainNotValidated +tsaChainNotValidated Code 64. The timestamp is invalid. -.RS -.RE .TP -.B signerSelfSigned +signerSelfSigned Code 4. This JAR contains entries whose signer certificate is self signed. -.RS -.RE .TP -.B disabledAlg +disabledAlg Code 4. An algorithm used is considered a security risk and is disabled. -.RS -.RE .TP -.B badKeyUsage +badKeyUsage Code 8. This JAR contains entries whose signer certificate\[aq]s KeyUsage extension doesn\[aq]t allow code signing. -.RS -.RE .TP -.B badExtendedKeyUsage +badExtendedKeyUsage Code 8. This JAR contains entries whose signer certificate\[aq]s ExtendedKeyUsage extension doesn\[aq]t allow code signing. -.RS -.RE .TP -.B badNetscapeCertType +badNetscapeCertType Code 8. This JAR contains entries whose signer certificate\[aq]s NetscapeCertType extension doesn\[aq]t allow code signing. -.RS -.RE .TP -.B hasUnsignedEntry +hasUnsignedEntry Code 16. This JAR contains unsigned entries which haven\[aq]t been -integrity\-checked. -.RS -.RE +integrity-checked. .TP -.B notSignedByAlias +notSignedByAlias Code 32. This JAR contains signed entries which aren\[aq]t signed by the specified alias(es). -.RS -.RE .TP -.B aliasNotInStore +aliasNotInStore Code 32. This JAR contains signed entries that aren\[aq]t signed by alias in this keystore. -.RS -.RE .TP -.B tsaChainNotValidated +tsaChainNotValidated Code 64. This JAR contains entries whose TSA certificate chain is invalid. -.RS -.RE .SH INFORMATIONAL WARNINGS .PP Informational warnings include those that aren\[aq]t errors but regarded as bad practice. They don\[aq]t have a code. .TP -.B extraAttributesDetected +extraAttributesDetected The POSIX file permissions and/or symlink attributes are detected during signing or verifying a JAR file. -The \f[CB]jarsigner\f[R] tool preserves these attributes in the newly +The \f[V]jarsigner\f[R] tool preserves these attributes in the newly signed file but warns that these attributes are unsigned and not protected by the signature. -.RS -.RE .TP -.B hasExpiringCert +hasExpiringCert This JAR contains entries whose signer certificate expires within six months. -.RS -.RE .TP -.B hasExpiringTsaCert -The timestamp will expire within one year on \f[CB]YYYY\-MM\-DD\f[R]. -.RS -.RE +hasExpiringTsaCert +The timestamp will expire within one year on \f[V]YYYY-MM-DD\f[R]. .TP -.B legacyAlg +legacyAlg An algorithm used is considered a security risk but not disabled. -.RS -.RE .TP -.B noTimestamp +noTimestamp This JAR contains signatures that doesn\[aq]t include a timestamp. Without a timestamp, users may not be able to validate this JAR file after the signer certificate\[aq]s expiration date -(\f[CB]YYYY\-MM\-DD\f[R]) or after any future revocation date. -.RS -.RE +(\f[V]YYYY-MM-DD\f[R]) or after any future revocation date. .SH EXAMPLE OF SIGNING A JAR FILE .PP -Use the following command to sign \f[CB]bundle.jar\f[R] with the private -key of a user whose keystore alias is \f[CB]jane\f[R] in a keystore named -\f[CB]mystore\f[R] in the \f[CB]working\f[R] directory and name the signed -JAR file \f[CB]sbundle.jar\f[R]: +Use the following command to sign \f[V]bundle.jar\f[R] with the private +key of a user whose keystore alias is \f[V]jane\f[R] in a keystore named +\f[V]mystore\f[R] in the \f[V]working\f[R] directory and name the signed +JAR file \f[V]sbundle.jar\f[R]: .RS .PP -\f[CB]jarsigner\ \-keystore\ /working/mystore\ \-storepass\f[R] -\f[I]keystore_password\f[R] \f[CB]\-keypass\f[R] +\f[V]jarsigner -keystore /working/mystore -storepass\f[R] +\f[I]keystore_password\f[R] \f[V]-keypass\f[R] \f[I]private_key_password\f[R] -\f[CB]\-signedjar\ sbundle.jar\ bundle.jar\ jane\f[R] +\f[V]-signedjar sbundle.jar bundle.jar jane\f[R] .RE .PP -There is no \f[CB]\-sigfile\f[R] specified in the previous command so the -generated \f[CB]\&.SF\f[R] and signature block files to be placed in the +There is no \f[V]-sigfile\f[R] specified in the previous command so the +generated \f[V].SF\f[R] and signature block files to be placed in the signed JAR file have default names based on the alias name. -They are named \f[CB]JANE.SF\f[R] and \f[CB]JANE.RSA\f[R]. +They are named \f[V]JANE.SF\f[R] and \f[V]JANE.RSA\f[R]. .PP If you want to be prompted for the store password and the private key password, then you could shorten the previous command to the following: .RS .PP -\f[CB]jarsigner\ \-keystore\ /working/mystore\ \-signedjar\ sbundle.jar\ bundle.jar\ jane\f[R] +\f[V]jarsigner -keystore /working/mystore -signedjar sbundle.jar bundle.jar jane\f[R] .RE .PP -If the \f[CB]keystore\f[R] is the default \f[CB]keystore\f[R] -(\f[CB]\&.keystore\f[R] in your home directory), then you don\[aq]t need -to specify a \f[CB]keystore\f[R], as follows: +If the \f[V]keystore\f[R] is the default \f[V]keystore\f[R] +(\f[V].keystore\f[R] in your home directory), then you don\[aq]t need to +specify a \f[V]keystore\f[R], as follows: .RS .PP -\f[CB]jarsigner\ \-signedjar\ sbundle.jar\ bundle.jar\ jane\f[R] +\f[V]jarsigner -signedjar sbundle.jar bundle.jar jane\f[R] .RE .PP If you want the signed JAR file to overwrite the input JAR file -(\f[CB]bundle.jar\f[R]), then you don\[aq]t need to specify a -\f[CB]\-signedjar\f[R] option, as follows: +(\f[V]bundle.jar\f[R]), then you don\[aq]t need to specify a +\f[V]-signedjar\f[R] option, as follows: .RS .PP -\f[CB]jarsigner\ bundle.jar\ jane\f[R] +\f[V]jarsigner bundle.jar jane\f[R] .RE .SH EXAMPLE OF VERIFYING A SIGNED JAR FILE .PP @@ -1371,53 +1321,53 @@ the JAR file wasn\[aq]t been tampered with, use a command such as the following: .RS .PP -\f[CB]jarsigner\ \-verify\ ButtonDemo.jar\f[R] +\f[V]jarsigner -verify ButtonDemo.jar\f[R] .RE .PP -When the verification is successful, \f[CB]jar\ verified\f[R] is +When the verification is successful, \f[V]jar verified\f[R] is displayed. Otherwise, an error message is displayed. -You can get more information when you use the \f[CB]\-verbose\f[R] option. -A sample use of \f[CB]jarsigner\f[R] with the \f[CB]\-verbose\f[R] option +You can get more information when you use the \f[V]-verbose\f[R] option. +A sample use of \f[V]jarsigner\f[R] with the \f[V]-verbose\f[R] option follows: .IP .nf \f[CB] -jarsigner\ \-verify\ \-verbose\ ButtonDemo.jar +jarsigner -verify -verbose ButtonDemo.jar -s\ \ \ \ \ \ \ 866\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/MANIFEST.MF -\ \ \ \ \ \ \ \ 825\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.SF -\ \ \ \ \ \ \ 7475\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.RSA -\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:54\ EDT\ 2017\ META\-INF/ -\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ -\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/ -sm\ \ \ \ \ \ 523\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo$1.class -sm\ \ \ \ \ 3440\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.class -sm\ \ \ \ \ 2346\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.jnlp -sm\ \ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/left.gif -sm\ \ \ \ \ \ 235\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/middle.gif -sm\ \ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/right.gif +s 866 Tue Sep 12 20:08:48 EDT 2017 META-INF/MANIFEST.MF + 825 Tue Sep 12 20:08:48 EDT 2017 META-INF/ORACLE_C.SF + 7475 Tue Sep 12 20:08:48 EDT 2017 META-INF/ORACLE_C.RSA + 0 Tue Sep 12 20:07:54 EDT 2017 META-INF/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/images/ +sm 523 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo$1.class +sm 3440 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.class +sm 2346 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.jnlp +sm 172 Tue Sep 12 20:07:16 EDT 2017 components/images/left.gif +sm 235 Tue Sep 12 20:07:16 EDT 2017 components/images/middle.gif +sm 172 Tue Sep 12 20:07:16 EDT 2017 components/images/right.gif -\ \ s\ =\ signature\ was\ verified -\ \ m\ =\ entry\ is\ listed\ in\ manifest -\ \ k\ =\ at\ least\ one\ certificate\ was\ found\ in\ keystore + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore -\-\ Signed\ by\ "CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US" -\ \ \ \ Digest\ algorithm:\ SHA\-256 -\ \ \ \ Signature\ algorithm:\ SHA256withRSA,\ 2048\-bit\ key -\ \ Timestamped\ by\ "CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US"\ on\ Tue\ Sep\ 12\ 20:08:49\ UTC\ 2017 -\ \ \ \ Timestamp\ digest\ algorithm:\ SHA\-1 -\ \ \ \ Timestamp\ signature\ algorithm:\ SHA1withRSA,\ 2048\-bit\ key +- Signed by \[dq]CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US\[dq] + Digest algorithm: SHA-256 + Signature algorithm: SHA256withRSA, 2048-bit key + Timestamped by \[dq]CN=Symantec Time Stamping Services Signer - G4, O=Symantec Corporation, C=US\[dq] on Tue Sep 12 20:08:49 UTC 2017 + Timestamp digest algorithm: SHA-1 + Timestamp signature algorithm: SHA1withRSA, 2048-bit key -jar\ verified. +jar verified. -The\ signer\ certificate\ expired\ on\ 2018\-02\-01.\ However,\ the\ JAR\ will\ be\ valid\ until\ the\ timestamp\ expires\ on\ 2020\-12\-29. +The signer certificate expired on 2018-02-01. However, the JAR will be valid until the timestamp expires on 2020-12-29. \f[R] .fi .SH EXAMPLE OF VERIFICATION WITH CERTIFICATE INFORMATION .PP -If you specify the \f[CB]\-certs\f[R] option with the \f[CB]\-verify\f[R] -and \f[CB]\-verbose\f[R] options, then the output includes certificate +If you specify the \f[V]-certs\f[R] option with the \f[V]-verify\f[R] +and \f[V]-verbose\f[R] options, then the output includes certificate information for each signer of the JAR file. The information includes the certificate type, the signer distinguished name information (when it is an X.509 certificate), and in parentheses, @@ -1426,69 +1376,69 @@ JAR file matches the one in a keystore entry, for example: .IP .nf \f[CB] -jarsigner\ \-keystore\ $JAVA_HOME/lib/security/cacerts\ \-verify\ \-verbose\ \-certs\ ButtonDemo.jar +jarsigner -keystore $JAVA_HOME/lib/security/cacerts -verify -verbose -certs ButtonDemo.jar -s\ k\ \ \ \ \ 866\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/MANIFEST.MF +s k 866 Tue Sep 12 20:08:48 EDT 2017 META-INF/MANIFEST.MF -\ \ \ \ \ \ >>>\ Signer -\ \ \ \ \ \ X.509,\ CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2017\-01\-30,\ 7:00\ PM\ to\ 2018\-02\-01,\ 6:59\ PM] -\ \ \ \ \ \ X.509,\ CN=Symantec\ Class\ 3\ SHA256\ Code\ Signing\ CA,\ OU=Symantec\ Trust\ Network,\ O=Symantec\ Corporation,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2013\-12\-09,\ 7:00\ PM\ to\ 2023\-12\-09,\ 6:59\ PM] -\ \ \ \ \ \ X.509,\ CN=VeriSign\ Class\ 3\ Public\ Primary\ Certification\ Authority\ \-\ G5,\ OU="(c)\ 2006\ VeriSign,\ Inc.\ \-\ For\ authorized\ use\ only",\ OU=VeriSign\ Trust\ Network,\ O="VeriSign,\ Inc.",\ C=US\ (verisignclass3g5ca\ [jdk]) -\ \ \ \ \ \ [trusted\ certificate] -\ \ \ \ \ \ >>>\ TSA -\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-10\-17,\ 8:00\ PM\ to\ 2020\-12\-29,\ 6:59\ PM] -\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ CA\ \-\ G2,\ O=Symantec\ Corporation,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-12\-20,\ 7:00\ PM\ to\ 2020\-12\-30,\ 6:59\ PM] + >>> Signer + X.509, CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US + [certificate is valid from 2017-01-30, 7:00 PM to 2018-02-01, 6:59 PM] + X.509, CN=Symantec Class 3 SHA256 Code Signing CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US + [certificate is valid from 2013-12-09, 7:00 PM to 2023-12-09, 6:59 PM] + X.509, CN=VeriSign Class 3 Public Primary Certification Authority - G5, OU=\[dq](c) 2006 VeriSign, Inc. - For authorized use only\[dq], OU=VeriSign Trust Network, O=\[dq]VeriSign, Inc.\[dq], C=US (verisignclass3g5ca [jdk]) + [trusted certificate] + >>> TSA + X.509, CN=Symantec Time Stamping Services Signer - G4, O=Symantec Corporation, C=US + [certificate is valid from 2012-10-17, 8:00 PM to 2020-12-29, 6:59 PM] + X.509, CN=Symantec Time Stamping Services CA - G2, O=Symantec Corporation, C=US + [certificate is valid from 2012-12-20, 7:00 PM to 2020-12-30, 6:59 PM] -\ \ \ \ \ \ \ \ 825\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.SF -\ \ \ \ \ \ \ 7475\ Tue\ Sep\ 12\ 20:08:48\ EDT\ 2017\ META\-INF/ORACLE_C.RSA -\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:54\ EDT\ 2017\ META\-INF/ -\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ -\ \ \ \ \ \ \ \ \ \ 0\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/ -smk\ \ \ \ \ 523\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo$1.class + 825 Tue Sep 12 20:08:48 EDT 2017 META-INF/ORACLE_C.SF + 7475 Tue Sep 12 20:08:48 EDT 2017 META-INF/ORACLE_C.RSA + 0 Tue Sep 12 20:07:54 EDT 2017 META-INF/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/images/ +smk 523 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo$1.class -\ \ \ \ \ \ [entry\ was\ signed\ on\ 2017\-09\-12,\ 4:08\ PM] -\ \ \ \ \ \ >>>\ Signer -\ \ \ \ \ \ X.509,\ CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2017\-01\-30,\ 7:00\ PM\ to\ 2018\-02\-01,\ 6:59\ PM] -\ \ \ \ \ \ X.509,\ CN=Symantec\ Class\ 3\ SHA256\ Code\ Signing\ CA,\ OU=Symantec\ Trust\ Network,\ O=Symantec\ Corporation,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2013\-12\-09,\ 7:00\ PM\ to\ 2023\-12\-09,\ 6:59\ PM] -\ \ \ \ \ \ X.509,\ CN=VeriSign\ Class\ 3\ Public\ Primary\ Certification\ Authority\ \-\ G5,\ OU="(c)\ 2006\ VeriSign,\ Inc.\ \-\ For\ authorized\ use\ only",\ OU=VeriSign\ Trust\ Network,\ O="VeriSign,\ Inc.",\ C=US\ (verisignclass3g5ca\ [jdk]) -\ \ \ \ \ \ [trusted\ certificate] -\ \ \ \ \ \ >>>\ TSA -\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-10\-17,\ 8:00\ PM\ to\ 2020\-12\-29,\ 6:59\ PM] -\ \ \ \ \ \ X.509,\ CN=Symantec\ Time\ Stamping\ Services\ CA\ \-\ G2,\ O=Symantec\ Corporation,\ C=US -\ \ \ \ \ \ [certificate\ is\ valid\ from\ 2012\-12\-20,\ 7:00\ PM\ to\ 2020\-12\-30,\ 6:59\ PM] + [entry was signed on 2017-09-12, 4:08 PM] + >>> Signer + X.509, CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US + [certificate is valid from 2017-01-30, 7:00 PM to 2018-02-01, 6:59 PM] + X.509, CN=Symantec Class 3 SHA256 Code Signing CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US + [certificate is valid from 2013-12-09, 7:00 PM to 2023-12-09, 6:59 PM] + X.509, CN=VeriSign Class 3 Public Primary Certification Authority - G5, OU=\[dq](c) 2006 VeriSign, Inc. - For authorized use only\[dq], OU=VeriSign Trust Network, O=\[dq]VeriSign, Inc.\[dq], C=US (verisignclass3g5ca [jdk]) + [trusted certificate] + >>> TSA + X.509, CN=Symantec Time Stamping Services Signer - G4, O=Symantec Corporation, C=US + [certificate is valid from 2012-10-17, 8:00 PM to 2020-12-29, 6:59 PM] + X.509, CN=Symantec Time Stamping Services CA - G2, O=Symantec Corporation, C=US + [certificate is valid from 2012-12-20, 7:00 PM to 2020-12-30, 6:59 PM] -smk\ \ \ \ 3440\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.class +smk 3440 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.class \&... -smk\ \ \ \ 2346\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/ButtonDemo.jnlp +smk 2346 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.jnlp \&... -smk\ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/left.gif +smk 172 Tue Sep 12 20:07:16 EDT 2017 components/images/left.gif \&... -smk\ \ \ \ \ 235\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/middle.gif +smk 235 Tue Sep 12 20:07:16 EDT 2017 components/images/middle.gif \&... -smk\ \ \ \ \ 172\ Tue\ Sep\ 12\ 20:07:16\ EDT\ 2017\ components/images/right.gif +smk 172 Tue Sep 12 20:07:16 EDT 2017 components/images/right.gif \&... -\ \ s\ =\ signature\ was\ verified -\ \ m\ =\ entry\ is\ listed\ in\ manifest -\ \ k\ =\ at\ least\ one\ certificate\ was\ found\ in\ keystore + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore -\-\ Signed\ by\ "CN="Oracle\ America,\ Inc.",\ OU=Software\ Engineering,\ O="Oracle\ America,\ Inc.",\ L=Redwood\ City,\ ST=California,\ C=US" -\ \ \ \ Digest\ algorithm:\ SHA\-256 -\ \ \ \ Signature\ algorithm:\ SHA256withRSA,\ 2048\-bit\ key -\ \ Timestamped\ by\ "CN=Symantec\ Time\ Stamping\ Services\ Signer\ \-\ G4,\ O=Symantec\ Corporation,\ C=US"\ on\ Tue\ Sep\ 12\ 20:08:49\ UTC\ 2017 -\ \ \ \ Timestamp\ digest\ algorithm:\ SHA\-1 -\ \ \ \ Timestamp\ signature\ algorithm:\ SHA1withRSA,\ 2048\-bit\ key +- Signed by \[dq]CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US\[dq] + Digest algorithm: SHA-256 + Signature algorithm: SHA256withRSA, 2048-bit key + Timestamped by \[dq]CN=Symantec Time Stamping Services Signer - G4, O=Symantec Corporation, C=US\[dq] on Tue Sep 12 20:08:49 UTC 2017 + Timestamp digest algorithm: SHA-1 + Timestamp signature algorithm: SHA1withRSA, 2048-bit key -jar\ verified. +jar verified. -The\ signer\ certificate\ expired\ on\ 2018\-02\-01.\ However,\ the\ JAR\ will\ be\ valid\ until\ the\ timestamp\ expires\ on\ 2020\-12\-29. +The signer certificate expired on 2018-02-01. However, the JAR will be valid until the timestamp expires on 2020-12-29. \f[R] .fi .PP @@ -1496,4 +1446,4 @@ If the certificate for a signer isn\[aq]t an X.509 certificate, then there is no distinguished name information. In that case, just the certificate type and the alias are shown. For example, if the certificate is a PGP certificate, and the alias is -\f[CB]bob\f[R], then you would get: \f[CB]PGP,\ (bob)\f[R]. +\f[V]bob\f[R], then you would get: \f[V]PGP, (bob)\f[R]. diff --git a/src/jdk.javadoc/share/man/javadoc.1 b/src/jdk.javadoc/share/man/javadoc.1 index 252405ba2be11..5f7bc42db27e4 100644 --- a/src/jdk.javadoc/share/man/javadoc.1 +++ b/src/jdk.javadoc/share/man/javadoc.1 @@ -19,71 +19,79 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JAVADOC" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JAVADOC" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -javadoc \- generate HTML pages of API documentation from Java source +javadoc - generate HTML pages of API documentation from Java source files .SH SYNOPSIS .PP -\f[CB]javadoc\f[R] [\f[I]options\f[R]] [\f[I]packagenames\f[R]] -[\f[I]sourcefiles\f[R]] [\f[CB]\@\f[R]\f[I]files\f[R]] +\f[V]javadoc\f[R] [\f[I]options\f[R]] [\f[I]packagenames\f[R]] +[\f[I]sourcefiles\f[R]] [\f[V]\[at]\f[R]\f[I]files\f[R]] .TP -.B \f[I]options\f[R] -Specifies command\-line options, separated by spaces. -See \f[B]Standard \f[BC]javadoc\f[B] Options\f[R], \f[B]Extra -\f[BC]javadoc\f[B] Options\f[R], \f[B]Standard Options for the Standard +\f[I]options\f[R] +Specifies command-line options, separated by spaces. +See \f[B]Standard \f[VB]javadoc\f[B] Options\f[R], \f[B]Extra +\f[VB]javadoc\f[B] Options\f[R], \f[B]Standard Options for the Standard Doclet\f[R], and \f[B]Extra Options for the Standard Doclet\f[R]. -.RS -.RE .TP -.B \f[I]packagenames\f[R] +\f[I]packagenames\f[R] Specifies names of packages that you want to document, separated by -spaces, for example \f[CB]java.lang\ java.lang.reflect\ java.awt\f[R]. +spaces, for example \f[V]java.lang java.lang.reflect java.awt\f[R]. If you want to also document the subpackages, then use the -\f[CB]\-subpackages\f[R] option to specify the packages. +\f[V]-subpackages\f[R] option to specify the packages. .RS .PP -By default, \f[CB]javadoc\f[R] looks for the specified packages in the +By default, \f[V]javadoc\f[R] looks for the specified packages in the current directory and subdirectories. -Use the \f[CB]\-sourcepath\f[R] option to specify the list of directories +Use the \f[V]-sourcepath\f[R] option to specify the list of directories where to look for packages. .RE .TP -.B \f[I]sourcefiles\f[R] +\f[I]sourcefiles\f[R] Specifies names of Java source files that you want to document, separated by spaces, for example -\f[CB]Class.java\ Object.java\ Button.java\f[R]. -By default, \f[CB]javadoc\f[R] looks for the specified classes in the +\f[V]Class.java Object.java Button.java\f[R]. +By default, \f[V]javadoc\f[R] looks for the specified classes in the current directory. However, you can specify the full path to the class file and use wildcard characters, for example -\f[CB]/home/src/java/awt/Graphics*.java\f[R]. +\f[V]/home/src/java/awt/Graphics*.java\f[R]. You can also specify the path relative to the current directory. -.RS -.RE .TP -.B \f[CB]\@\f[R]\f[I]files\f[R] -Specifies names of files that contain a list of \f[CB]javadoc\f[R] tool +\f[V]\[at]\f[R]\f[I]files\f[R] +Specifies names of files that contain a list of \f[V]javadoc\f[R] tool options, package names, and source file names in any order. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]javadoc\f[R] tool parses the declarations and documentation +The \f[V]javadoc\f[R] tool parses the declarations and documentation comments in a set of Java source files and produces corresponding HTML pages that describe (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. -You can use the \f[CB]javadoc\f[R] tool to generate the API documentation +You can use the \f[V]javadoc\f[R] tool to generate the API documentation or the implementation documentation for a set of source files. .PP -You can run the \f[CB]javadoc\f[R] tool on entire packages, individual +You can run the \f[V]javadoc\f[R] tool on entire packages, individual source files, or both. -When documenting entire packages, you can use the \f[CB]\-subpackages\f[R] +When documenting entire packages, you can use the \f[V]-subpackages\f[R] option either to recursively traverse a directory and its subdirectories, or to pass in an explicit list of package names. When you document individual source files, pass in a list of Java source @@ -94,7 +102,7 @@ The Standard Doclet does not validate the content of documentation comments for conformance, nor does it attempt to correct any errors in documentation comments. Anyone running javadoc is advised to be aware of the problems that may -arise when generating non\-conformant output or output containing +arise when generating non-conformant output or output containing executable content, such as JavaScript. The Standard Doclet does provide the \f[B]DocLint\f[R] feature to help developers detect common problems in documentation comments; but it is @@ -103,130 +111,126 @@ conformance and other checking tools. .PP For more details on the conformance requirements for HTML5 documents, see \f[B]Conformance requirements\f[R] -[https://www.w3.org/TR/html5/infrastructure.html#conformance\-requirements] +[https://www.w3.org/TR/html5/infrastructure.html#conformance-requirements] in the HTML5 Specification. For more details on security issues related to web pages, see the \f[B]Open Web Application Security Project (OWASP)\f[R] [https://www.owasp.org] page. .SH OPTIONS .PP -\f[CB]javadoc\f[R] supports command\-line options for both the main -\f[CB]javadoc\f[R] tool and the currently selected doclet. +\f[V]javadoc\f[R] supports command-line options for both the main +\f[V]javadoc\f[R] tool and the currently selected doclet. The Standard Doclet is used if no other doclet is specified. .PP -GNU\-style options (that is, those beginning with \f[CB]\-\-\f[R]) can use -an equal sign (\f[CB]=\f[R]) instead of whitespace characters to separate +GNU-style options (that is, those beginning with \f[V]--\f[R]) can use +an equal sign (\f[V]=\f[R]) instead of whitespace characters to separate the name of an option from its value. -.SS Standard \f[CB]javadoc\f[R] Options +.SS Standard \f[V]javadoc\f[R] Options .PP -The following core \f[CB]javadoc\f[R] options are equivalent to -corresponding \f[CB]javac\f[R] options. +The following core \f[V]javadoc\f[R] options are equivalent to +corresponding \f[V]javac\f[R] options. See \f[I]Standard Options\f[R] in \f[B]javac\f[R] for the detailed descriptions of using these options: .IP \[bu] 2 -\f[CB]\-\-add\-modules\f[R] +\f[V]--add-modules\f[R] .IP \[bu] 2 -\f[CB]\-bootclasspath\f[R] +\f[V]-bootclasspath\f[R] .IP \[bu] 2 -\f[CB]\-\-class\-path\f[R], \f[CB]\-classpath\f[R], or \f[CB]\-cp\f[R] +\f[V]--class-path\f[R], \f[V]-classpath\f[R], or \f[V]-cp\f[R] .IP \[bu] 2 -\f[CB]\-\-enable\-preview\f[R] +\f[V]--enable-preview\f[R] .IP \[bu] 2 -\f[CB]\-encoding\f[R] +\f[V]-encoding\f[R] .IP \[bu] 2 -\f[CB]\-extdirs\f[R] +\f[V]-extdirs\f[R] .IP \[bu] 2 -\f[CB]\-\-limit\-modules\f[R] +\f[V]--limit-modules\f[R] .IP \[bu] 2 -\f[CB]\-\-module\f[R] +\f[V]--module\f[R] .IP \[bu] 2 -\f[CB]\-\-module\-path\f[R] or \f[CB]\-p\f[R] +\f[V]--module-path\f[R] or \f[V]-p\f[R] .IP \[bu] 2 -\f[CB]\-\-module\-source\-path\f[R] +\f[V]--module-source-path\f[R] .IP \[bu] 2 -\f[CB]\-\-release\f[R] +\f[V]--release\f[R] .IP \[bu] 2 -\f[CB]\-\-source\f[R] or \f[CB]\-source\f[R] +\f[V]--source\f[R] or \f[V]-source\f[R] .IP \[bu] 2 -\f[CB]\-\-source\-path\f[R] or \f[CB]\-sourcepath\f[R] +\f[V]--source-path\f[R] or \f[V]-sourcepath\f[R] .IP \[bu] 2 -\f[CB]\-\-system\f[R] +\f[V]--system\f[R] .IP \[bu] 2 -\f[CB]\-\-upgrade\-module\-path\f[R] +\f[V]--upgrade-module-path\f[R] .PP -The following options are the core \f[CB]javadoc\f[R] options that are not -equivalent to a corresponding \f[CB]javac\f[R] option: +The following options are the core \f[V]javadoc\f[R] options that are +not equivalent to a corresponding \f[V]javac\f[R] option: .TP -.B \f[CB]\-breakiterator\f[R] -Computes the first sentence with \f[CB]BreakIterator\f[R]. +\f[V]-breakiterator\f[R] +Computes the first sentence with \f[V]BreakIterator\f[R]. The first sentence is copied to the package, class, or member summary and to the alphabetic index. -The \f[CB]BreakIterator\f[R] class is used to determine the end of a +The \f[V]BreakIterator\f[R] class is used to determine the end of a sentence for all languages except for English. .RS .IP \[bu] 2 -English default sentence\-break algorithm \-\-\- Stops at a period -followed by a space or an HTML block tag, such as \f[CB]

\f[R]. +English default sentence-break algorithm --- Stops at a period followed +by a space or an HTML block tag, such as \f[V]

\f[R]. .IP \[bu] 2 -Breakiterator sentence\-break algorithm \-\-\- Stops at a period, -question mark, or exclamation point followed by a space when the next -word starts with a capital letter. -This is meant to handle most abbreviations (such as "The serial no. -is valid", but will not handle "Mr. -Smith"). -The \f[CB]\-breakiterator\f[R] option doesn\[aq]t stop at HTML tags or +Breakiterator sentence-break algorithm --- Stops at a period, question +mark, or exclamation point followed by a space when the next word starts +with a capital letter. +This is meant to handle most abbreviations (such as \[dq]The serial no. +is valid\[dq], but will not handle \[dq]Mr. +Smith\[dq]). +The \f[V]-breakiterator\f[R] option doesn\[aq]t stop at HTML tags or sentences that begin with numbers or symbols. -The algorithm stops at the last period in \f[CB]\&../filename\f[R], even +The algorithm stops at the last period in \f[V]../filename\f[R], even when embedded in an HTML tag. .RE .TP -.B \f[CB]\-doclet\f[R] \f[I]class\f[R] +\f[V]-doclet\f[R] \f[I]class\f[R] Generates output by using an alternate doclet. Use the fully qualified name. This doclet defines the content and formats the output. -If the \f[CB]\-doclet\f[R] option isn\[aq]t used, then the -\f[CB]javadoc\f[R] tool uses the standard doclet for generating the +If the \f[V]-doclet\f[R] option isn\[aq]t used, then the +\f[V]javadoc\f[R] tool uses the standard doclet for generating the default HTML format. -This class must contain the \f[CB]start(Root)\f[R] method. -The path to this starting class is defined by the \f[CB]\-docletpath\f[R] +This class must contain the \f[V]start(Root)\f[R] method. +The path to this starting class is defined by the \f[V]-docletpath\f[R] option. -.RS -.RE .TP -.B \f[CB]\-docletpath\f[R] \f[I]path\f[R] +\f[V]-docletpath\f[R] \f[I]path\f[R] Specifies where to find doclet class files (specified with the -\f[CB]\-doclet\f[R] option) and any JAR files it depends on. +\f[V]-doclet\f[R] option) and any JAR files it depends on. If the starting class file is in a JAR file, then this option specifies the path to that JAR file. You can specify an absolute path or a path relative to the current directory. -If \f[CB]classpathlist\f[R] contains multiple paths or JAR files, then -they should be separated with a colon (\f[CB]:\f[R]) on Linux and a -semi\-colon (\f[CB];\f[R]) on Windows. -This option isn\[aq]t necessary when the \f[CB]doclet\f[R] starting class +If \f[V]classpathlist\f[R] contains multiple paths or JAR files, then +they should be separated with a colon (\f[V]:\f[R]) on Linux and a +semi-colon (\f[V];\f[R]) on Windows. +This option isn\[aq]t necessary when the \f[V]doclet\f[R] starting class is already in the search path. -.RS -.RE .TP -.B \f[CB]\-exclude\f[R] \f[I]pkglist\f[R] +\f[V]-exclude\f[R] \f[I]pkglist\f[R] Unconditionally, excludes the specified packages and their subpackages -from the list formed by \f[CB]\-subpackages\f[R]. +from the list formed by \f[V]-subpackages\f[R]. It excludes those packages even when they would otherwise be included by -some earlier or later \f[CB]\-subpackages\f[R] option. +some earlier or later \f[V]-subpackages\f[R] option. .RS .PP -The following example would include \f[CB]java.io\f[R], -\f[CB]java.util\f[R], and \f[CB]java.math\f[R] (among others), but would -exclude packages rooted at \f[CB]java.net\f[R] and \f[CB]java.lang\f[R]. -Notice that these examples exclude \f[CB]java.lang.ref\f[R], which is a -subpackage of \f[CB]java.lang\f[R]. +The following example would include \f[V]java.io\f[R], +\f[V]java.util\f[R], and \f[V]java.math\f[R] (among others), but would +exclude packages rooted at \f[V]java.net\f[R] and \f[V]java.lang\f[R]. +Notice that these examples exclude \f[V]java.lang.ref\f[R], which is a +subpackage of \f[V]java.lang\f[R]. .IP \[bu] 2 \f[B]Linux and macOS:\f[R] .RS 2 .IP .nf \f[CB] -javadoc\ \-sourcepath\ /home/user/src\ \-subpackages\ java\ \-exclude\ java.net:java.lang +javadoc -sourcepath /home/user/src -subpackages java -exclude java.net:java.lang \f[R] .fi .RE @@ -236,13 +240,13 @@ javadoc\ \-sourcepath\ /home/user/src\ \-subpackages\ java\ \-exclude\ java.net: .IP .nf \f[CB] -javadoc\ \-sourcepath\ \\user\\src\ \-subpackages\ java\ \-exclude\ java.net:java.lang +javadoc -sourcepath \[rs]user\[rs]src -subpackages java -exclude java.net:java.lang \f[R] .fi .RE .RE .TP -.B \f[CB]\-\-expand\-requires\f[R] \f[I]value\f[R] +\f[V]--expand-requires\f[R] \f[I]value\f[R] Instructs the javadoc tool to expand the set of modules to be documented. By default, only the modules given explicitly on the command line are @@ -250,155 +254,137 @@ documented. Supports the following values: .RS .IP \[bu] 2 -\f[CB]transitive\f[R]: additionally includes all the required transitive +\f[V]transitive\f[R]: additionally includes all the required transitive dependencies of those modules. .IP \[bu] 2 -\f[CB]all\f[R]: includes all dependencies. +\f[V]all\f[R]: includes all dependencies. .RE .TP -.B \f[CB]\-\-help\f[R], \f[CB]\-help\f[R], \f[CB]\-h\f[R], or \f[CB]\-?\f[R] +\f[V]--help\f[R], \f[V]-help\f[R], \f[V]-h\f[R], or \f[V]-?\f[R] Prints a synopsis of the standard options. -.RS -.RE .TP -.B \f[CB]\-\-help\-extra\f[R] or \f[CB]\-X\f[R] +\f[V]--help-extra\f[R] or \f[V]-X\f[R] Prints a synopsis of the set of extra options. -.RS -.RE .TP -.B \f[CB]\-J\f[R]\f[I]flag\f[R] -Passes \f[I]flag\f[R] directly to the Java Runtime Environment (JRE) that -runs the \f[CB]javadoc\f[R] tool. +\f[V]-J\f[R]\f[I]flag\f[R] +Passes \f[I]flag\f[R] directly to the Java Runtime Environment (JRE) +that runs the \f[V]javadoc\f[R] tool. For example, if you must ensure that the system sets aside 32 MB of memory in which to process the generated documentation, then you would -call the \f[CB]\-Xmx\f[R] option as follows: -\f[CB]javadoc\ \-J\-Xmx32m\ \-J\-Xms32m\ com.mypackage\f[R]. -Be aware that \f[CB]\-Xms\f[R] is optional because it only sets the size +call the \f[V]-Xmx\f[R] option as follows: +\f[V]javadoc -J-Xmx32m -J-Xms32m com.mypackage\f[R]. +Be aware that \f[V]-Xms\f[R] is optional because it only sets the size of initial memory, which is useful when you know the minimum amount of memory required. .RS .PP -There is no space between the \f[CB]J\f[R] and the \f[CB]flag\f[R]. +There is no space between the \f[V]J\f[R] and the \f[V]flag\f[R]. .PP -Use the \f[CB]\-version\f[R] option to report the version of the JRE being -used to run the \f[CB]javadoc\f[R] tool. +Use the \f[V]-version\f[R] option to report the version of the JRE being +used to run the \f[V]javadoc\f[R] tool. .IP .nf \f[CB] -javadoc\ \-J\-version -java\ version\ "17"\ 2021\-09\-14\ LTS -Java(TM)\ SE\ Runtime\ Environment\ (build\ 17+35\-LTS\-2724) -Java\ HotSpot(TM)\ 64\-Bit\ Server\ VM\ (build\ 17+35\-LTS\-2724,\ mixed\ mode,\ sharing) +javadoc -J-version +java version \[dq]17\[dq] 2021-09-14 LTS +Java(TM) SE Runtime Environment (build 17+35-LTS-2724) +Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing) \f[R] .fi .RE .TP -.B \f[CB]\-locale\f[R] \f[I]name\f[R] -Specifies the locale that the \f[CB]javadoc\f[R] tool uses when it +\f[V]-locale\f[R] \f[I]name\f[R] +Specifies the locale that the \f[V]javadoc\f[R] tool uses when it generates documentation. The argument is the name of the locale, as described in -\f[CB]java.util.Locale\f[R] documentation, such as \f[CB]en_US\f[R] -(English, United States) or \f[CB]en_US_WIN\f[R] (Windows variant). +\f[V]java.util.Locale\f[R] documentation, such as \f[V]en_US\f[R] +(English, United States) or \f[V]en_US_WIN\f[R] (Windows variant). .RS .PP -Specifying a locale causes the \f[CB]javadoc\f[R] tool to choose the +Specifying a locale causes the \f[V]javadoc\f[R] tool to choose the resource files of that locale for messages such as strings in the navigation bar, headings for lists and tables, help file contents, -comments in the \f[CB]stylesheet.css\f[R] file, and so on. +comments in the \f[V]stylesheet.css\f[R] file, and so on. It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. -The \f[CB]\-locale\f[R] option doesn\[aq]t determine the locale of the +The \f[V]-locale\f[R] option doesn\[aq]t determine the locale of the documentation comment text specified in the source files of the documented classes. .RE .TP -.B \f[CB]\-package\f[R] +\f[V]-package\f[R] Shows only package, protected, and public classes and members. -.RS -.RE .TP -.B \f[CB]\-private\f[R] +\f[V]-private\f[R] Shows all classes and members. -.RS -.RE .TP -.B \f[CB]\-protected\f[R] +\f[V]-protected\f[R] Shows only protected and public classes and members. This is the default. -.RS -.RE .TP -.B \f[CB]\-public\f[R] +\f[V]-public\f[R] Shows only the public classes and members. -.RS -.RE .TP -.B \f[CB]\-quiet\f[R] +\f[V]-quiet\f[R] Shuts off messages so that only the warnings and errors appear to make them easier to view. -It also suppresses the \f[CB]version\f[R] string. -.RS -.RE +It also suppresses the \f[V]version\f[R] string. .TP -.B \f[CB]\-\-show\-members\f[R] \f[I]value\f[R] +\f[V]--show-members\f[R] \f[I]value\f[R] Specifies which members (fields or methods) are documented, where \f[I]value\f[R] can be any of the following: .RS .IP \[bu] 2 -\f[CB]public\f[R] \-\-\- shows only public members +\f[V]public\f[R] --- shows only public members .IP \[bu] 2 -\f[CB]protected\f[R] \-\-\- shows public and protected members; this is -the default +\f[V]protected\f[R] --- shows public and protected members; this is the +default .IP \[bu] 2 -\f[CB]package\f[R] \-\-\- shows public, protected, and package members +\f[V]package\f[R] --- shows public, protected, and package members .IP \[bu] 2 -\f[CB]private\f[R] \-\-\- shows all members +\f[V]private\f[R] --- shows all members .RE .TP -.B \f[CB]\-\-show\-module\-contents\f[R] \f[I]value\f[R] +\f[V]--show-module-contents\f[R] \f[I]value\f[R] Specifies the documentation granularity of module declarations, where -\f[I]value\f[R] can be \f[CB]api\f[R] or \f[CB]all\f[R]. -.RS -.RE +\f[I]value\f[R] can be \f[V]api\f[R] or \f[V]all\f[R]. .TP -.B \f[CB]\-\-show\-packages\f[R] \f[I]value\f[R] +\f[V]--show-packages\f[R] \f[I]value\f[R] Specifies which modules packages are documented, where \f[I]value\f[R] -can be \f[CB]exported\f[R] or \f[CB]all\f[R] packages. -.RS -.RE +can be \f[V]exported\f[R] or \f[V]all\f[R] packages. .TP -.B \f[CB]\-\-show\-types\f[R] \f[I]value\f[R] -Specifies which types (classes, interfaces, etc.) are documented, where -\f[I]value\f[R] can be any of the following: +\f[V]--show-types\f[R] \f[I]value\f[R] +Specifies which types (classes, interfaces, etc.) +are documented, where \f[I]value\f[R] can be any of the following: .RS .IP \[bu] 2 -\f[CB]public\f[R] \-\-\- shows only public types +\f[V]public\f[R] --- shows only public types .IP \[bu] 2 -\f[CB]protected\f[R] \-\-\- shows public and protected types; this is the +\f[V]protected\f[R] --- shows public and protected types; this is the default .IP \[bu] 2 -\f[CB]package\f[R] \-\-\- shows public, protected, and package types +\f[V]package\f[R] --- shows public, protected, and package types .IP \[bu] 2 -\f[CB]private\f[R] \-\-\- shows all types +\f[V]private\f[R] --- shows all types .RE .TP -.B \f[CB]\-subpackages\f[R] \f[I]subpkglist\f[R] +\f[V]-subpackages\f[R] \f[I]subpkglist\f[R] Generates documentation from source files in the specified packages and recursively in their subpackages. This option is useful when adding new subpackages to the source code because they are automatically included. -Each package argument is any top\-level subpackage (such as -\f[CB]java\f[R]) or fully qualified package (such as \f[CB]javax.swing\f[R]) -that doesn\[aq]t need to contain source files. +Each package argument is any top-level subpackage (such as +\f[V]java\f[R]) or fully qualified package (such as +\f[V]javax.swing\f[R]) that doesn\[aq]t need to contain source files. Arguments are separated by colons on all operating systems. Wild cards aren\[aq]t allowed. -Use \f[CB]\-sourcepath\f[R] to specify where to find the packages. +Use \f[V]-sourcepath\f[R] to specify where to find the packages. This option doesn\[aq]t process source files that are in the source tree but don\[aq]t belong to the packages. .RS .PP For example, the following commands generates documentation for packages -named \f[CB]java\f[R] and \f[CB]javax.swing\f[R] and all of their +named \f[V]java\f[R] and \f[V]javax.swing\f[R] and all of their subpackages. .IP \[bu] 2 \f[B]Linux and macOS:\f[R] @@ -406,7 +392,7 @@ subpackages. .IP .nf \f[CB] -javadoc\ \-d\ docs\ \-sourcepath\ /home/user/src\ \-subpackages\ java:javax.swing +javadoc -d docs -sourcepath /home/user/src -subpackages java:javax.swing \f[R] .fi .RE @@ -416,116 +402,104 @@ javadoc\ \-d\ docs\ \-sourcepath\ /home/user/src\ \-subpackages\ java:javax.swin .IP .nf \f[CB] -javadoc\ \-d\ docs\ \-sourcepath\ \\user\\src\ \-subpackages\ java:javax.swing +javadoc -d docs -sourcepath \[rs]user\[rs]src -subpackages java:javax.swing \f[R] .fi .RE .RE .TP -.B \f[CB]\-verbose\f[R] -Provides more detailed messages while the \f[CB]javadoc\f[R] tool runs. -Without the \f[CB]\-verbose\f[R] option, messages appear for loading the +\f[V]-verbose\f[R] +Provides more detailed messages while the \f[V]javadoc\f[R] tool runs. +Without the \f[V]-verbose\f[R] option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. -The \f[CB]\-verbose\f[R] option causes the printing of additional messages +The \f[V]-verbose\f[R] option causes the printing of additional messages that specify the number of milliseconds to parse each Java source file. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Prints version information. -.RS -.RE .TP -.B \f[CB]\-Werror\f[R] +\f[V]-Werror\f[R] Reports an error if any warnings occur. -.RS -.RE -.SS Extra \f[CB]javadoc\f[R] Options +.SS Extra \f[V]javadoc\f[R] Options .PP -\f[I]Note:\f[R] The additional options for \f[CB]javadoc\f[R] are subject +\f[I]Note:\f[R] The additional options for \f[V]javadoc\f[R] are subject to change without notice. .PP -The following additional \f[CB]javadoc\f[R] options are equivalent to -corresponding \f[CB]javac\f[R] options. +The following additional \f[V]javadoc\f[R] options are equivalent to +corresponding \f[V]javac\f[R] options. See \f[I]Extra Options\f[R] in \f[B]javac\f[R] for the detailed descriptions of using these options: .IP \[bu] 2 -\f[CB]\-\-add\-exports\f[R] +\f[V]--add-exports\f[R] .IP \[bu] 2 -\f[CB]\-\-add\-reads\f[R] +\f[V]--add-reads\f[R] .IP \[bu] 2 -\f[CB]\-\-patch\-module\f[R] +\f[V]--patch-module\f[R] .IP \[bu] 2 -\f[CB]\-Xmaxerrs\f[R] +\f[V]-Xmaxerrs\f[R] .IP \[bu] 2 -\f[CB]\-Xmaxwarns\f[R] +\f[V]-Xmaxwarns\f[R] .SS Standard Options for the Standard Doclet .PP The following options are provided by the standard doclet. .TP -.B \f[CB]\-\-add\-script\f[R] \f[I]file\f[R] +\f[V]--add-script\f[R] \f[I]file\f[R] Adds \f[I]file\f[R] as an additional JavaScript file to the generated documentation. This option can be used one or more times to specify additional script files. .RS .PP -Command\-line example: +Command-line example: .RS .PP -\f[CB]javadoc\ \-\-add\-script\ first_script.js\ \-\-add\-script\ second_script.js\ pkg_foo\f[R] +\f[V]javadoc --add-script first_script.js --add-script second_script.js pkg_foo\f[R] .RE .RE .TP -.B \f[CB]\-\-add\-stylesheet\f[R] \f[I]file\f[R] +\f[V]--add-stylesheet\f[R] \f[I]file\f[R] Adds \f[I]file\f[R] as an additional stylesheet file to the generated documentation. This option can be used one or more times to specify additional stylesheets included in the documentation. .RS .PP -Command\-line example: +Command-line example: .IP .nf \f[CB] -javadoc\ \-\-add\-stylesheet\ new_stylesheet_1.css\ \-\-add\-stylesheet\ new_stylesheet_2.css\ pkg_foo +javadoc --add-stylesheet new_stylesheet_1.css --add-stylesheet new_stylesheet_2.css pkg_foo \f[R] .fi .RE .TP -.B \f[CB]\-\-allow\-script\-in\-comments\f[R] +\f[V]--allow-script-in-comments\f[R] Allow JavaScript in options and comments. -.RS -.RE .TP -.B \f[CB]\-author\f[R] -Includes the \f[CB]\@author\f[R] text in the generated docs. -.RS -.RE +\f[V]-author\f[R] +Includes the \f[V]\[at]author\f[R] text in the generated docs. .TP -.B \f[CB]\-bottom\f[R] \f[I]html\-code\f[R] +\f[V]-bottom\f[R] \f[I]html-code\f[R] Specifies the text to be placed at the bottom of each output file. The text is placed at the bottom of the page, underneath the lower navigation bar. The text can contain HTML tags and white space, but when it does, the text must be enclosed in quotation marks. Use escape characters for any internal quotation marks within text. -.RS -.RE .TP -.B \f[CB]\-charset\f[R] \f[I]name\f[R] +\f[V]-charset\f[R] \f[I]name\f[R] Specifies the HTML character set for this document. The name should be a preferred MIME name as specified in the \f[B]IANA Registry, Character Sets\f[R] -[http://www.iana.org/assignments/character\-sets]. +[http://www.iana.org/assignments/character-sets]. .RS .PP For example: .IP .nf \f[CB] -javadoc\ \-charset\ "iso\-8859\-1"\ mypackage +javadoc -charset \[dq]iso-8859-1\[dq] mypackage \f[R] .fi .PP @@ -534,63 +508,63 @@ page: .IP .nf \f[CB] - + \f[R] .fi .PP -The \f[CB]meta\f[R] tag is described in the \f[B]HTML standard (4197265 +The \f[V]meta\f[R] tag is described in the \f[B]HTML standard (4197265 and 4137321), HTML Document Representation\f[R] -[http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2]. +[http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2]. .RE .TP -.B \f[CB]\-d\f[R] \f[I]directory\f[R] -Specifies the destination directory where the \f[CB]javadoc\f[R] tool +\f[V]-d\f[R] \f[I]directory\f[R] +Specifies the destination directory where the \f[V]javadoc\f[R] tool saves the generated HTML files. -If you omit the \f[CB]\-d\f[R] option, then the files are saved to the +If you omit the \f[V]-d\f[R] option, then the files are saved to the current directory. -The \f[CB]directory\f[R] value can be absolute or relative to the current +The \f[V]directory\f[R] value can be absolute or relative to the current working directory. The destination directory is automatically created when the -\f[CB]javadoc\f[R] tool runs. +\f[V]javadoc\f[R] tool runs. .RS .IP \[bu] 2 \f[B]Linux and macOS:\f[R] For example, the following command generates -the documentation for the package \f[CB]com.mypackage\f[R] and saves the -results in the \f[CB]/user/doc/\f[R] directory: +the documentation for the package \f[V]com.mypackage\f[R] and saves the +results in the \f[V]/user/doc/\f[R] directory: .RS 2 .IP .nf \f[CB] -javadoc\ \-d\ /user/doc/\ com.mypackage +javadoc -d /user/doc/ com.mypackage \f[R] .fi .RE .IP \[bu] 2 \f[B]Windows:\f[R] For example, the following command generates the -documentation for the package \f[CB]com.mypackage\f[R] and saves the -results in the \f[CB]\\user\\doc\\\f[R] directory: +documentation for the package \f[V]com.mypackage\f[R] and saves the +results in the \f[V]\[rs]user\[rs]doc\[rs]\f[R] directory: .RS 2 .IP .nf \f[CB] -javadoc\ \-d\ \\user\\doc\\\ com.mypackage +javadoc -d \[rs]user\[rs]doc\[rs] com.mypackage \f[R] .fi .RE .RE .TP -.B \f[CB]\-docencoding\f[R] \f[I]name\f[R] +\f[V]-docencoding\f[R] \f[I]name\f[R] Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as specified in the \f[B]IANA Registry, Character Sets\f[R] -[http://www.iana.org/assignments/character\-sets]. +[http://www.iana.org/assignments/character-sets]. .RS .PP -Three options are available for use in a \f[CB]javadoc\f[R] encoding +Three options are available for use in a \f[V]javadoc\f[R] encoding command. -The \f[CB]\-encoding\f[R] option is used for encoding the files read by -the \f[CB]javadoc\f[R] tool, while the \f[CB]\-docencoding\f[R] and -\f[CB]\-charset\f[R] options are used for encoding the files written by +The \f[V]-encoding\f[R] option is used for encoding the files read by +the \f[V]javadoc\f[R] tool, while the \f[V]-docencoding\f[R] and +\f[V]-charset\f[R] options are used for encoding the files written by the tool. Of the three available options, at most, only the input and an output encoding option are used in a single encoding command. @@ -602,85 +576,73 @@ For example: .IP .nf \f[CB] -javadoc\ \-docencoding\ "iso\-8859\-1"\ mypackage +javadoc -docencoding \[dq]iso-8859-1\[dq] mypackage \f[R] .fi .RE .TP -.B \f[CB]\-docfilessubdirs\f[R] -Recursively copies doc\-file subdirectories. -Enables deep copying of doc\-files directories. +\f[V]-docfilessubdirs\f[R] +Recursively copies doc-file subdirectories. +Enables deep copying of doc-files directories. Subdirectories and all contents are recursively copied to the destination. -For example, the directory \f[CB]doc\-files/example/images\f[R] and all of +For example, the directory \f[V]doc-files/example/images\f[R] and all of its contents are copied. -The \f[B]\f[BC]\-excludedocfilessubdir\f[B]\f[R] option can be used to +The \f[B]\f[VB]-excludedocfilessubdir\f[B]\f[R] option can be used to exclude specific subdirectories. -.RS -.RE .TP -.B \f[CB]\-doctitle\f[R] \f[I]html\-code\f[R] +\f[V]-doctitle\f[R] \f[I]html-code\f[R] Specifies the title to place near the top of the overview summary file. -The text specified in the \f[CB]title\f[R] tag is placed as a centered, -level\-one heading directly beneath the top navigation bar. -The \f[CB]title\f[R] tag can contain HTML tags and white space, but when +The text specified in the \f[V]title\f[R] tag is placed as a centered, +level-one heading directly beneath the top navigation bar. +The \f[V]title\f[R] tag can contain HTML tags and white space, but when it does, you must enclose the title in quotation marks. -Additional quotation marks within the \f[CB]title\f[R] tag must be +Additional quotation marks within the \f[V]title\f[R] tag must be escaped. For example, -\f[CB]javadoc\ \-doctitle\ "My\ Library
v1.0"\ com.mypackage\f[R]. -.RS -.RE +\f[V]javadoc -doctitle \[dq]My Library
v1.0\[dq] com.mypackage\f[R]. .TP -.B \f[CB]\-excludedocfilessubdir\f[R] \f[I]name1\f[R]\f[CB],\f[R]\f[I]name2...\f[R] +\f[V]-excludedocfilessubdir\f[R] \f[I]name1\f[R]\f[V],\f[R]\f[I]name2...\f[R] Excludes any subdirectories with the given names when recursively -copying doc\-file subdirectories. -See \f[B]\f[BC]\-docfilessubdirs\f[B]\f[R]. -For historical reasons, \f[CB]:\f[R] can be used anywhere in the argument -as a separator instead of \f[CB],\f[R]. -.RS -.RE +copying doc-file subdirectories. +See \f[B]\f[VB]-docfilessubdirs\f[B]\f[R]. +For historical reasons, \f[V]:\f[R] can be used anywhere in the argument +as a separator instead of \f[V],\f[R]. .TP -.B \f[CB]\-footer\f[R] \f[I]html\-code\f[R] +\f[V]-footer\f[R] \f[I]html-code\f[R] Specifies the footer text to be placed at the bottom of each output file. -The\f[CB]html\-code\f[R] value is placed to the right of the lower +The\f[V]html-code\f[R] value is placed to the right of the lower navigation bar. -The \f[CB]html\-code\f[R] value can contain HTML tags and white space, but -when it does, the \f[CB]html\-code\f[R] value must be enclosed in +The \f[V]html-code\f[R] value can contain HTML tags and white space, but +when it does, the \f[V]html-code\f[R] value must be enclosed in quotation marks. Use escape characters for any internal quotation marks within a footer. -.RS -.RE .TP -.B \f[CB]\-group\f[R] \f[I]name\f[R] \f[I]p1\f[R]\f[CB],\f[R]\f[I]p2...\f[R] +\f[V]-group\f[R] \f[I]name\f[R] \f[I]p1\f[R]\f[V],\f[R]\f[I]p2...\f[R] Group the specified packages together in the Overview page. -For historical reasons, \f[CB]:\f[R] can be used as a separator anywhere -in the argument instead of \f[CB],\f[R]. -.RS -.RE +For historical reasons, \f[V]:\f[R] can be used as a separator anywhere +in the argument instead of \f[V],\f[R]. .TP -.B \f[CB]\-header\f[R] \f[I]html\-code\f[R] +\f[V]-header\f[R] \f[I]html-code\f[R] Specifies the header text to be placed at the top of each output file. The header is placed to the right of the upper navigation bar. -The \f[CB]header\f[R] can contain HTML tags and white space, but when it -does, the \f[CB]header\f[R] must be enclosed in quotation marks. +The \f[V]header\f[R] can contain HTML tags and white space, but when it +does, the \f[V]header\f[R] must be enclosed in quotation marks. Use escape characters for internal quotation marks within a header. For example, -\f[CB]javadoc\ \-header\ "My\ Library
v1.0"\ com.mypackage\f[R]. -.RS -.RE +\f[V]javadoc -header \[dq]My Library
v1.0\[dq] com.mypackage\f[R]. .TP -.B \f[CB]\-helpfile\f[R] \f[I]filename\f[R] +\f[V]-helpfile\f[R] \f[I]filename\f[R] Includes the file that links to the \f[B]HELP\f[R] link in the top and bottom navigation bars . -Without this option, the \f[CB]javadoc\f[R] tool creates a help file -\f[CB]help\-doc.html\f[R] that is hard\-coded in the \f[CB]javadoc\f[R] +Without this option, the \f[V]javadoc\f[R] tool creates a help file +\f[V]help-doc.html\f[R] that is hard-coded in the \f[V]javadoc\f[R] tool. This option lets you override the default. The \f[I]filename\f[R] can be any name and isn\[aq]t restricted to -\f[CB]help\-doc.html\f[R]. -The \f[CB]javadoc\f[R] tool adjusts the links in the navigation bar +\f[V]help-doc.html\f[R]. +The \f[V]javadoc\f[R] tool adjusts the links in the navigation bar accordingly. For example: .RS @@ -690,7 +652,7 @@ For example: .IP .nf \f[CB] -javadoc\ \-helpfile\ /home/user/myhelp.html\ java.awt +javadoc -helpfile /home/user/myhelp.html java.awt \f[R] .fi .RE @@ -700,81 +662,76 @@ javadoc\ \-helpfile\ /home/user/myhelp.html\ java.awt .IP .nf \f[CB] -javadoc\ \-helpfile\ C:\\user\\myhelp.html\ java.awt +javadoc -helpfile C:\[rs]user\[rs]myhelp.html java.awt \f[R] .fi .RE .RE .TP -.B \f[CB]\-html5\f[R] -This option is a no\-op and is just retained for backwards -compatibility. -.RS -.RE +\f[V]-html5\f[R] +This option is a no-op and is just retained for backwards compatibility. .TP -.B \f[CB]\-\-javafx\f[R] or \f[CB]\-javafx\f[R] +\f[V]--javafx\f[R] or \f[V]-javafx\f[R] Enables JavaFX functionality. This option is enabled by default if the JavaFX library classes are detected on the module path. -.RS -.RE .TP -.B \f[CB]\-keywords\f[R] -Adds HTML keyword \f[CB]\f[R] tags to the generated file for each +\f[V]-keywords\f[R] +Adds HTML keyword \f[V]\f[R] tags to the generated file for each class. -These tags can help search engines that look for \f[CB]\f[R] tags +These tags can help search engines that look for \f[V]\f[R] tags find the pages. Most search engines that search the entire Internet don\[aq]t look at -\f[CB]\f[R] tags, because pages can misuse them. +\f[V]\f[R] tags, because pages can misuse them. Search engines offered by companies that confine their searches to their -own website can benefit by looking at \f[CB]\f[R] tags. -The \f[CB]\f[R] tags include the fully qualified name of the class +own website can benefit by looking at \f[V]\f[R] tags. +The \f[V]\f[R] tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors aren\[aq]t included because they are identical to the class name. -For example, the class \f[CB]String\f[R] starts with these keywords: +For example, the class \f[V]String\f[R] starts with these keywords: .RS .IP .nf \f[CB] - - - - + + + + \f[R] .fi .RE .TP -.B \f[CB]\-link\f[R] \f[I]url\f[R] -Creates links to existing \f[CB]javadoc\f[R] generated documentation of +\f[V]-link\f[R] \f[I]url\f[R] +Creates links to existing \f[V]javadoc\f[R] generated documentation of externally referenced classes. The \f[I]url\f[R] argument is the absolute or relative URL of the -directory that contains the external \f[CB]javadoc\f[R] generated +directory that contains the external \f[V]javadoc\f[R] generated documentation. -You can specify multiple \f[CB]\-link\f[R] options in a specified -\f[CB]javadoc\f[R] tool run to link to multiple documents. +You can specify multiple \f[V]-link\f[R] options in a specified +\f[V]javadoc\f[R] tool run to link to multiple documents. .RS .PP -Either a \f[CB]package\-list\f[R] or an \f[CB]element\-list\f[R] file must +Either a \f[V]package-list\f[R] or an \f[V]element-list\f[R] file must be in this \f[I]url\f[R] directory (otherwise, use the -\f[CB]\-linkoffline\f[R] option). +\f[V]-linkoffline\f[R] option). .PP -\f[I]Note:\f[R] The \f[CB]package\-list\f[R] and \f[CB]element\-list\f[R] -files are generated by the \f[CB]javadoc\f[R] tool when generating the API -documentation and should not be modified by the user. +\f[I]Note:\f[R] The \f[V]package-list\f[R] and \f[V]element-list\f[R] +files are generated by the \f[V]javadoc\f[R] tool when generating the +API documentation and should not be modified by the user. .PP -When you use the \f[CB]javadoc\f[R] tool to document packages, it uses the -\f[CB]package\-list\f[R] file to determine the packages declared in an +When you use the \f[V]javadoc\f[R] tool to document packages, it uses +the \f[V]package-list\f[R] file to determine the packages declared in an API. -When you generate API documents for modules, the \f[CB]javadoc\f[R] tool -uses the \f[CB]element\-list\f[R] file to determine the modules and +When you generate API documents for modules, the \f[V]javadoc\f[R] tool +uses the \f[V]element-list\f[R] file to determine the modules and packages declared in an API. .PP -The \f[CB]javadoc\f[R] tool reads the names from the appropriate list file -and then links to the packages or modules at that URL. +The \f[V]javadoc\f[R] tool reads the names from the appropriate list +file and then links to the packages or modules at that URL. .PP -When the \f[CB]javadoc\f[R] tool runs, the \f[I]url\f[R] value is copied -into the \f[CB]\f[R] links that are created. +When the \f[V]javadoc\f[R] tool runs, the \f[I]url\f[R] value is copied +into the \f[V]\f[R] links that are created. Therefore, \f[I]url\f[R] must be the URL to the directory and not to a file. .PP @@ -783,7 +740,7 @@ to link to a document on any web site, or you can use a relative link to link only to a relative location. If you use a relative link, then the value you pass in should be the relative path from the destination directory (specified with the -\f[CB]\-d\f[R] option) to the directory containing the packages being +\f[V]-d\f[R] option) to the directory containing the packages being linked to. When you specify an absolute link, you usually use an HTTP link. However, if you want to link to a file system that has no web server, @@ -791,87 +748,86 @@ then you can use a file link. Use a file link only when everyone who wants to access the generated documentation shares the same file system. In all cases, and on all operating systems, use a slash as the -separator, whether the URL is absolute or relative, and \f[CB]https:\f[R], -\f[CB]http:\f[R], or \f[CB]file:\f[R] as specified in the \f[B]URL Memo: -Uniform Resource Locators\f[R] [http://www.ietf.org/rfc/rfc1738.txt]. +separator, whether the URL is absolute or relative, and +\f[V]https:\f[R], \f[V]http:\f[R], or \f[V]file:\f[R] as specified in +the \f[B]URL Memo: Uniform Resource Locators\f[R] +[http://www.ietf.org/rfc/rfc1738.txt]. .IP .nf \f[CB] -\-link\ https://///.../ -\-link\ http://///.../ -\-link\ file://///.../ -\-link\ //.../ +-link https://///.../ +-link http://///.../ +-link file://///.../ +-link //.../ \f[R] .fi .RE .TP -.B \f[CB]\-\-link\-modularity\-mismatch\f[R] (\f[CB]warn\f[R]|\f[CB]info\f[R]) +\f[V]--link-modularity-mismatch\f[R] (\f[V]warn\f[R]|\f[V]info\f[R]) Specifies whether external documentation with wrong modularity (e.g. -non\-modular documentation for a modular library, or the reverse case) -should be reported as a warning (\f[CB]warn\f[R]) or just a message -(\f[CB]info\f[R]). +non-modular documentation for a modular library, or the reverse case) +should be reported as a warning (\f[V]warn\f[R]) or just a message +(\f[V]info\f[R]). The default behavior is to report a warning. -.RS -.RE .TP -.B \f[CB]\-linkoffline\f[R] \f[I]url1\f[R] \f[I]url2\f[R] -This option is a variation of the \f[CB]\-link\f[R] option. -They both create links to \f[CB]javadoc\f[R] generated documentation for +\f[V]-linkoffline\f[R] \f[I]url1\f[R] \f[I]url2\f[R] +This option is a variation of the \f[V]-link\f[R] option. +They both create links to \f[V]javadoc\f[R] generated documentation for externally referenced classes. -You can specify multiple \f[CB]\-linkoffline\f[R] options in a specified -\f[CB]javadoc\f[R] tool run. +You can specify multiple \f[V]-linkoffline\f[R] options in a specified +\f[V]javadoc\f[R] tool run. .RS .PP -Use the \f[CB]\-linkoffline\f[R] option when: +Use the \f[V]-linkoffline\f[R] option when: .IP \[bu] 2 -Linking to a document on the web that the \f[CB]javadoc\f[R] tool +Linking to a document on the web that the \f[V]javadoc\f[R] tool can\[aq]t access through a web connection .IP \[bu] 2 -The \f[CB]package\-list\f[R] or \f[CB]element\-list\f[R] file of the +The \f[V]package-list\f[R] or \f[V]element-list\f[R] file of the external document either isn\[aq]t accessible or doesn\[aq]t exist at the URL location, but does exist at a different location and can be -specified by either the \f[CB]package\-list\f[R] or \f[CB]element\-list\f[R] +specified by either the \f[V]package-list\f[R] or \f[V]element-list\f[R] file (typically local). .PP -\f[I]Note:\f[R] The \f[CB]package\-list\f[R] and \f[CB]element\-list\f[R] -files are generated by the \f[CB]javadoc\f[R] tool when generating the API -documentation and should not be modified by the user. +\f[I]Note:\f[R] The \f[V]package-list\f[R] and \f[V]element-list\f[R] +files are generated by the \f[V]javadoc\f[R] tool when generating the +API documentation and should not be modified by the user. .PP If \f[I]url1\f[R] is accessible only on the World Wide Web, then the -\f[CB]\-linkoffline\f[R] option removes the constraint that the -\f[CB]javadoc\f[R] tool must have a web connection to generate +\f[V]-linkoffline\f[R] option removes the constraint that the +\f[V]javadoc\f[R] tool must have a web connection to generate documentation. .PP -Another use of the \f[CB]\-linkoffline\f[R] option is as a work\-around to +Another use of the \f[V]-linkoffline\f[R] option is as a work-around to update documents. -After you have run the \f[CB]javadoc\f[R] tool on a full set of packages -or modules, you can run the \f[CB]javadoc\f[R] tool again on a smaller set -of changed packages or modules, so that the updated files can be +After you have run the \f[V]javadoc\f[R] tool on a full set of packages +or modules, you can run the \f[V]javadoc\f[R] tool again on a smaller +set of changed packages or modules, so that the updated files can be inserted back into the original set. .PP -For example, the \f[CB]\-linkoffline\f[R] option takes two arguments. -The first is for the string to be embedded in the \f[CB]\f[R] -links, and the second tells the \f[CB]javadoc\f[R] tool where to find -either the \f[CB]package\-list\f[R] or \f[CB]element\-list\f[R] file. +For example, the \f[V]-linkoffline\f[R] option takes two arguments. +The first is for the string to be embedded in the \f[V]\f[R] +links, and the second tells the \f[V]javadoc\f[R] tool where to find +either the \f[V]package-list\f[R] or \f[V]element-list\f[R] file. .PP -The \f[I]url1\f[R] or \f[I]url2\f[R] value is the absolute or relative URL -of the directory that contains the external \f[CB]javadoc\f[R] generated -documentation that you want to link to. +The \f[I]url1\f[R] or \f[I]url2\f[R] value is the absolute or relative +URL of the directory that contains the external \f[V]javadoc\f[R] +generated documentation that you want to link to. When relative, the value should be the relative path from the -destination directory (specified with the \f[CB]\-d\f[R] option) to the +destination directory (specified with the \f[V]-d\f[R] option) to the root of the packages being linked to. -See \f[I]url\f[R] in the \f[CB]\-link\f[R] option. +See \f[I]url\f[R] in the \f[V]-link\f[R] option. .RE .TP -.B \f[CB]\-\-link\-platform\-properties\f[R] \f[I]url\f[R] +\f[V]--link-platform-properties\f[R] \f[I]url\f[R] Specifies a properties file used to configure links to platform documentation. .RS .PP The \f[I]url\f[R] argument is expected to point to a properties file containing one or more entries with the following format, where -\f[CB]\f[R] is the platform version as passed to the -\f[CB]\-\-release\f[R] or \f[CB]\-\-source\f[R] option and \f[CB]\f[R] is +\f[V]\f[R] is the platform version as passed to the +\f[V]--release\f[R] or \f[V]--source\f[R] option and \f[V]\f[R] is the base URL of the corresponding platform API documentation: .IP .nf @@ -895,7 +851,7 @@ If the properties file does not contain an entry for a particular release no platform links are generated. .RE .TP -.B \f[CB]\-linksource\f[R] +\f[V]-linksource\f[R] Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation. Links are created for classes, interfaces, constructors, methods, and @@ -906,279 +862,248 @@ and generated classes. .PP This option exposes all private implementation details in the included source files, including private classes, private fields, and the bodies -of private methods, regardless of the \f[CB]\-public\f[R], -\f[CB]\-package\f[R], \f[CB]\-protected\f[R], and \f[CB]\-private\f[R] +of private methods, regardless of the \f[V]-public\f[R], +\f[V]-package\f[R], \f[V]-protected\f[R], and \f[V]-private\f[R] options. -Unless you also use the \f[CB]\-private\f[R] option, not all private +Unless you also use the \f[V]-private\f[R] option, not all private classes or interfaces are accessible through links. .PP Each link appears on the name of the identifier in its declaration. -For example, the link to the source code of the \f[CB]Button\f[R] class -would be on the word \f[CB]Button\f[R]: +For example, the link to the source code of the \f[V]Button\f[R] class +would be on the word \f[V]Button\f[R]: .IP .nf \f[CB] -public\ class\ Button\ extends\ Component\ implements\ Accessible +public class Button extends Component implements Accessible \f[R] .fi .PP -The link to the source code of the \f[CB]getLabel\f[R] method in the -\f[CB]Button\f[R] class is on the word \f[CB]getLabel\f[R]: +The link to the source code of the \f[V]getLabel\f[R] method in the +\f[V]Button\f[R] class is on the word \f[V]getLabel\f[R]: .IP .nf \f[CB] -public\ String\ getLabel() +public String getLabel() \f[R] .fi .RE .TP -.B \f[CB]\-\-main\-stylesheet\f[R] \f[I]file\f[R] or \f[CB]\-stylesheetfile\f[R] \f[I]file\f[R] +\f[V]--main-stylesheet\f[R] \f[I]file\f[R] or \f[V]-stylesheetfile\f[R] \f[I]file\f[R] Specifies the path of an alternate stylesheet file that contains the definitions for the CSS styles used in the generated documentation. This option lets you override the default. -If you do not specify the option, the \f[CB]javadoc\f[R] tool will create +If you do not specify the option, the \f[V]javadoc\f[R] tool will create and use a default stylesheet. The file name can be any name and isn\[aq]t restricted to -\f[CB]stylesheet.css\f[R]. -The \f[CB]\-\-main\-stylesheet\f[R] option is the preferred form. +\f[V]stylesheet.css\f[R]. +The \f[V]--main-stylesheet\f[R] option is the preferred form. .RS .PP -Command\-line example: +Command-line example: .IP .nf \f[CB] -javadoc\ \-\-main\-stylesheet\ main_stylesheet.css\ pkg_foo +javadoc --main-stylesheet main_stylesheet.css pkg_foo \f[R] .fi .RE .TP -.B \f[CB]\-nocomment\f[R] +\f[V]-nocomment\f[R] Suppresses the entire comment body, including the main description and all tags, and generate only declarations. This option lets you reuse source files that were originally intended for a different purpose so that you can produce skeleton HTML documentation during the early stages of a new project. -.RS -.RE .TP -.B \f[CB]\-nodeprecated\f[R] +\f[V]-nodeprecated\f[R] Prevents the generation of any deprecated API in the documentation. -This does what the \f[CB]\-nodeprecatedlist\f[R] option does, and it +This does what the \f[V]-nodeprecatedlist\f[R] option does, and it doesn\[aq]t generate any deprecated API throughout the rest of the documentation. This is useful when writing code when you don\[aq]t want to be distracted by the deprecated code. -.RS -.RE .TP -.B \f[CB]\-nodeprecatedlist\f[R] +\f[V]-nodeprecatedlist\f[R] Prevents the generation of the file that contains the list of deprecated -APIs (\f[CB]deprecated\-list.html\f[R]) and the link in the navigation bar +APIs (\f[V]deprecated-list.html\f[R]) and the link in the navigation bar to that page. -The \f[CB]javadoc\f[R] tool continues to generate the deprecated API +The \f[V]javadoc\f[R] tool continues to generate the deprecated API throughout the rest of the document. This is useful when your source code contains no deprecated APIs, and you want to make the navigation bar cleaner. -.RS -.RE .TP -.B \f[CB]\-nohelp\f[R] +\f[V]-nohelp\f[R] Omits the HELP link in the navigation bar at the top of each page of output. -.RS -.RE .TP -.B \f[CB]\-noindex\f[R] +\f[V]-noindex\f[R] Omits the index from the generated documents. The index is produced by default. -.RS -.RE .TP -.B \f[CB]\-nonavbar\f[R] +\f[V]-nonavbar\f[R] Prevents the generation of the navigation bar, header, and footer, that are usually found at the top and bottom of the generated pages. -The \f[CB]\-nonavbar\f[R] option has no effect on the \f[CB]\-bottom\f[R] +The \f[V]-nonavbar\f[R] option has no effect on the \f[V]-bottom\f[R] option. -The \f[CB]\-nonavbar\f[R] option is useful when you are interested only in +The \f[V]-nonavbar\f[R] option is useful when you are interested only in the content and have no need for navigation, such as when you are converting the files to PostScript or PDF for printing only. -.RS -.RE .TP -.B \f[CB]\-\-no\-platform\-links\f[R] +\f[V]--no-platform-links\f[R] Prevents the generation of links to platform documentation. These links are generated by default. -.RS -.RE .TP -.B \f[CB]\-noqualifier\f[R] \f[I]name1\f[R]\f[CB],\f[R]\f[I]name2...\f[R] +\f[V]-noqualifier\f[R] \f[I]name1\f[R]\f[V],\f[R]\f[I]name2...\f[R] Excludes the list of qualifiers from the output. The package name is removed from places where class or interface names appear. -For historical reasons, \f[CB]:\f[R] can be used anywhere in the argument -as a separator instead of \f[CB],\f[R]. +For historical reasons, \f[V]:\f[R] can be used anywhere in the argument +as a separator instead of \f[V],\f[R]. .RS .PP The following example omits all package qualifiers: -\f[CB]\-noqualifier\ all\f[R]. +\f[V]-noqualifier all\f[R]. .PP -The following example omits \f[CB]java.lang\f[R] and \f[CB]java.io\f[R] -package qualifiers: \f[CB]\-noqualifier\ java.lang:java.io\f[R]. +The following example omits \f[V]java.lang\f[R] and \f[V]java.io\f[R] +package qualifiers: \f[V]-noqualifier java.lang:java.io\f[R]. .PP The following example omits package qualifiers starting with -\f[CB]java\f[R] and \f[CB]com.sun\f[R] subpackages, but not -\f[CB]javax:\ \-noqualifier\ java.*:com.sun.*\f[R]. +\f[V]java\f[R] and \f[V]com.sun\f[R] subpackages, but not +\f[V]javax: -noqualifier java.*:com.sun.*\f[R]. .PP Where a package qualifier would appear due to the previous behavior, the name can be suitably shortened. -This rule is in effect whether or not the \f[CB]\-noqualifier\f[R] option +This rule is in effect whether or not the \f[V]-noqualifier\f[R] option is used. .RE .TP -.B \f[CB]\-nosince\f[R] -Omits from the generated documents the \f[CB]Since\f[R] sections -associated with the \f[CB]\@since\f[R] tags. -.RS -.RE +\f[V]-nosince\f[R] +Omits from the generated documents the \f[V]Since\f[R] sections +associated with the \f[V]\[at]since\f[R] tags. .TP -.B \f[CB]\-notimestamp\f[R] +\f[V]-notimestamp\f[R] Suppresses the time stamp, which is hidden in an HTML comment in the generated HTML near the top of each page. -The \f[CB]\-notimestamp\f[R] option is useful when you want to run the -\f[CB]javadoc\f[R] tool on two source bases and get the differences -between \f[CB]diff\f[R] them, because it prevents time stamps from causing -a \f[CB]diff\f[R] (which would otherwise be a \f[CB]diff\f[R] on every -page). -The time stamp includes the \f[CB]javadoc\f[R] tool release number. -.RS -.RE -.TP -.B \f[CB]\-notree\f[R] +The \f[V]-notimestamp\f[R] option is useful when you want to run the +\f[V]javadoc\f[R] tool on two source bases and get the differences +between \f[V]diff\f[R] them, because it prevents time stamps from +causing a \f[V]diff\f[R] (which would otherwise be a \f[V]diff\f[R] on +every page). +The time stamp includes the \f[V]javadoc\f[R] tool release number. +.TP +\f[V]-notree\f[R] Omits the class and interface hierarchy pages from the generated documents. These are the pages you reach using the Tree button in the navigation bar. The hierarchy is produced by default. -.RS -.RE .TP -.B \f[CB]\-\-override\-methods\f[R] (\f[CB]detail\f[R]|\f[CB]summary\f[R]) +\f[V]--override-methods\f[R] (\f[V]detail\f[R]|\f[V]summary\f[R]) Documents overridden methods in the detail or summary sections. -The default is \f[CB]detail\f[R]. -.RS -.RE +The default is \f[V]detail\f[R]. .TP -.B \f[CB]\-overview\f[R] \f[I]filename\f[R] -Specifies that the \f[CB]javadoc\f[R] tool should retrieve the text for +\f[V]-overview\f[R] \f[I]filename\f[R] +Specifies that the \f[V]javadoc\f[R] tool should retrieve the text for the overview documentation from the source file specified by -\f[CB]filename\f[R] and place it on the Overview page -(\f[CB]overview\-summary.html\f[R]). +\f[V]filename\f[R] and place it on the Overview page +(\f[V]overview-summary.html\f[R]). A relative path specified with the file name is relative to the current working directory. .RS .PP -While you can use any name you want for the \f[CB]filename\f[R] value and +While you can use any name you want for the \f[V]filename\f[R] value and place it anywhere you want for the path, it is typical to name it -\f[CB]overview.html\f[R] and place it in the source tree at the directory +\f[V]overview.html\f[R] and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, because -the \f[CB]\-sourcepath\f[R] option points to this file. +the \f[V]-sourcepath\f[R] option points to this file. .IP \[bu] 2 \f[B]Linux and macOS:\f[R] For example, if the source tree for the -\f[CB]java.lang\f[R] package is \f[CB]src/classes/java/lang/\f[R], then you -could place the overview file at src/classes/overview.html. +\f[V]java.lang\f[R] package is \f[V]src/classes/java/lang/\f[R], then +you could place the overview file at src/classes/overview.html. .IP \[bu] 2 \f[B]Windows:\f[R] For example, if the source tree for the -\f[CB]java.lang\f[R] package is \f[CB]src\\classes\\java\\lang\\\f[R], then -you could place the overview file at -\f[CB]src\\classes\\overview.html\f[R] +\f[V]java.lang\f[R] package is +\f[V]src\[rs]classes\[rs]java\[rs]lang\[rs]\f[R], then you could place +the overview file at \f[V]src\[rs]classes\[rs]overview.html\f[R] .PP The overview page is created only when you pass two or more package -names to the \f[CB]javadoc\f[R] tool. -The title on the overview page is set by \f[CB]\-doctitle\f[R]. +names to the \f[V]javadoc\f[R] tool. +The title on the overview page is set by \f[V]-doctitle\f[R]. .RE .TP -.B \f[CB]\-serialwarn\f[R] -Generates compile\-time warnings for missing \f[CB]\@serial\f[R] tags. +\f[V]-serialwarn\f[R] +Generates compile-time warnings for missing \f[V]\[at]serial\f[R] tags. By default, Javadoc generates no serial warnings. Use this option to display the serial warnings, which helps to properly -document default serializable fields and \f[CB]writeExternal\f[R] methods. -.RS -.RE +document default serializable fields and \f[V]writeExternal\f[R] +methods. .TP -.B \f[CB]\-\-since\f[R] \f[I]release\f[R](\f[CB],\f[R]\f[I]release\f[R])* +\f[V]--since\f[R] \f[I]release\f[R](\f[V],\f[R]\f[I]release\f[R])* Generates documentation for APIs that were added or newly deprecated in the specified \f[I]release\f[R]s. .RS .PP -If the \f[CB]\@since\f[R] tag in the \f[CB]javadoc\f[R] comment of an +If the \f[V]\[at]since\f[R] tag in the \f[V]javadoc\f[R] comment of an element in the documented source code matches a \f[I]release\f[R] passed as option argument, information about the element and the release it was -added in is included in a "New API" page. +added in is included in a \[dq]New API\[dq] page. .PP -If the "Deprecated API" page is generated and the \f[CB]since\f[R] element -of the \f[CB]java.lang.Deprecated\f[R] annotation of a documented element -matches a \f[I]release\f[R] in the option arguments, information about -the release the element was deprecated in is added to the "Deprecated -API" page. +If the \[dq]Deprecated API\[dq] page is generated and the +\f[V]since\f[R] element of the \f[V]java.lang.Deprecated\f[R] annotation +of a documented element matches a \f[I]release\f[R] in the option +arguments, information about the release the element was deprecated in +is added to the \[dq]Deprecated API\[dq] page. .PP -Releases are compared using case\-sensitive string comparison. +Releases are compared using case-sensitive string comparison. .RE .TP -.B \f[CB]\-\-since\-label\f[R] \f[I]text\f[R] -Specifies the \f[I]text\f[R] to use in the heading of the "New API" page. +\f[V]--since-label\f[R] \f[I]text\f[R] +Specifies the \f[I]text\f[R] to use in the heading of the \[dq]New +API\[dq] page. This may contain information about the releases covered in the page, e.g. -"New API in release 2.0", or "New API since release 1". -.RS -.RE +\[dq]New API in release 2.0\[dq], or \[dq]New API since release 1\[dq]. .TP -.B \f[CB]\-\-snippet\-path\f[R] \f[I]snippetpathlist\f[R] +\f[V]--snippet-path\f[R] \f[I]snippetpathlist\f[R] Specifies the search paths for finding files for external snippets. The \f[I]snippetpathlist\f[R] can contain multiple paths by separating -them with the platform path separator (\f[CB];\f[R] on Windows; \f[CB]:\f[R] -on other platforms.) The Standard Doclet first searches the -\f[CB]snippet\-files\f[R] subdirectory in the package containing the -snippet, and then searches all the directories in the given list. -.RS -.RE +them with the platform path separator (\f[V];\f[R] on Windows; +\f[V]:\f[R] on other platforms.) +The Standard Doclet first searches the \f[V]snippet-files\f[R] +subdirectory in the package containing the snippet, and then searches +all the directories in the given list. .TP -.B \f[CB]\-sourcetab\f[R] \f[I]tab\-length\f[R] +\f[V]-sourcetab\f[R] \f[I]tab-length\f[R] Specifies the number of spaces each tab uses in the source. -.RS -.RE .TP -.B \f[CB]\-\-spec\-base\-url\f[R] \f[I]url\f[R] -Specifies the base URL for relative URLs in \f[CB]\@spec\f[R] tags, to be -used when generating links to any external specifications. +\f[V]--spec-base-url\f[R] \f[I]url\f[R] +Specifies the base URL for relative URLs in \f[V]\[at]spec\f[R] tags, to +be used when generating links to any external specifications. It can either be an absolute URL, or a relative URL, in which case it is evaluated relative to the base directory of the generated output files. -The default value is equivalent to \f[CB]{\@docRoot}/../specs\f[R]. -.RS -.RE +The default value is equivalent to \f[V]{\[at]docRoot}/../specs\f[R]. .TP -.B \f[CB]\-splitindex\f[R] +\f[V]-splitindex\f[R] Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with -non\-alphabetical symbols. -.RS -.RE +non-alphabetical symbols. .TP -.B \f[CB]\-tag\f[R] \f[I]name\f[R]:\f[I]locations\f[R]:\f[I]header\f[R] +\f[V]-tag\f[R] \f[I]name\f[R]:\f[I]locations\f[R]:\f[I]header\f[R] Specifies single argument custom tags. -For the \f[CB]javadoc\f[R] tool to spell\-check tag names, it is important -to include a \f[CB]\-tag\f[R] option for every custom tag that is present -in the source code, disabling (with \f[CB]X\f[R]) those that aren\[aq]t +For the \f[V]javadoc\f[R] tool to spell-check tag names, it is important +to include a \f[V]-tag\f[R] option for every custom tag that is present +in the source code, disabling (with \f[V]X\f[R]) those that aren\[aq]t being output in the current run. -The colon (\f[CB]:\f[R]) is always the separator. +The colon (\f[V]:\f[R]) is always the separator. To include a colon in the tag name, escape it with a backward slash -(\f[CB]\\\f[R]). -The \f[CB]\-tag\f[R] option outputs the tag heading, \f[I]header\f[R], in +(\f[V]\[rs]\f[R]). +The \f[V]-tag\f[R] option outputs the tag heading, \f[I]header\f[R], in bold, followed on the next line by the text from its single argument. Similar to any block tag, the argument text can contain inline tags, which are also interpreted. -The output is similar to standard one\-argument tags, such as the -\f[CB]\@return\f[R] and \f[CB]\@author\f[R] tags. +The output is similar to standard one-argument tags, such as the +\f[V]\[at]return\f[R] and \f[V]\[at]author\f[R] tags. Omitting a \f[I]header\f[R] value causes the \f[I]name\f[R] to be the heading. \f[I]locations\f[R] is a list of characters specifying the kinds of @@ -1186,33 +1111,33 @@ declarations in which the tag may be used. The following characters may be used, in either uppercase or lowercase: .RS .IP \[bu] 2 -\f[CB]A\f[R]: all declarations +\f[V]A\f[R]: all declarations .IP \[bu] 2 -\f[CB]C\f[R]: constructors +\f[V]C\f[R]: constructors .IP \[bu] 2 -\f[CB]F\f[R]: fields +\f[V]F\f[R]: fields .IP \[bu] 2 -\f[CB]M\f[R]: methods +\f[V]M\f[R]: methods .IP \[bu] 2 -\f[CB]O\f[R]: the overview page and other documentation files in -\f[CB]doc\-files\f[R] subdirectories +\f[V]O\f[R]: the overview page and other documentation files in +\f[V]doc-files\f[R] subdirectories .IP \[bu] 2 -\f[CB]P\f[R]: packages +\f[V]P\f[R]: packages .IP \[bu] 2 -\f[CB]S\f[R]: modules +\f[V]S\f[R]: modules .IP \[bu] 2 -\f[CB]T\f[R]: types (classes and interfaces) +\f[V]T\f[R]: types (classes and interfaces) .IP \[bu] 2 -\f[CB]X\f[R]: nowhere: the tag is disabled, and will be ignored +\f[V]X\f[R]: nowhere: the tag is disabled, and will be ignored .PP The order in which tags are given on the command line will be used as the order in which the tags appear in the generated output. You can include standard tags in the order given on the command line by -using the \f[CB]\-tag\f[R] option with no \f[I]locations\f[R] or +using the \f[V]-tag\f[R] option with no \f[I]locations\f[R] or \f[I]header\f[R]. .RE .TP -.B \f[CB]\-taglet\f[R] \f[I]class\f[R] +\f[V]-taglet\f[R] \f[I]class\f[R] Specifies the fully qualified name of the taglet used in generating the documentation for that tag. Use the fully qualified name for the \f[I]class\f[R] value. @@ -1232,41 +1157,38 @@ A taglet can\[aq]t do things such as remove a class name from the list of included classes. However, it can execute side effects, such as printing the tag\[aq]s text to a file or triggering another process. -Use the \f[CB]\-tagletpath\f[R] option to specify the path to the taglet. +Use the \f[V]-tagletpath\f[R] option to specify the path to the taglet. The following example inserts the To Do taglet after Parameters and ahead of Throws in the generated pages. .IP .nf \f[CB] -\-taglet\ com.sun.tools.doclets.ToDoTaglet -\-tagletpath\ /home/taglets -\-tag\ return -\-tag\ param -\-tag\ todo -\-tag\ throws -\-tag\ see +-taglet com.sun.tools.doclets.ToDoTaglet +-tagletpath /home/taglets +-tag return +-tag param +-tag todo +-tag throws +-tag see \f[R] .fi .PP -Alternately, you can use the \f[CB]\-taglet\f[R] option in place of its -\f[CB]\-tag\f[R] option, but that might be difficult to read. +Alternately, you can use the \f[V]-taglet\f[R] option in place of its +\f[V]-tag\f[R] option, but that might be difficult to read. .RE .TP -.B \f[CB]\-tagletpath\f[R] \f[I]tagletpathlist\f[R] +\f[V]-tagletpath\f[R] \f[I]tagletpathlist\f[R] Specifies the search paths for finding taglet class files. The \f[I]tagletpathlist\f[R] can contain multiple paths by separating -them with the platform path separator (\f[CB];\f[R] on Windows; \f[CB]:\f[R] -on other platforms.) The \f[CB]javadoc\f[R] tool searches all -subdirectories of the specified paths. -.RS -.RE +them with the platform path separator (\f[V];\f[R] on Windows; +\f[V]:\f[R] on other platforms.) +The \f[V]javadoc\f[R] tool searches all subdirectories of the specified +paths. .TP -.B \f[CB]\-top\f[R] \f[I]html\-code\f[R] +\f[V]-top\f[R] \f[I]html-code\f[R] Specifies the text to be placed at the top of each output file. -.RS -.RE .TP -.B \f[CB]\-use\f[R] +\f[V]-use\f[R] Creates class and package usage pages. Includes one Use page for each documented class and package. The page describes what packages, classes, methods, constructors and @@ -1274,44 +1196,38 @@ fields use any API of the specified class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C. -For example, you can look at the Use page for the \f[CB]String\f[R] type. -Because the \f[CB]getName\f[R] method in the \f[CB]java.awt.Font\f[R] class -returns type \f[CB]String\f[R], the \f[CB]getName\f[R] method uses -\f[CB]String\f[R] and so the \f[CB]getName\f[R] method appears on the Use -page for \f[CB]String\f[R]. +For example, you can look at the Use page for the \f[V]String\f[R] type. +Because the \f[V]getName\f[R] method in the \f[V]java.awt.Font\f[R] +class returns type \f[V]String\f[R], the \f[V]getName\f[R] method uses +\f[V]String\f[R] and so the \f[V]getName\f[R] method appears on the Use +page for \f[V]String\f[R]. This documents only uses of the API, not the implementation. -When a method uses \f[CB]String\f[R] in its implementation, but +When a method uses \f[V]String\f[R] in its implementation, but doesn\[aq]t take a string as an argument or return a string, that -isn\[aq]t considered a use of \f[CB]String\f[R].To access the generated +isn\[aq]t considered a use of \f[V]String\f[R].To access the generated Use page, go to the class or package and click the \f[B]Use link\f[R] in the navigation bar. -.RS -.RE .TP -.B \f[CB]\-version\f[R] +\f[V]-version\f[R] Includes the version text in the generated docs. This text is omitted by default. -To find out what version of the \f[CB]javadoc\f[R] tool you are using, use -the \f[CB]\-J\-version\f[R] option. -.RS -.RE -.TP -.B \f[CB]\-windowtitle\f[R] \f[I]title\f[R] -Specifies the title to be placed in the HTML \f[CB]\f[R] tag. -The text specified in the \f[CB]title\f[R] tag appears in the window title -and in any browser bookmarks (favorite places) that someone creates for -this page. +To find out what version of the \f[V]javadoc\f[R] tool you are using, +use the \f[V]-J-version\f[R] option. +.TP +\f[V]-windowtitle\f[R] \f[I]title\f[R] +Specifies the title to be placed in the HTML \f[V]<title>\f[R] tag. +The text specified in the \f[V]title\f[R] tag appears in the window +title and in any browser bookmarks (favorite places) that someone +creates for this page. This title should not contain any HTML tags because a browser will not interpret them correctly. Use escape characters on any internal quotation marks within the -\f[CB]title\f[R] tag. -If the \f[CB]\-windowtitle\f[R] option is omitted, then the -\f[CB]javadoc\f[R] tool uses the value of the \f[CB]\-doctitle\f[R] option -for the \f[CB]\-windowtitle\f[R] option. +\f[V]title\f[R] tag. +If the \f[V]-windowtitle\f[R] option is omitted, then the +\f[V]javadoc\f[R] tool uses the value of the \f[V]-doctitle\f[R] option +for the \f[V]-windowtitle\f[R] option. For example, -\f[CB]javadoc\ \-windowtitle\ "My\ Library"\ com.mypackage\f[R]. -.RS -.RE +\f[V]javadoc -windowtitle \[dq]My Library\[dq] com.mypackage\f[R]. .SS Extra Options for the Standard Doclet .PP The following are additional options provided by the Standard Doclet and @@ -1319,16 +1235,16 @@ are subject to change without notice. Additional options are less commonly used or are otherwise regarded as advanced. .TP -.B \f[CB]\-\-date\f[R] \f[I]date\-and\-time\f[R] +\f[V]--date\f[R] \f[I]date-and-time\f[R] Specifies the value to be used to timestamp the generated pages, in \f[B]ISO 8601\f[R] -[https://www.iso.org/iso\-8601\-date\-and\-time\-format.html] format. +[https://www.iso.org/iso-8601-date-and-time-format.html] format. The specified value must be within 10 years of the current date and time. -It is an error to specify both \f[CB]\-notimestamp\f[R] and -\f[CB]\-\-date\f[R]. +It is an error to specify both \f[V]-notimestamp\f[R] and +\f[V]--date\f[R]. Using a specific value means the generated documentation can be part of -a \f[B]reproducible build\f[R] [https://reproducible\-builds.org/]. +a \f[B]reproducible build\f[R] [https://reproducible-builds.org/]. If the option is not given, the default value is the current date and time. For example: @@ -1336,94 +1252,87 @@ For example: .IP .nf \f[CB] -javadoc\ \-\-date\ 2022\-02\-01T17:41:59\-08:00\ mypackage +javadoc --date 2022-02-01T17:41:59-08:00 mypackage \f[R] .fi .RE .TP -.B \f[CB]\-\-legal\-notices\f[R] (\f[CB]default\f[R]|\f[CB]none\f[R]|\f[I]directory\f[R]) +\f[V]--legal-notices\f[R] (\f[V]default\f[R]|\f[V]none\f[R]|\f[I]directory\f[R]) Specifies the location from which to copy legal files to the generated documentation. If the option is not specified or is used with the value -\f[CB]default\f[R], the files are copied from the default location. -If the argument is used with value \f[CB]none\f[R], no files are copied. +\f[V]default\f[R], the files are copied from the default location. +If the argument is used with value \f[V]none\f[R], no files are copied. Every other argument is interpreted as directory from which to copy the legal files. -.RS -.RE .TP -.B \f[CB]\-\-no\-frames\f[R] -This option is a no\-op and is just retained for backwards -compatibility. -.RS -.RE +\f[V]--no-frames\f[R] +This option is a no-op and is just retained for backwards compatibility. .TP -.B \f[CB]\-Xdoclint\f[R] +\f[V]-Xdoclint\f[R] Enables recommended checks for problems in documentation comments. .RS .PP -By default, the \f[CB]\-Xdoclint\f[R] option is enabled. -Disable it with the option \f[CB]\-Xdoclint:none\f[R]. +By default, the \f[V]-Xdoclint\f[R] option is enabled. +Disable it with the option \f[V]-Xdoclint:none\f[R]. .PP For more details, see \f[B]DocLint\f[R]. .RE .TP -.B \f[CB]\-Xdoclint:\f[R]\f[I]flag\f[R],\f[I]flag\f[R],... +\f[V]-Xdoclint:\f[R]\f[I]flag\f[R],\f[I]flag\f[R],... Enable or disable specific checks for different kinds of issues in documentation comments. .RS .PP -Each \f[I]flag\f[R] can be one of \f[CB]all\f[R], \f[CB]none\f[R], or -\f[CB][\-]\f[R]\f[I]group\f[R] where \f[I]group\f[R] has one of the -following values: \f[CB]accessibility\f[R], \f[CB]html\f[R], -\f[CB]missing\f[R], \f[CB]reference\f[R], \f[CB]syntax\f[R]. +Each \f[I]flag\f[R] can be one of \f[V]all\f[R], \f[V]none\f[R], or +\f[V][-]\f[R]\f[I]group\f[R] where \f[I]group\f[R] has one of the +following values: \f[V]accessibility\f[R], \f[V]html\f[R], +\f[V]missing\f[R], \f[V]reference\f[R], \f[V]syntax\f[R]. For more details on these values, see \f[B]DocLint Groups\f[R]. .PP When specifying two or more flags, you can either use a single -\f[CB]\-Xdoclint:...\f[R] option, listing all the desired flags, or you +\f[V]-Xdoclint:...\f[R] option, listing all the desired flags, or you can use multiple options giving one or more flag in each option. For example, use either of the following commands to check for the HTML, -syntax, and accessibility issues in the file \f[CB]MyFile.java\f[R]. +syntax, and accessibility issues in the file \f[V]MyFile.java\f[R]. .IP .nf \f[CB] -javadoc\ \-Xdoclint:html\ \-Xdoclint:syntax\ \-Xdoclint:accessibility\ MyFile.java -javadoc\ \-Xdoclint:html,syntax,accessibility\ MyFile.java +javadoc -Xdoclint:html -Xdoclint:syntax -Xdoclint:accessibility MyFile.java +javadoc -Xdoclint:html,syntax,accessibility MyFile.java \f[R] .fi .PP The following examples illustrate how to change what DocLint reports: .IP \[bu] 2 -\f[CB]\-Xdoclint:none\f[R] \-\-\- disables all checks +\f[V]-Xdoclint:none\f[R] --- disables all checks .IP \[bu] 2 -\f[CB]\-Xdoclint:\f[R]\f[I]group\f[R] \-\-\- enables \f[I]group\f[R] checks +\f[V]-Xdoclint:\f[R]\f[I]group\f[R] --- enables \f[I]group\f[R] checks .IP \[bu] 2 -\f[CB]\-Xdoclint:all\f[R] \-\-\- enables all groups of checks +\f[V]-Xdoclint:all\f[R] --- enables all groups of checks .IP \[bu] 2 -\f[CB]\-Xdoclint:all,\-\f[R]\f[I]group\f[R] \-\-\- enables all checks -except \f[I]group\f[R] checks +\f[V]-Xdoclint:all,-\f[R]\f[I]group\f[R] --- enables all checks except +\f[I]group\f[R] checks .PP For more details, see \f[B]DocLint\f[R]. .RE .TP -.B \f[CB]\-Xdoclint/package:\f[R][\f[CB]\-\f[R]]\f[I]packages\f[R] +\f[V]-Xdoclint/package:\f[R][\f[V]-\f[R]]\f[I]packages\f[R] Enables or disables checks in specific packages. \f[I]packages\f[R] is a comma separated list of package specifiers. A package specifier is either a qualified name of a package or a package -name prefix followed by \f[CB]*\f[R], which expands to all subpackages of +name prefix followed by \f[V]*\f[R], which expands to all subpackages of the given package. -Prefix the package specifier with \f[CB]\-\f[R] to disable checks for the +Prefix the package specifier with \f[V]-\f[R] to disable checks for the specified packages. .RS .PP For more details, see \f[B]DocLint\f[R]. .RE .TP -.B \f[CB]\-Xdocrootparent\f[R] \f[I]url\f[R] -Replaces all \f[CB]\@docRoot\f[R] items followed by \f[CB]/..\f[R] in +\f[V]-Xdocrootparent\f[R] \f[I]url\f[R] +Replaces all \f[V]\[at]docRoot\f[R] items followed by \f[V]/..\f[R] in documentation comments with \f[I]url\f[R]. -.RS -.RE .SH DOCLINT .PP DocLint provides the ability to check for possible problems in @@ -1436,20 +1345,21 @@ an error. Problems are organized into \f[B]groups\f[R], and options can be used to enable or disable messages in one or more groups. Within the source code, messages in one or more groups can be -\f[B]suppressed\f[R] by using \f[CB]\@SuppressWarnings\f[R] annotations. +\f[B]suppressed\f[R] by using \f[V]\[at]SuppressWarnings\f[R] +annotations. .PP -When invoked from \f[CB]javadoc\f[R], by default DocLint checks all +When invoked from \f[V]javadoc\f[R], by default DocLint checks all comments that are used in the generated documentation. -It thus relies on other command\-line options to determine which +It thus relies on other command-line options to determine which declarations, and which corresponding documentation comments will be included. \f[I]Note:\f[R] this may mean that even comments on some private members of serializable classes will also be checked, if the members need to be -documented in the generated \f[CB]Serialized\ Forms\f[R] page. +documented in the generated \f[V]Serialized Forms\f[R] page. .PP -In contrast, when DocLint is invoked from \f[CB]javac\f[R], DocLint solely -relies on the various \f[CB]\-Xdoclint...\f[R] options to determine which -documentation comments to check. +In contrast, when DocLint is invoked from \f[V]javac\f[R], DocLint +solely relies on the various \f[V]-Xdoclint...\f[R] options to determine +which documentation comments to check. .PP DocLint doesn\[aq]t attempt to fix invalid input, it just reports it. .PP @@ -1461,52 +1371,53 @@ The goal is to just report common errors in a convenient manner. .PP The checks performed by DocLint are organized into groups. The warnings and errors in each group can be enabled or disabled with -command\-line options, or suppressed with \f[CB]\@SuppressWarnings\f[R] +command-line options, or suppressed with \f[V]\[at]SuppressWarnings\f[R] annotations. .PP The groups are as follows: .IP \[bu] 2 -\f[CB]accessibility\f[R] \-\-\- Checks for issues related to -accessibility. For example, no \f[CB]alt\f[R] attribute specified in an -\f[CB]<img>\f[R] element, or no caption or summary attributes specified in -a \f[CB]<table>\f[R] element. +\f[V]accessibility\f[R] --- Checks for issues related to accessibility. +For example, no \f[V]alt\f[R] attribute specified in an \f[V]<img>\f[R] +element, or no caption or summary attributes specified in a +\f[V]<table>\f[R] element. .RS 2 .PP Issues are reported as errors if a downstream validation tool might be -expected to report an error in the files generated by \f[CB]javadoc\f[R]. +expected to report an error in the files generated by \f[V]javadoc\f[R]. .PP For reference, see the \f[B]Web Content Accessibility Guidelines\f[R] -[https://www.w3.org/WAI/standards\-guidelines/wcag/]. +[https://www.w3.org/WAI/standards-guidelines/wcag/]. .RE .IP \[bu] 2 -\f[CB]html\f[R] \-\-\- Detects common high\-level HTML issues. For -example, putting block elements inside inline elements, or not closing -elements that require an end tag. +\f[V]html\f[R] --- Detects common high-level HTML issues. +For example, putting block elements inside inline elements, or not +closing elements that require an end tag. .RS 2 .PP Issues are reported as errors if a downstream validation tool might be -expected to report an error in the files generated by \f[CB]javadoc\f[R]. +expected to report an error in the files generated by \f[V]javadoc\f[R]. .PP For reference, see the \f[B]HTML Living Standard\f[R] [https://html.spec.whatwg.org/multipage/]. .RE .IP \[bu] 2 -\f[CB]missing\f[R] \-\-\- Checks for missing documentation comments or -tags. For example, a missing comment on a class declaration, or a -missing \f[CB]\@param\f[R] or \f[CB]\@return\f[R] tag in the comment for a +\f[V]missing\f[R] --- Checks for missing documentation comments or tags. +For example, a missing comment on a class declaration, or a missing +\f[V]\[at]param\f[R] or \f[V]\[at]return\f[R] tag in the comment for a method declaration. .RS 2 .PP Issues related to missing items are typically reported as warnings because they are unlikely to be reported as errors by downstream validation tools that may be used to check the output generated by -\f[CB]javadoc\f[R]. +\f[V]javadoc\f[R]. .RE .IP \[bu] 2 -\f[CB]reference\f[R] \-\-\- Checks for issues relating to the references -to Java API elements from documentation comment tags. For example, the -reference in \f[CB]\@see\f[R] or \f[CB]{\@link\ ...}\f[R] cannot be found, -or a bad name is given for \f[CB]\@param\f[R] or \f[CB]\@throws\f[R]. +\f[V]reference\f[R] --- Checks for issues relating to the references to +Java API elements from documentation comment tags. +For example, the reference in \f[V]\[at]see\f[R] or +\f[V]{\[at]link ...}\f[R] cannot be found, or a bad name is given for +\f[V]\[at]param\f[R] or \f[V]\[at]throws\f[R]. .RS 2 .PP Issues are typically reported as errors because while the issue may not @@ -1514,10 +1425,10 @@ cause problems in the generated files, the author has likely made a mistake that will lead to incorrect or unexpected documentation. .RE .IP \[bu] 2 -\f[CB]syntax\f[R] \-\-\- Checks for low\-level syntactic issues in -documentation comments. For example, unescaped angle brackets -(\f[CB]<\f[R] and \f[CB]>\f[R]) and ampersands (\f[CB]&\f[R]) and invalid -documentation comment tags. +\f[V]syntax\f[R] --- Checks for low-level syntactic issues in +documentation comments. +For example, unescaped angle brackets (\f[V]<\f[R] and \f[V]>\f[R]) and +ampersands (\f[V]&\f[R]) and invalid documentation comment tags. .RS 2 .PP Issues are typically reported as errors because the issues may lead to @@ -1526,58 +1437,61 @@ incorrect or unexpected documentation. .SS Suppressing Messages .PP DocLint checks for and recognizes two strings that may be present in the -arguments for an \f[CB]\@SuppressWarnings\f[R] annotation. +arguments for an \f[V]\[at]SuppressWarnings\f[R] annotation. .IP \[bu] 2 -\f[CB]doclint\f[R] +\f[V]doclint\f[R] .IP \[bu] 2 -\f[CB]doclint:\f[R]\f[I]LIST\f[R] +\f[V]doclint:\f[R]\f[I]LIST\f[R] .PP -where \f[I]LIST\f[R] is a comma\-separated list of one or more of -\f[CB]accessibility\f[R], \f[CB]html\f[R], \f[CB]missing\f[R], -\f[CB]syntax\f[R], \f[CB]reference\f[R]. +where \f[I]LIST\f[R] is a comma-separated list of one or more of +\f[V]accessibility\f[R], \f[V]html\f[R], \f[V]missing\f[R], +\f[V]syntax\f[R], \f[V]reference\f[R]. .PP The names in \f[I]LIST\f[R] are the same \f[B]group\f[R] names supported -by the command\-line \f[CB]\-Xdoclint\f[R] option for \f[CB]javac\f[R] and -\f[CB]javadoc\f[R]. -(This is the same convention honored by the \f[CB]javac\f[R] -\f[CB]\-Xlint\f[R] option and the corresponding names supported by -\f[CB]\@SuppressWarnings\f[R].) +by the command-line \f[V]-Xdoclint\f[R] option for \f[V]javac\f[R] and +\f[V]javadoc\f[R]. +(This is the same convention honored by the \f[V]javac\f[R] +\f[V]-Xlint\f[R] option and the corresponding names supported by +\f[V]\[at]SuppressWarnings\f[R].) .PP The names in \f[I]LIST\f[R] can equivalently be specified in separate arguments of the annotation. For example, the following are equivalent: .IP \[bu] 2 -\f[CB]\@SuppressWarnings("doclint:accessibility,missing")\f[R] +\f[V]\[at]SuppressWarnings(\[dq]doclint:accessibility,missing\[dq])\f[R] .IP \[bu] 2 -\f[CB]\@SuppressWarnings("doclint:accessibility",\ "doclint:missing")\f[R] +\f[V]\[at]SuppressWarnings(\[dq]doclint:accessibility\[dq], \[dq]doclint:missing\[dq])\f[R] .PP When DocLint detects an issue in a documentation comment, it checks for -the presence of \f[CB]\@SuppressWarnings\f[R] on the associated +the presence of \f[V]\[at]SuppressWarnings\f[R] on the associated declaration and on all lexically enclosing declarations. The issue will be ignored if any such annotation is found containing the -simple string \f[CB]doclint\f[R] or the longer form \f[CB]doclint:LIST\f[R] -where \f[I]LIST\f[R] contains the name of the group for the issue. +simple string \f[V]doclint\f[R] or the longer form +\f[V]doclint:LIST\f[R] where \f[I]LIST\f[R] contains the name of the +group for the issue. .PP -\f[I]Note:\f[R] as with other uses of \f[CB]\@SuppressWarnings\f[R], using -the annotation on a module or package declaration only affects that -declaration; it does not affect the contents of the module or package in -other source files. +\f[I]Note:\f[R] as with other uses of \f[V]\[at]SuppressWarnings\f[R], +using the annotation on a module or package declaration only affects +that declaration; it does not affect the contents of the module or +package in other source files. .PP All messages related to an issue are suppressed by the presence of an -appropriate \f[CB]\@SuppressWarnings\f[R] annotation: this includes errors -as well as warnings. +appropriate \f[V]\[at]SuppressWarnings\f[R] annotation: this includes +errors as well as warnings. .PP \f[I]Note:\f[R] It is only possible to \f[I]suppress\f[R] messages. -If an annotation of \f[CB]\@SuppressWarnings("doclint")\f[R] is given on a -top\-level declaration, all DocLint messages for that declaration and -any enclosed declarations will be suppressed; it is not possible to -selectively re\-enable messages for issues in enclosed declarations. +If an annotation of \f[V]\[at]SuppressWarnings(\[dq]doclint\[dq])\f[R] +is given on a top-level declaration, all DocLint messages for that +declaration and any enclosed declarations will be suppressed; it is not +possible to selectively re-enable messages for issues in enclosed +declarations. .SS Comparison with downstream validation tools .PP -DocLint is a utility built into \f[CB]javac\f[R] and \f[CB]javadoc\f[R] that -checks the content of documentation comments, as found in source files. +DocLint is a utility built into \f[V]javac\f[R] and \f[V]javadoc\f[R] +that checks the content of documentation comments, as found in source +files. In contrast, downstream validation tools can be used to validate the -output generated from those documentation comments by \f[CB]javadoc\f[R] +output generated from those documentation comments by \f[V]javadoc\f[R] and the Standard Doclet. .PP Although there is some overlap in functionality, the two mechanisms are @@ -1586,8 +1500,8 @@ different and each has its own strengths and weaknesses. Downstream validation tools can check the end result of any generated documentation, as it will be seen by the end user. This includes content from all sources, including documentation -comments, the Standard Doclet itself, user\-provided taglets, and -content supplied via command\-line options. +comments, the Standard Doclet itself, user-provided taglets, and content +supplied via command-line options. Because such tools are analyzing complete HTML pages, they can do more complete checks than can DocLint. However, when a problem is found in the generated pages, it can be @@ -1599,10 +1513,10 @@ This makes it very easy to identify the exact position of any issues that may be found. DocLint can also detect some semantic errors in documentation comments that downstream tools cannot detect, such as missing comments, using an -\f[CB]\@return\f[R] tag in a method returning \f[CB]void\f[R], or an -\f[CB]\@param\f[R] tag describing a non\-existent parameter. +\f[V]\[at]return\f[R] tag in a method returning \f[V]void\f[R], or an +\f[V]\[at]param\f[R] tag describing a non-existent parameter. But by its nature, DocLint cannot report on problems such as missing -links, or errors in user\-provided custom taglets, or problems in the +links, or errors in user-provided custom taglets, or problems in the Standard Doclet itself. It also cannot reliably detect errors in documentation comments at the boundaries between content in a documentation comment and content diff --git a/src/jdk.jcmd/share/man/jcmd.1 b/src/jdk.jcmd/share/man/jcmd.1 index da3ed3a07e18a..21af425d915e4 100644 --- a/src/jdk.jcmd/share/man/jcmd.1 +++ b/src/jdk.jcmd/share/man/jcmd.1 @@ -19,83 +19,86 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JCMD" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JCMD" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jcmd \- send diagnostic command requests to a running Java Virtual +jcmd - send diagnostic command requests to a running Java Virtual Machine (JVM) .SH SYNOPSIS .PP -\f[CB]jcmd\f[R] [\f[I]pid\f[R] | \f[I]main\-class\f[R]] \f[I]command\f[R]... -| \f[CB]PerfCounter.print\f[R] | \f[CB]\-f\f[R] \f[I]filename\f[R] +\f[V]jcmd\f[R] [\f[I]pid\f[R] | \f[I]main-class\f[R]] +\f[I]command\f[R]... +| \f[V]PerfCounter.print\f[R] | \f[V]-f\f[R] \f[I]filename\f[R] .PP -\f[CB]jcmd\f[R] [\f[CB]\-l\f[R]] +\f[V]jcmd\f[R] [\f[V]-l\f[R]] .PP -\f[CB]jcmd\f[R] \f[CB]\-h\f[R] +\f[V]jcmd\f[R] \f[V]-h\f[R] .TP -.B \f[I]pid\f[R] -When used, the \f[CB]jcmd\f[R] utility sends the diagnostic command +\f[I]pid\f[R] +When used, the \f[V]jcmd\f[R] utility sends the diagnostic command request to the process ID for the Java process. -.RS -.RE .TP -.B \f[I]main\-class\f[R] -When used, the \f[CB]jcmd\f[R] utility sends the diagnostic command +\f[I]main-class\f[R] +When used, the \f[V]jcmd\f[R] utility sends the diagnostic command request to all Java processes with the specified name of the main class. -.RS -.RE .TP -.B \f[I]command\f[R] -The \f[CB]command\f[R] must be a valid \f[CB]jcmd\f[R] command for the +\f[I]command\f[R] +The \f[V]command\f[R] must be a valid \f[V]jcmd\f[R] command for the selected JVM. -The list of available commands for \f[CB]jcmd\f[R] is obtained by running -the \f[CB]help\f[R] command (\f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]help\f[R]) +The list of available commands for \f[V]jcmd\f[R] is obtained by running +the \f[V]help\f[R] command (\f[V]jcmd\f[R] \f[I]pid\f[R] \f[V]help\f[R]) where \f[I]pid\f[R] is the process ID for the running Java process. -If the \f[I]pid\f[R] is \f[CB]0\f[R], commands will be sent to all Java +If the \f[I]pid\f[R] is \f[V]0\f[R], commands will be sent to all Java processes. The main class argument will be used to match, either partially or fully, the class used to start Java. If no options are given, it lists the running Java process identifiers -with the main class and command\-line arguments that were used to launch -the process (the same as using \f[CB]\-l\f[R]). -.RS -.RE +with the main class and command-line arguments that were used to launch +the process (the same as using \f[V]-l\f[R]). .TP -.B \f[CB]Perfcounter.print\f[R] +\f[V]Perfcounter.print\f[R] Prints the performance counters exposed by the specified Java process. -.RS -.RE .TP -.B \f[CB]\-f\f[R] \f[I]filename\f[R] +\f[V]-f\f[R] \f[I]filename\f[R] Reads and executes commands from a specified file, \f[I]filename\f[R]. -.RS -.RE .TP -.B \f[CB]\-l\f[R] +\f[V]-l\f[R] Displays the list of Java Virtual Machine process identifiers that are not running in a separate docker process along with the main class and -command\-line arguments that were used to launch the process. +command-line arguments that were used to launch the process. If the JVM is in a docker process, you must use tools such as -\f[CB]ps\f[R] to look up the PID. +\f[V]ps\f[R] to look up the PID. .RS .PP \f[B]Note:\f[R] .PP -Using \f[CB]jcmd\f[R] without arguments is the same as using -\f[CB]jcmd\ \-l\f[R]. +Using \f[V]jcmd\f[R] without arguments is the same as using +\f[V]jcmd -l\f[R]. .RE .TP -.B \f[CB]\-h\f[R] -Displays the \f[CB]jcmd\f[R] utility\[aq]s command\-line help. -.RS -.RE +\f[V]-h\f[R] +Displays the \f[V]jcmd\f[R] utility\[aq]s command-line help. .SH DESCRIPTION .PP -The \f[CB]jcmd\f[R] utility is used to send diagnostic command requests to -the JVM. +The \f[V]jcmd\f[R] utility is used to send diagnostic command requests +to the JVM. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM. @@ -105,44 +108,44 @@ for a diagnostic command, use the name of the command as the argument. For example: .RS .PP -\f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]help\f[R] \f[I]command\f[R] +\f[V]jcmd\f[R] \f[I]pid\f[R] \f[V]help\f[R] \f[I]command\f[R] .RE .PP If arguments contain spaces, then you must surround them with single or -double quotation marks (\f[CB]\[aq]\f[R] or \f[CB]"\f[R]). +double quotation marks (\f[V]\[aq]\f[R] or \f[V]\[dq]\f[R]). In addition, you must escape single or double quotation marks with a -backslash (\f[CB]\\\f[R]) to prevent the operating system shell from +backslash (\f[V]\[rs]\f[R]) to prevent the operating system shell from processing quotation marks. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks). .PP If you specify the process identifier (\f[I]pid\f[R]) or the main class -(\f[I]main\-class\f[R]) as the first argument, then the \f[CB]jcmd\f[R] +(\f[I]main-class\f[R]) as the first argument, then the \f[V]jcmd\f[R] utility sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class. You can also send the diagnostic command request to all available Java -processes by specifying \f[CB]0\f[R] as the process identifier. +processes by specifying \f[V]0\f[R] as the process identifier. .SH COMMANDS FOR JCMD .PP -The \f[I]command\f[R] must be a valid \f[CB]jcmd\f[R] diagnostic command +The \f[I]command\f[R] must be a valid \f[V]jcmd\f[R] diagnostic command for the selected JVM. -The list of available commands for \f[CB]jcmd\f[R] is obtained by running -the \f[CB]help\f[R] command (\f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]help\f[R]) +The list of available commands for \f[V]jcmd\f[R] is obtained by running +the \f[V]help\f[R] command (\f[V]jcmd\f[R] \f[I]pid\f[R] \f[V]help\f[R]) where \f[I]pid\f[R] is the process ID for a running Java process. -If the \f[I]pid\f[R] is \f[CB]0\f[R], commands will be sent to all Java +If the \f[I]pid\f[R] is \f[V]0\f[R], commands will be sent to all Java processes. The main class argument will be used to match, either partially or fully, the class used to start Java. If no options are given, it lists the running Java process identifiers that are not in separate docker processes along with the main class and -command\-line arguments that were used to launch the process (the same -as using \f[CB]\-l\f[R]). +command-line arguments that were used to launch the process (the same as +using \f[V]-l\f[R]). .PP The following commands are available: .TP -.B \f[CB]help\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +\f[V]help\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] For more information about a specific command. .RS .PP @@ -154,56 +157,56 @@ For more information about a specific command. \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-all\f[R]: (Optional) Show help for all commands (BOOLEAN, false) . +\f[V]-all\f[R]: (Optional) Show help for all commands (BOOLEAN, false) . .RE .TP -.B \f[CB]Compiler.codecache\f[R] +\f[V]Compiler.codecache\f[R] Prints code cache layout and bounds. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]Compiler.codelist\f[R] +\f[V]Compiler.codelist\f[R] Prints all compiled methods in code cache that are alive. .RS .PP Impact: Medium .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]Compiler.perfmap\f[R] (Linux only) +\f[V]Compiler.perfmap\f[R] (Linux only) Write map file for Linux perf tool. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]Compiler.queue\f[R] +\f[V]Compiler.queue\f[R] Prints methods queued for compilation. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]Compiler.directives_add\ *filename*\ *arguments*\f[R] +\f[V]Compiler.directives_add *filename* *arguments*\f[R] Adds compiler directives from a file. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[I]arguments\f[R]: .PP @@ -211,52 +214,52 @@ Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] value) .RE .TP -.B \f[CB]Compiler.directives_clear\f[R] +\f[V]Compiler.directives_clear\f[R] Remove all compiler directives. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]Compiler.directives_print\f[R] +\f[V]Compiler.directives_print\f[R] Prints all active compiler directives. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]Compiler.directives_remove\f[R] +\f[V]Compiler.directives_remove\f[R] Remove latest added compiler directive. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]GC.class_histogram\f[R] [\f[I]options\f[R]] +\f[V]GC.class_histogram\f[R] [\f[I]options\f[R]] Provides statistics about the Java heap usage. .RS .PP -Impact: High \-\-\- depends on Java heap size and content. +Impact: High --- depends on Java heap size and content. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or -\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-all\f[R]: (Optional) Inspects all objects, including unreachable +\f[V]-all\f[R]: (Optional) Inspects all objects, including unreachable objects (BOOLEAN, false) .IP \[bu] 2 -\f[CB]\-parallel\f[R]: (Optional) Number of parallel threads to use for +\f[V]-parallel\f[R]: (Optional) Number of parallel threads to use for heap inspection. 0 (the default) means let the VM determine the number of threads to use. 1 means use one thread (disable parallelism). @@ -265,40 +268,40 @@ threads, but might use fewer. (INT, 0) .RE .TP -.B \f[CB]GC.finalizer_info\f[R] +\f[V]GC.finalizer_info\f[R] Provides information about the Java finalization queue. .RS .PP Impact: Medium .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]GC.heap_dump\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +\f[V]GC.heap_dump\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] Generates a HPROF format dump of the Java heap. .RS .PP -Impact: High \-\-\- depends on the Java heap size and content. -Request a full GC unless the \f[CB]\-all\f[R] option is specified. +Impact: High --- depends on the Java heap size and content. +Request a full GC unless the \f[V]-all\f[R] option is specified. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-all\f[R]: (Optional) Dump all objects, including unreachable +\f[V]-all\f[R]: (Optional) Dump all objects, including unreachable objects (BOOLEAN, false) .IP \[bu] 2 -\f[CB]\-gz\f[R]: (Optional) If specified, the heap dump is written in +\f[V]-gz\f[R]: (Optional) If specified, the heap dump is written in gzipped format using the given compression level. 1 (recommended) is the fastest, 9 the strongest compression. (INT, 1) .IP \[bu] 2 -\f[CB]\-overwrite\f[R]: (Optional) If specified, the dump file will be +\f[V]-overwrite\f[R]: (Optional) If specified, the dump file will be overwritten if it exists (BOOLEAN, false) .PP \f[I]arguments\f[R]: @@ -306,30 +309,30 @@ overwritten if it exists (BOOLEAN, false) \f[I]filename\f[R]: The name of the dump file (STRING, no default value) .RE .TP -.B \f[CB]GC.heap_info\f[R] +\f[V]GC.heap_info\f[R] Provides generic Java heap information. .RS .PP Impact: Medium .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]GC.run\f[R] -Calls \f[CB]java.lang.System.gc()\f[R]. +\f[V]GC.run\f[R] +Calls \f[V]java.lang.System.gc()\f[R]. .RS .PP -Impact: Medium \-\-\- depends on the Java heap size and content. +Impact: Medium --- depends on the Java heap size and content. .RE .TP -.B \f[CB]GC.run_finalization\f[R] -Calls \f[CB]java.lang.System.runFinalization()\f[R]. +\f[V]GC.run_finalization\f[R] +Calls \f[V]java.lang.System.runFinalization()\f[R]. .RS .PP -Impact: Medium \-\-\- depends on the Java content. +Impact: Medium --- depends on the Java content. .RE .TP -.B \f[CB]JFR.check\f[R] [\f[I]options\f[R]] +\f[V]JFR.check\f[R] [\f[I]options\f[R]] Show information about a running flight recording .RS .PP @@ -338,20 +341,20 @@ Impact: Low \f[B]Note:\f[R] .PP The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or -\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. If no parameters are entered, information for all active recordings is shown. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]name\f[R]: (Optional) Name of the flight recording. +\f[V]name\f[R]: (Optional) Name of the flight recording. (STRING, no default value) .IP \[bu] 2 -\f[CB]verbose\f[R]: (Optional) Flag for printing the event settings for +\f[V]verbose\f[R]: (Optional) Flag for printing the event settings for the recording (BOOLEAN, false) .RE .TP -.B \f[CB]JFR.configure\f[R] [\f[I]options\f[R]] +\f[V]JFR.configure\f[R] [\f[I]options\f[R]] Set the parameters for a flight recording .RS .PP @@ -360,52 +363,52 @@ Impact: Low \f[B]Note:\f[R] .PP The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or -\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. If no parameters are entered, the current settings are displayed. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]globalbuffercount\f[R]: (Optional) Number of global buffers. -This option is a legacy option: change the \f[CB]memorysize\f[R] parameter -to alter the number of global buffers. +\f[V]globalbuffercount\f[R]: (Optional) Number of global buffers. +This option is a legacy option: change the \f[V]memorysize\f[R] +parameter to alter the number of global buffers. This value cannot be changed once JFR has been initialized. -(STRING, default determined by the value for \f[CB]memorysize\f[R]) +(STRING, default determined by the value for \f[V]memorysize\f[R]) .IP \[bu] 2 -\f[CB]globalbuffersize\f[R]: (Optional) Size of the global buffers, in +\f[V]globalbuffersize\f[R]: (Optional) Size of the global buffers, in bytes. -This option is a legacy option: change the \f[CB]memorysize\f[R] parameter -to alter the size of the global buffers. +This option is a legacy option: change the \f[V]memorysize\f[R] +parameter to alter the size of the global buffers. This value cannot be changed once JFR has been initialized. -(STRING, default determined by the value for \f[CB]memorysize\f[R]) +(STRING, default determined by the value for \f[V]memorysize\f[R]) .IP \[bu] 2 -\f[CB]maxchunksize\f[R]: (Optional) Maximum size of an individual data +\f[V]maxchunksize\f[R]: (Optional) Maximum size of an individual data chunk in bytes if one of the following suffixes is not used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. This value cannot be changed once JFR has been initialized. (STRING, 12M) .IP \[bu] 2 -\f[CB]memorysize\f[R]: (Optional) Overall memory size, in bytes if one of +\f[V]memorysize\f[R]: (Optional) Overall memory size, in bytes if one of the following suffixes is not used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. This value cannot be changed once JFR has been initialized. (STRING, 10M) .IP \[bu] 2 -\f[CB]repositorypath\f[R]: (Optional) Path to the location where +\f[V]repositorypath\f[R]: (Optional) Path to the location where recordings are stored until they are written to a permanent file. (STRING, The default location is the temporary directory for the operating system. -On Linux operating systems, the temporary directory is \f[CB]/tmp\f[R]. -On Windwows, the temporary directory is specified by the \f[CB]TMP\f[R] +On Linux operating systems, the temporary directory is \f[V]/tmp\f[R]. +On Windwows, the temporary directory is specified by the \f[V]TMP\f[R] environment variable.) .IP \[bu] 2 -\f[CB]stackdepth\f[R]: (Optional) Stack depth for stack traces. +\f[V]stackdepth\f[R]: (Optional) Stack depth for stack traces. Setting this value greater than the default of 64 may cause a performance degradation. This value cannot be changed once JFR has been initialized. (LONG, 64) .IP \[bu] 2 -\f[CB]thread_buffer_size\f[R]: (Optional) Local buffer size for each +\f[V]thread_buffer_size\f[R]: (Optional) Local buffer size for each thread in bytes if one of the following suffixes is not used: \[aq]k\[aq] or \[aq]K\[aq] for kilobytes or \[aq]m\[aq] or \[aq]M\[aq] for megabytes. @@ -414,11 +417,11 @@ recommended. This value cannot be changed once JFR has been initialized. (STRING, 8k) .IP \[bu] 2 -\f[CB]samplethreads\f[R]: (Optional) Flag for activating thread sampling. +\f[V]samplethreads\f[R]: (Optional) Flag for activating thread sampling. (BOOLEAN, true) .RE .TP -.B \f[CB]JFR.dump\f[R] [\f[I]options\f[R]] +\f[V]JFR.dump\f[R] [\f[I]options\f[R]] Write data to a file while a flight recording is running .RS .PP @@ -427,40 +430,42 @@ Impact: Low \f[B]Note:\f[R] .PP The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or -\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. No options are required. The recording continues to run after the data is written. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]begin\f[R]: (Optional) Specify the time from which recording data +\f[V]begin\f[R]: (Optional) Specify the time from which recording data will be included in the dump file. The format is specified as local time. (STRING, no default value) .IP \[bu] 2 -\f[CB]end\f[R]: (Optional) Specify the time to which recording data will +\f[V]end\f[R]: (Optional) Specify the time to which recording data will be included in the dump file. The format is specified as local time. (STRING, no default value) .RS 2 .PP -\f[B]Note:\f[R] For both \f[CB]begin\f[R] and \f[CB]end\f[R], the time must -be in a format that can be read by java.time.LocalTime::parse(STRING), +\f[B]Note:\f[R] For both \f[V]begin\f[R] and \f[V]end\f[R], the time +must be in a format that can be read by +java.time.LocalTime::parse(STRING), java.time.LocalDateTime::parse(STRING) or java.time.Instant::parse(STRING). -For example, "13:20:15", "2020\-03\-17T09:00:00" or -"2020\-03\-17T09:00:00Z". +For example, \[dq]13:20:15\[dq], \[dq]2020-03-17T09:00:00\[dq] or +\[dq]2020-03-17T09:00:00Z\[dq]. .PP -\f[B]Note:\f[R] \f[CB]begin\f[R] and \f[CB]end\f[R] times correspond to the -timestamps found within the recorded information in the flight recording -data. +\f[B]Note:\f[R] \f[V]begin\f[R] and \f[V]end\f[R] times correspond to +the timestamps found within the recorded information in the flight +recording data. .PP Another option is to use a time relative to the current time that is -specified by a negative integer followed by "s", "m" or "h". -For example, "\-12h", "\-15m" or "\-30s" +specified by a negative integer followed by \[dq]s\[dq], \[dq]m\[dq] or +\[dq]h\[dq]. +For example, \[dq]-12h\[dq], \[dq]-15m\[dq] or \[dq]-30s\[dq] .RE .IP \[bu] 2 -\f[CB]filename\f[R]: (Optional) Name of the file to which the flight +\f[V]filename\f[R]: (Optional) Name of the file to which the flight recording data is dumped. If no filename is given, a filename is generated from the PID and the current date. @@ -468,22 +473,22 @@ The filename may also be a directory in which case, the filename is generated from the PID and the current date in the specified directory. (STRING, no default value) .IP \[bu] 2 -\f[CB]maxage\f[R]: (Optional) Length of time for dumping the flight +\f[V]maxage\f[R]: (Optional) Length of time for dumping the flight recording data to a file. (INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, no default value) .IP \[bu] 2 -\f[CB]maxsize\f[R]: (Optional) Maximum size for the amount of data to dump -from a flight recording in bytes if one of the following suffixes is not -used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or +\f[V]maxsize\f[R]: (Optional) Maximum size for the amount of data to +dump from a flight recording in bytes if one of the following suffixes +is not used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. (STRING, no default value) .IP \[bu] 2 -\f[CB]name\f[R]: (Optional) Name of the recording. +\f[V]name\f[R]: (Optional) Name of the recording. If no name is given, data from all recordings is dumped. (STRING, no default value) .IP \[bu] 2 -\f[CB]path\-to\-gc\-root\f[R]: (Optional) Flag for saving the path to +\f[V]path-to-gc-root\f[R]: (Optional) Flag for saving the path to garbage collection (GC) roots at the time the recording data is dumped. The path information is useful for finding memory leaks but collecting it can cause the application to pause for a short period of time. @@ -492,7 +497,7 @@ a memory leak. (BOOLEAN, false) .RE .TP -.B \f[CB]JFR.start\f[R] [\f[I]options\f[R]] +\f[V]JFR.start\f[R] [\f[I]options\f[R]] Start a flight recording .RS .PP @@ -501,33 +506,33 @@ Impact: Low \f[B]Note:\f[R] .PP The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or -\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. If no parameters are entered, then a recording is started with default values. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]delay\f[R]: (Optional) Length of time to wait before starting to +\f[V]delay\f[R]: (Optional) Length of time to wait before starting to record (INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, 0s) .IP \[bu] 2 -\f[CB]disk\f[R]: (Optional) Flag for also writing the data to disk while +\f[V]disk\f[R]: (Optional) Flag for also writing the data to disk while recording (BOOLEAN, true) .IP \[bu] 2 -\f[CB]dumponexit\f[R]: (Optional) Flag for writing the recording to disk +\f[V]dumponexit\f[R]: (Optional) Flag for writing the recording to disk when the Java Virtual Machine (JVM) shuts down. -If set to \[aq]true\[aq] and no value is given for \f[CB]filename\f[R], +If set to \[aq]true\[aq] and no value is given for \f[V]filename\f[R], the recording is written to a file in the directory where the process was started. -The file name is a system\-generated name that contains the process ID, +The file name is a system-generated name that contains the process ID, the recording ID and the current time stamp. -(For example: \f[CB]id\-1\-2019_12_12_10_41.jfr\f[R]) (BOOLEAN, false) +(For example: \f[V]id-1-2019_12_12_10_41.jfr\f[R]) (BOOLEAN, false) .IP \[bu] 2 -\f[CB]duration\f[R]: (Optional) Length of time to record. -Note that \f[CB]0s\f[R] means forever (INTEGER followed by \[aq]s\[aq] for -seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, 0s) +\f[V]duration\f[R]: (Optional) Length of time to record. +Note that \f[V]0s\f[R] means forever (INTEGER followed by \[aq]s\[aq] +for seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, 0s) .IP \[bu] 2 -\f[CB]filename\f[R]: (Optional) Name of the file to which the flight +\f[V]filename\f[R]: (Optional) Name of the file to which the flight recording data is written when the recording is stopped. If no filename is given, a filename is generated from the PID and the current date and is placed in the directory where the process was @@ -536,47 +541,47 @@ The filename may also be a directory in which case, the filename is generated from the PID and the current date in the specified directory. (STRING, no default value) .IP \[bu] 2 -\f[CB]maxage\f[R]: (Optional) Maximum time to keep the recorded data on +\f[V]maxage\f[R]: (Optional) Maximum time to keep the recorded data on disk. -This parameter is valid only when the \f[CB]disk\f[R] parameter is set to -\f[CB]true\f[R]. -Note \f[CB]0s\f[R] means forever. +This parameter is valid only when the \f[V]disk\f[R] parameter is set to +\f[V]true\f[R]. +Note \f[V]0s\f[R] means forever. (INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, 0s) .IP \[bu] 2 -\f[CB]maxsize\f[R]: (Optional) Maximum size of the data to keep on disk in -bytes if one of the following suffixes is not used: \[aq]m\[aq] or +\f[V]maxsize\f[R]: (Optional) Maximum size of the data to keep on disk +in bytes if one of the following suffixes is not used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. -This parameter is valid only when the \f[CB]disk\f[R] parameter is set to +This parameter is valid only when the \f[V]disk\f[R] parameter is set to \[aq]true\[aq]. -The value must not be less than the value for the \f[CB]maxchunksize\f[R] -parameter set with the \f[CB]JFR.configure\f[R] command. +The value must not be less than the value for the \f[V]maxchunksize\f[R] +parameter set with the \f[V]JFR.configure\f[R] command. (STRING, 0 (no maximum size)) .IP \[bu] 2 -\f[CB]name\f[R]: (Optional) Name of the recording. +\f[V]name\f[R]: (Optional) Name of the recording. If no name is provided, a name is generated. Make note of the generated name that is shown in the response to the command so that you can use it with other commands. -(STRING, system\-generated default name) +(STRING, system-generated default name) .IP \[bu] 2 -\f[CB]path\-to\-gc\-root\f[R]: (Optional) Flag for saving the path to +\f[V]path-to-gc-root\f[R]: (Optional) Flag for saving the path to garbage collection (GC) roots at the end of a recording. The path information is useful for finding memory leaks but collecting it is time consuming. Turn on this flag only when you have an application that you suspect has a memory leak. -If the \f[CB]settings\f[R] parameter is set to \[aq]profile\[aq], then the -information collected includes the stack trace from where the potential -leaking object was allocated. +If the \f[V]settings\f[R] parameter is set to \[aq]profile\[aq], then +the information collected includes the stack trace from where the +potential leaking object was allocated. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]settings\f[R]: (Optional) Name of the settings file that identifies +\f[V]settings\f[R]: (Optional) Name of the settings file that identifies which events to record. To specify more than one file, separate the names with a comma (\[aq],\[aq]). -Include the path if the file is not in \f[CB]JAVA\-HOME\f[R]/lib/jfr. +Include the path if the file is not in \f[V]JAVA-HOME\f[R]/lib/jfr. The following profiles are included with the JDK in the -\f[CB]JAVA\-HOME\f[R]/lib/jfr directory: \[aq]default.jfc\[aq]: collects a +\f[V]JAVA-HOME\f[R]/lib/jfr directory: \[aq]default.jfc\[aq]: collects a predefined set of information with low overhead, so it has minimal impact on performance and can be used with recordings that run continuously; \[aq]profile.jfc\[aq]: Provides more data than the @@ -584,20 +589,20 @@ continuously; \[aq]profile.jfc\[aq]: Provides more data than the performance. Use this configuration for short periods of time when more information is needed. -Use \f[CB]none\f[R] to start a recording without a predefined +Use \f[V]none\f[R] to start a recording without a predefined configuration file. -(STRING, \f[CB]JAVA\-HOME\f[R]/lib/jfr/default.jfc) +(STRING, \f[V]JAVA-HOME\f[R]/lib/jfr/default.jfc) .PP Event settings and .jfc options can be specified using the following syntax: .IP \[bu] 2 -\f[CB]option\f[R]: (Optional) Specifies the option value to modify. -To list available options, use the \f[CB]JAVA_HOME\f[R]/bin/jfr tool. +\f[V]option\f[R]: (Optional) Specifies the option value to modify. +To list available options, use the \f[V]JAVA_HOME\f[R]/bin/jfr tool. .IP \[bu] 2 -\f[CB]event\-setting\f[R]: (Optional) Specifies the event setting value to +\f[V]event-setting\f[R]: (Optional) Specifies the event setting value to modify. -Use the form: \f[CB]<event\-name>#<setting\-name>=<value>\f[R] To add a -new event setting, prefix the event name with \[aq]+\[aq]. +Use the form: \f[V]<event-name>#<setting-name>=<value>\f[R] To add a new +event setting, prefix the event name with \[aq]+\[aq]. .PP You can specify values for multiple event settings and .jfc options by separating them with a whitespace. @@ -609,7 +614,7 @@ For more information about the settings syntax, see Javadoc of the jdk.jfr package. .RE .TP -.B \f[CB]JFR.stop\f[R] [\f[I]options\f[R]] +\f[V]JFR.stop\f[R] [\f[I]options\f[R]] Stop a flight recording .RS .PP @@ -618,27 +623,27 @@ Impact: Low \f[B]Note:\f[R] .PP The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or -\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. If no parameters are entered, then no recording is stopped. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]filename\f[R]: (Optional) Name of the file to which the recording is -written when the recording is stopped. +\f[V]filename\f[R]: (Optional) Name of the file to which the recording +is written when the recording is stopped. If no path is provided, the data from the recording is discarded. (STRING, no default value) .IP \[bu] 2 -\f[CB]name\f[R]: (Optional) Name of the recording (STRING, no default +\f[V]name\f[R]: (Optional) Name of the recording (STRING, no default value) .RE .TP -.B \f[CB]JVMTI.agent_load\f[R] [\f[I]arguments\f[R]] +\f[V]JVMTI.agent_load\f[R] [\f[I]arguments\f[R]] Loads JVMTI native agent. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(control)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(control)\f[R] .PP \f[I]arguments\f[R]: .IP \[bu] 2 @@ -649,243 +654,244 @@ Permission: \f[CB]java.lang.management.ManagementPermission(control)\f[R] (STRING, no default value) .RE .TP -.B \f[CB]JVMTI.data_dump\f[R] -Signals the JVM to do a data\-dump request for JVMTI. +\f[V]JVMTI.data_dump\f[R] +Signals the JVM to do a data-dump request for JVMTI. .RS .PP Impact: High .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]ManagementAgent.start\f[R] [\f[I]options\f[R]] +\f[V]ManagementAgent.start\f[R] [\f[I]options\f[R]] Starts remote management agent. .RS .PP -Impact: Low \-\-\- no impact +Impact: Low --- no impact .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]config.file\f[R]: (Optional) Sets -\f[CB]com.sun.management.config.file\f[R] (STRING, no default value) +\f[V]config.file\f[R]: (Optional) Sets +\f[V]com.sun.management.config.file\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.host\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.host\f[R] (STRING, no default value) +\f[V]jmxremote.host\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.host\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.port\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.port\f[R] (STRING, no default value) +\f[V]jmxremote.port\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.port\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.rmi.port\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.rmi.port\f[R] (STRING, no default +\f[V]jmxremote.rmi.port\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.rmi.port\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.ssl\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.ssl\f[R] (STRING, no default value) +\f[V]jmxremote.ssl\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.ssl\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.registry.ssl\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.registry.ssl\f[R] (STRING, no default +\f[V]jmxremote.registry.ssl\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.registry.ssl\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.authenticate\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.authenticate\f[R] (STRING, no default +\f[V]jmxremote.authenticate\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.authenticate\f[R] (STRING, no default value) .IP \[bu] 2 jmxremote.password.file: (Optional) Sets -\f[CB]com.sun.management.jmxremote.password.file\f[R] (STRING, no default +\f[V]com.sun.management.jmxremote.password.file\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.access.file\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.acce\ ss.file\f[R] (STRING, no default +\f[V]jmxremote.access.file\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.acce ss.file\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.login.config\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.log\ in.config\f[R] (STRING, no default +\f[V]jmxremote.login.config\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.log in.config\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.ssl.enabled.cipher.suites\f[R]: (Optional) Sets -\f[CB]com.sun.management\f[R]. +\f[V]jmxremote.ssl.enabled.cipher.suites\f[R]: (Optional) Sets +\f[V]com.sun.management\f[R]. .IP \[bu] 2 -\f[CB]jmxremote.ssl.enabled.cipher.suite\f[R]: (STRING, no default value) +\f[V]jmxremote.ssl.enabled.cipher.suite\f[R]: (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.ssl.enabled.protocols\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxr\ emote.ssl.enabled.protocols\f[R] (STRING, +\f[V]jmxremote.ssl.enabled.protocols\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxr emote.ssl.enabled.protocols\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.ssl.need.client.auth\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxre\ mote.need.client.auth\f[R] (STRING, no +\f[V]jmxremote.ssl.need.client.auth\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxre mote.need.client.auth\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.ssl.config.file\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.\ ssl_config_file\f[R] (STRING, no +\f[V]jmxremote.ssl.config.file\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote. ssl_config_file\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jmxremote.autodiscovery\f[R]: (Optional) Sets -\f[CB]com.sun.management.jmxremote.au\ todiscovery\f[R] (STRING, no +\f[V]jmxremote.autodiscovery\f[R]: (Optional) Sets +\f[V]com.sun.management.jmxremote.au todiscovery\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jdp.port\f[R]: (Optional) Sets \f[CB]com.sun.management.jdp.port\f[R] -(INT, no default value) +\f[V]jdp.port\f[R]: (Optional) Sets +\f[V]com.sun.management.jdp.port\f[R] (INT, no default value) .IP \[bu] 2 -\f[CB]jdp.address\f[R]: (Optional) Sets -\f[CB]com.sun.management.jdp.address\f[R] (STRING, no default value) +\f[V]jdp.address\f[R]: (Optional) Sets +\f[V]com.sun.management.jdp.address\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jdp.source_addr\f[R]: (Optional) Sets -\f[CB]com.sun.management.jdp.source_addr\f[R] (STRING, no default value) +\f[V]jdp.source_addr\f[R]: (Optional) Sets +\f[V]com.sun.management.jdp.source_addr\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]jdp.ttl\f[R]: (Optional) Sets \f[CB]com.sun.management.jdp.ttl\f[R] +\f[V]jdp.ttl\f[R]: (Optional) Sets \f[V]com.sun.management.jdp.ttl\f[R] (INT, no default value) .IP \[bu] 2 -\f[CB]jdp.pause\f[R]: (Optional) Sets -\f[CB]com.sun.management.jdp.pause\f[R] (INT, no default value) +\f[V]jdp.pause\f[R]: (Optional) Sets +\f[V]com.sun.management.jdp.pause\f[R] (INT, no default value) .IP \[bu] 2 -\f[CB]jdp.name\f[R]: (Optional) Sets \f[CB]com.sun.management.jdp.name\f[R] -(STRING, no default value) +\f[V]jdp.name\f[R]: (Optional) Sets +\f[V]com.sun.management.jdp.name\f[R] (STRING, no default value) .RE .TP -.B \f[CB]ManagementAgent.start_local\f[R] +\f[V]ManagementAgent.start_local\f[R] Starts the local management agent. .RS .PP -Impact: Low \-\-\- no impact +Impact: Low --- no impact .RE .TP -.B \f[CB]ManagementAgent.status\f[R] +\f[V]ManagementAgent.status\f[R] Print the management agent status. .RS .PP -Impact: Low \-\-\- no impact +Impact: Low --- no impact .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]ManagementAgent.stop\f[R] +\f[V]ManagementAgent.stop\f[R] Stops the remote management agent. .RS .PP -Impact: Low \-\-\- no impact +Impact: Low --- no impact .RE .TP -.B \f[CB]System.trim_native_heap\f[R] (Linux only) -Attempts to free up memory by trimming the C\-heap. +\f[V]System.trim_native_heap\f[R] (Linux only) +Attempts to free up memory by trimming the C-heap. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(control)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(control)\f[R] .RE .TP -.B \f[CB]Thread.print\f[R] [\f[I]options\f[R]] +\f[V]Thread.print\f[R] [\f[I]options\f[R]] Prints all threads with stacktraces. .RS .PP -Impact: Medium \-\-\- depends on the number of threads. +Impact: Medium --- depends on the number of threads. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-e\f[R]: (Optional) Print extended thread information (BOOLEAN, +\f[V]-e\f[R]: (Optional) Print extended thread information (BOOLEAN, false) .IP \[bu] 2 -\f[CB]\-l\f[R]: (Optional) Prints \f[CB]java.util.concurrent\f[R] locks +\f[V]-l\f[R]: (Optional) Prints \f[V]java.util.concurrent\f[R] locks (BOOLEAN, false) .RE .TP -.B \f[CB]VM.cds\f[R] [\f[I]arguments\f[R]] +\f[V]VM.cds\f[R] [\f[I]arguments\f[R]] Dumps a static or dynamic shared archive that includes all currently loaded classes. .RS .PP -Impact: Medium \-\-\- pause time depends on number of loaded classes +Impact: Medium --- pause time depends on number of loaded classes .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[I]arguments\f[R]: .IP \[bu] 2 -\f[CB]subcmd\f[R]: must be either \f[CB]static_dump\f[R] or -\f[CB]dynamic_dump\f[R] (STRING, no default value) +\f[V]subcmd\f[R]: must be either \f[V]static_dump\f[R] or +\f[V]dynamic_dump\f[R] (STRING, no default value) .IP \[bu] 2 -\f[CB]filename\f[R]: (Optional) Name of the shared archive to be dumped +\f[V]filename\f[R]: (Optional) Name of the shared archive to be dumped (STRING, no default value) .PP -If \f[CB]filename\f[R] is not specified, a default file name is chosen +If \f[V]filename\f[R] is not specified, a default file name is chosen using the pid of the target JVM process. For example, java_pid1234_static.jsa, java_pid5678_dynamic.jsa, etc. .PP -If \f[CB]filename\f[R] is not specified as an absolute path, the archive +If \f[V]filename\f[R] is not specified as an absolute path, the archive file is created in a directory relative to the current directory of the target JVM process. .PP -If \f[CB]dynamic_dump\f[R] is specified, the target JVM must be started -with the JVM option \f[CB]\-XX:+RecordDynamicDumpInfo\f[R]. +If \f[V]dynamic_dump\f[R] is specified, the target JVM must be started +with the JVM option \f[V]-XX:+RecordDynamicDumpInfo\f[R]. .RE .TP -.B \f[CB]VM.classloaders\f[R] [\f[I]options\f[R]] +\f[V]VM.classloaders\f[R] [\f[I]options\f[R]] Prints classloader hierarchy. .RS .PP -Impact: Medium \-\-\- Depends on number of class loaders and classes +Impact: Medium --- Depends on number of class loaders and classes loaded. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]show\-classes\f[R]: (Optional) Print loaded classes. +\f[V]show-classes\f[R]: (Optional) Print loaded classes. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]verbose\f[R]: (Optional) Print detailed information. +\f[V]verbose\f[R]: (Optional) Print detailed information. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]fold\f[R]: (Optional) Show loaders of the same name and class as +\f[V]fold\f[R]: (Optional) Show loaders of the same name and class as one. (BOOLEAN, true) .RE .TP -.B \f[CB]VM.classloader_stats\f[R] +\f[V]VM.classloader_stats\f[R] Prints statistics about all ClassLoaders. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]VM.class_hierarchy\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +\f[V]VM.class_hierarchy\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] Prints a list of all loaded classes, indented to show the class hierarchy. The name of each class is followed by the ClassLoaderData* of its -ClassLoader, or "null" if it is loaded by the bootstrap class loader. +ClassLoader, or \[dq]null\[dq] if it is loaded by the bootstrap class +loader. .RS .PP -Impact: Medium \-\-\- depends on the number of loaded classes. +Impact: Medium --- depends on the number of loaded classes. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-i\f[R]: (Optional) Inherited interfaces should be printed. +\f[V]-i\f[R]: (Optional) Inherited interfaces should be printed. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]\-s\f[R]: (Optional) If a classname is specified, print its +\f[V]-s\f[R]: (Optional) If a classname is specified, print its subclasses in addition to its superclasses. Without this option only the superclasses will be printed. (BOOLEAN, false) @@ -898,220 +904,220 @@ If not specified, all class hierarchies are printed. (STRING, no default value) .RE .TP -.B \f[CB]VM.command_line\f[R] +\f[V]VM.command_line\f[R] Prints the command line used to start this VM instance. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]VM.dynlibs\f[R] +\f[V]VM.dynlibs\f[R] Prints the loaded dynamic libraries. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]VM.events\f[R] [\f[I]options\f[R]] +\f[V]VM.events\f[R] [\f[I]options\f[R]] Print VM event logs .RS .PP -Impact: Low \-\-\- Depends on event log size. +Impact: Low --- Depends on event log size. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[I]options\f[R]: .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .IP \[bu] 2 -\f[CB]log\f[R]: (Optional) Name of log to be printed. +\f[V]log\f[R]: (Optional) Name of log to be printed. If omitted, all logs are printed. (STRING, no default value) .IP \[bu] 2 -\f[CB]max\f[R]: (Optional) Maximum number of events to be printed (newest +\f[V]max\f[R]: (Optional) Maximum number of events to be printed (newest first). If omitted, all events are printed. (STRING, no default value) .RE .TP -.B \f[CB]VM.info\f[R] +\f[V]VM.info\f[R] Prints information about the JVM environment and status. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .RE .TP -.B \f[CB]VM.log\f[R] [\f[I]options\f[R]] +\f[V]VM.log\f[R] [\f[I]options\f[R]] Lists current log configuration, enables/disables/configures a log output, or rotates all logs. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(control)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(control)\f[R] .PP \f[I]options\f[R]: .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .IP \[bu] 2 -\f[CB]output\f[R]: (Optional) The name or index (#) of output to +\f[V]output\f[R]: (Optional) The name or index (#) of output to configure. (STRING, no default value) .IP \[bu] 2 -\f[CB]output_options\f[R]: (Optional) Options for the output. +\f[V]output_options\f[R]: (Optional) Options for the output. (STRING, no default value) .IP \[bu] 2 -\f[CB]what\f[R]: (Optional) Configures what tags to log. +\f[V]what\f[R]: (Optional) Configures what tags to log. (STRING, no default value ) .IP \[bu] 2 -\f[CB]decorators\f[R]: (Optional) Configures which decorators to use. +\f[V]decorators\f[R]: (Optional) Configures which decorators to use. Use \[aq]none\[aq] or an empty value to remove all. (STRING, no default value) .IP \[bu] 2 -\f[CB]disable\f[R]: (Optional) Turns off all logging and clears the log +\f[V]disable\f[R]: (Optional) Turns off all logging and clears the log configuration. (BOOLEAN, no default value) .IP \[bu] 2 -\f[CB]list\f[R]: (Optional) Lists current log configuration. +\f[V]list\f[R]: (Optional) Lists current log configuration. (BOOLEAN, no default value) .IP \[bu] 2 -\f[CB]rotate\f[R]: (Optional) Rotates all logs. +\f[V]rotate\f[R]: (Optional) Rotates all logs. (BOOLEAN, no default value) .RE .TP -.B \f[CB]VM.flags\f[R] [\f[I]options\f[R]] +\f[V]VM.flags\f[R] [\f[I]options\f[R]] Prints the VM flag options and their current values. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-all\f[R]: (Optional) Prints all flags supported by the VM +\f[V]-all\f[R]: (Optional) Prints all flags supported by the VM (BOOLEAN, false). .RE .TP -.B \f[CB]VM.metaspace\f[R] [\f[I]options\f[R]] +\f[V]VM.metaspace\f[R] [\f[I]options\f[R]] Prints the statistics for the metaspace .RS .PP -Impact: Medium \-\-\- Depends on number of classes loaded. +Impact: Medium --- Depends on number of classes loaded. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]basic\f[R]: (Optional) Prints a basic summary (does not need a +\f[V]basic\f[R]: (Optional) Prints a basic summary (does not need a safepoint). (BOOLEAN, false) .IP \[bu] 2 -\f[CB]show\-loaders\f[R]: (Optional) Shows usage by class loader. +\f[V]show-loaders\f[R]: (Optional) Shows usage by class loader. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]show\-classes\f[R]: (Optional) If show\-loaders is set, shows loaded +\f[V]show-classes\f[R]: (Optional) If show-loaders is set, shows loaded classes for each loader. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]by\-chunktype\f[R]: (Optional) Break down numbers by chunk type. +\f[V]by-chunktype\f[R]: (Optional) Break down numbers by chunk type. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]by\-spacetype\f[R]: (Optional) Break down numbers by loader type. +\f[V]by-spacetype\f[R]: (Optional) Break down numbers by loader type. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]vslist\f[R]: (Optional) Shows details about the underlying virtual +\f[V]vslist\f[R]: (Optional) Shows details about the underlying virtual space. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]scale\f[R]: (Optional) Memory usage in which to scale. -Valid values are: 1, KB, MB or GB (fixed scale) or "dynamic" for a -dynamically chosen scale. +\f[V]scale\f[R]: (Optional) Memory usage in which to scale. +Valid values are: 1, KB, MB or GB (fixed scale) or \[dq]dynamic\[dq] for +a dynamically chosen scale. (STRING, dynamic) .RE .TP -.B \f[CB]VM.native_memory\f[R] [\f[I]options\f[R]] +\f[V]VM.native_memory\f[R] [\f[I]options\f[R]] Prints native memory usage .RS .PP Impact: Medium .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]summary\f[R]: (Optional) Requests runtime to report current memory +\f[V]summary\f[R]: (Optional) Requests runtime to report current memory summary, which includes total reserved and committed memory, along with memory usage summary by each subsystem. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]detail\f[R]: (Optional) Requests runtime to report memory allocation ->= 1K by each callsite. +\f[V]detail\f[R]: (Optional) Requests runtime to report memory +allocation >= 1K by each callsite. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]baseline\f[R]: (Optional) Requests runtime to baseline current +\f[V]baseline\f[R]: (Optional) Requests runtime to baseline current memory usage, so it can be compared against in later time. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]summary.diff\f[R]: (Optional) Requests runtime to report memory +\f[V]summary.diff\f[R]: (Optional) Requests runtime to report memory summary comparison against previous baseline. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]detail.diff\f[R]: (Optional) Requests runtime to report memory +\f[V]detail.diff\f[R]: (Optional) Requests runtime to report memory detail comparison against previous baseline, which shows the memory allocation activities at different callsites. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]statistics\f[R]: (Optional) Prints tracker statistics for tuning +\f[V]statistics\f[R]: (Optional) Prints tracker statistics for tuning purpose. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]scale\f[R]: (Optional) Memory usage in which scale, KB, MB or GB +\f[V]scale\f[R]: (Optional) Memory usage in which scale, KB, MB or GB (STRING, KB) .RE .TP -.B \f[CB]VM.print_touched_methods\f[R] +\f[V]VM.print_touched_methods\f[R] Prints all methods that have ever been touched during the lifetime of this JVM. .RS .PP -Impact: Medium \-\-\- depends on Java content. +Impact: Medium --- depends on Java content. .RE .TP -.B \f[CB]VM.set_flag\f[R] [\f[I]arguments\f[R]] +\f[V]VM.set_flag\f[R] [\f[I]arguments\f[R]] Sets the VM flag option by using the provided value. .RS .PP Impact: Low .PP -Permission: \f[CB]java.lang.management.ManagementPermission(control)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(control)\f[R] .PP \f[I]arguments\f[R]: .IP \[bu] 2 @@ -1122,73 +1128,73 @@ no default value) (STRING, no default value) .RE .TP -.B \f[CB]VM.stringtable\f[R] [\f[I]options\f[R]] +\f[V]VM.stringtable\f[R] [\f[I]options\f[R]] Dumps the string table. .RS .PP -Impact: Medium \-\-\- depends on the Java content. +Impact: Medium --- depends on the Java content. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-verbose\f[R]: (Optional) Dumps the content of each string in the +\f[V]-verbose\f[R]: (Optional) Dumps the content of each string in the table (BOOLEAN, false) .RE .TP -.B \f[CB]VM.symboltable\f[R] [\f[I]options\f[R]] +\f[V]VM.symboltable\f[R] [\f[I]options\f[R]] Dumps the symbol table. .RS .PP -Impact: Medium \-\-\- depends on the Java content. +Impact: Medium --- depends on the Java content. .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax). +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax). .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-verbose\f[R]: (Optional) Dumps the content of each symbol in the +\f[V]-verbose\f[R]: (Optional) Dumps the content of each symbol in the table (BOOLEAN, false) .RE .TP -.B \f[CB]VM.systemdictionary\f[R] +\f[V]VM.systemdictionary\f[R] Prints the statistics for dictionary hashtable sizes and bucket length. .RS .PP Impact: Medium .PP -Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R] +Permission: \f[V]java.lang.management.ManagementPermission(monitor)\f[R] .PP \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]verbose\f[R]: (Optional) Dump the content of each dictionary entry +\f[V]verbose\f[R]: (Optional) Dump the content of each dictionary entry for all class loaders (BOOLEAN, false) . .RE .TP -.B \f[CB]VM.system_properties\f[R] +\f[V]VM.system_properties\f[R] Prints the system properties. .RS .PP Impact: Low .PP -Permission: \f[CB]java.util.PropertyPermission(*,\ read)\f[R] +Permission: \f[V]java.util.PropertyPermission(*, read)\f[R] .RE .TP -.B \f[CB]VM.uptime\f[R] [\f[I]options\f[R]] +\f[V]VM.uptime\f[R] [\f[I]options\f[R]] Prints the VM uptime. .RS .PP @@ -1197,20 +1203,20 @@ Impact: Low \f[B]Note:\f[R] .PP The following \f[I]options\f[R] must be specified using either -\f[I]key\f[R] or \f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax. +\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. .PP \f[I]options\f[R]: .IP \[bu] 2 -\f[CB]\-date\f[R]: (Optional) Adds a prefix with the current date +\f[V]-date\f[R]: (Optional) Adds a prefix with the current date (BOOLEAN, false) .RE .TP -.B \f[CB]VM.version\f[R] +\f[V]VM.version\f[R] Prints JVM version information. .RS .PP Impact: Low .PP Permission: -\f[CB]java.util.PropertyPermission(java.vm.version,\ read)\f[R] +\f[V]java.util.PropertyPermission(java.vm.version, read)\f[R] .RE diff --git a/src/jdk.jcmd/share/man/jinfo.1 b/src/jdk.jcmd/share/man/jinfo.1 index 64d62510ef44f..5b56d05007641 100644 --- a/src/jdk.jcmd/share/man/jinfo.1 +++ b/src/jdk.jcmd/share/man/jinfo.1 @@ -19,87 +19,85 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JINFO" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JINFO" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jinfo \- generate Java configuration information for a specified Java +jinfo - generate Java configuration information for a specified Java process .SH SYNOPSIS .PP \f[B]Note:\f[R] This command is experimental and unsupported. .PP -\f[CB]jinfo\f[R] [\f[I]option\f[R]] \f[I]pid\f[R] +\f[V]jinfo\f[R] [\f[I]option\f[R]] \f[I]pid\f[R] .TP -.B \f[I]option\f[R] -This represents the \f[CB]jinfo\f[R] command\-line options. +\f[I]option\f[R] +This represents the \f[V]jinfo\f[R] command-line options. See \f[B]Options for the jinfo Command\f[R]. -.RS -.RE .TP -.B \f[I]pid\f[R] +\f[I]pid\f[R] The process ID for which the configuration information is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, use either the -\f[CB]ps\f[R] command or, if the JVM processes are not running in a +\f[V]ps\f[R] command or, if the JVM processes are not running in a separate docker instance, the \f[B]jps\f[R] command. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jinfo\f[R] command prints Java configuration information for a +The \f[V]jinfo\f[R] command prints Java configuration information for a specified Java process. The configuration information includes Java system properties and JVM -command\-line flags. -If the specified process is running on a 64\-bit JVM, then you might -need to specify the \f[CB]\-J\-d64\f[R] option, for example: +command-line flags. +If the specified process is running on a 64-bit JVM, then you might need +to specify the \f[V]-J-d64\f[R] option, for example: .RS .PP -\f[CB]jinfo\ \-J\-d64\ \-sysprops\f[R] \f[I]pid\f[R] +\f[V]jinfo -J-d64 -sysprops\f[R] \f[I]pid\f[R] .RE .PP This command is unsupported and might not be available in future releases of the JDK. -In Windows Systems where \f[CB]dbgeng.dll\f[R] is not present, the +In Windows Systems where \f[V]dbgeng.dll\f[R] is not present, the Debugging Tools for Windows must be installed to have these tools work. -The \f[CB]PATH\f[R] environment variable should contain the location of -the \f[CB]jvm.dll\f[R] that\[aq]s used by the target process or the +The \f[V]PATH\f[R] environment variable should contain the location of +the \f[V]jvm.dll\f[R] that\[aq]s used by the target process or the location from which the core dump file was produced. .SH OPTIONS FOR THE JINFO COMMAND .PP \f[B]Note:\f[R] .PP -If none of the following options are used, both the command\-line flags -and the system property name\-value pairs are printed. +If none of the following options are used, both the command-line flags +and the system property name-value pairs are printed. .TP -.B \f[CB]\-flag\f[R] \f[I]name\f[R] -Prints the name and value of the specified command\-line flag. -.RS -.RE +\f[V]-flag\f[R] \f[I]name\f[R] +Prints the name and value of the specified command-line flag. .TP -.B \f[CB]\-flag\f[R] [\f[CB]+\f[R]|\f[CB]\-\f[R]]\f[I]name\f[R] -Enables or disables the specified Boolean command\-line flag. -.RS -.RE +\f[V]-flag\f[R] [\f[V]+\f[R]|\f[V]-\f[R]]\f[I]name\f[R] +Enables or disables the specified Boolean command-line flag. .TP -.B \f[CB]\-flag\f[R] \f[I]name\f[R]\f[CB]=\f[R]\f[I]value\f[R] -Sets the specified command\-line flag to the specified value. -.RS -.RE +\f[V]-flag\f[R] \f[I]name\f[R]\f[V]=\f[R]\f[I]value\f[R] +Sets the specified command-line flag to the specified value. .TP -.B \f[CB]\-flags\f[R] -Prints command\-line flags passed to the JVM. -.RS -.RE +\f[V]-flags\f[R] +Prints command-line flags passed to the JVM. .TP -.B \f[CB]\-sysprops\f[R] -Prints Java system properties as name\-value pairs. -.RS -.RE +\f[V]-sysprops\f[R] +Prints Java system properties as name-value pairs. .TP -.B \f[CB]\-h\f[R] or \f[CB]\-help\f[R] +\f[V]-h\f[R] or \f[V]-help\f[R] Prints a help message. -.RS -.RE diff --git a/src/jdk.jcmd/share/man/jmap.1 b/src/jdk.jcmd/share/man/jmap.1 index 0e5d932573d58..3f19c8cdc8b42 100644 --- a/src/jdk.jcmd/share/man/jmap.1 +++ b/src/jdk.jcmd/share/man/jmap.1 @@ -19,83 +19,88 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JMAP" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JMAP" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jmap \- print details of a specified process +jmap - print details of a specified process .SH SYNOPSIS .PP \f[B]Note:\f[R] This command is experimental and unsupported. .PP -\f[CB]jmap\f[R] [\f[I]options\f[R]] \f[I]pid\f[R] +\f[V]jmap\f[R] [\f[I]options\f[R]] \f[I]pid\f[R] .TP -.B \f[I]options\f[R] -This represents the \f[CB]jmap\f[R] command\-line options. +\f[I]options\f[R] +This represents the \f[V]jmap\f[R] command-line options. See \f[B]Options for the jmap Command\f[R]. -.RS -.RE .TP -.B \f[I]pid\f[R] +\f[I]pid\f[R] The process ID for which the information specified by the \f[I]options\f[R] is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, use either the -\f[CB]ps\f[R] command or, if the JVM processes are not running in a +\f[V]ps\f[R] command or, if the JVM processes are not running in a separate docker instance, the \f[B]jps\f[R] command. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jmap\f[R] command prints details of a specified running process. +The \f[V]jmap\f[R] command prints details of a specified running +process. .PP \f[B]Note:\f[R] .PP This command is unsupported and might not be available in future releases of the JDK. -On Windows Systems where the \f[CB]dbgeng.dll\f[R] file isn\[aq]t present, -the Debugging Tools for Windows must be installed to make these tools -work. -The \f[CB]PATH\f[R] environment variable should contain the location of -the \f[CB]jvm.dll\f[R] file that\[aq]s used by the target process or the +On Windows Systems where the \f[V]dbgeng.dll\f[R] file isn\[aq]t +present, the Debugging Tools for Windows must be installed to make these +tools work. +The \f[V]PATH\f[R] environment variable should contain the location of +the \f[V]jvm.dll\f[R] file that\[aq]s used by the target process or the location from which the core dump file was produced. .SH OPTIONS FOR THE JMAP COMMAND .TP -.B \f[CB]\-clstats\f[R] \f[I]pid\f[R] +\f[V]-clstats\f[R] \f[I]pid\f[R] Connects to a running process and prints class loader statistics of Java heap. -.RS -.RE .TP -.B \f[CB]\-finalizerinfo\f[R] \f[I]pid\f[R] +\f[V]-finalizerinfo\f[R] \f[I]pid\f[R] Connects to a running process and prints information on objects awaiting finalization. -.RS -.RE .TP -.B \f[CB]\-histo\f[R][\f[CB]:live\f[R]] \f[I]pid\f[R] +\f[V]-histo\f[R][\f[V]:live\f[R]] \f[I]pid\f[R] Connects to a running process and prints a histogram of the Java object heap. -If the \f[CB]live\f[R] suboption is specified, it then counts only live +If the \f[V]live\f[R] suboption is specified, it then counts only live objects. -.RS -.RE .TP -.B \f[CB]\-dump:\f[R]\f[I]dump_options\f[R] \f[I]pid\f[R] +\f[V]-dump:\f[R]\f[I]dump_options\f[R] \f[I]pid\f[R] Connects to a running process and dumps the Java heap. The \f[I]dump_options\f[R] include: .RS .IP \[bu] 2 -\f[CB]live\f[R] \-\-\- When specified, dumps only the live objects; if not +\f[V]live\f[R] --- When specified, dumps only the live objects; if not specified, then dumps all objects in the heap. .IP \[bu] 2 -\f[CB]format=b\f[R] \-\-\- Dumps the Java heap in \f[CB]hprof\f[R] binary +\f[V]format=b\f[R] --- Dumps the Java heap in \f[V]hprof\f[R] binary format .IP \[bu] 2 -\f[CB]file=\f[R]\f[I]filename\f[R] \-\-\- Dumps the heap to +\f[V]file=\f[R]\f[I]filename\f[R] --- Dumps the heap to \f[I]filename\f[R] .PP -Example: \f[CB]jmap\ \-dump:live,format=b,file=heap.bin\f[R] \f[I]pid\f[R] +Example: \f[V]jmap -dump:live,format=b,file=heap.bin\f[R] \f[I]pid\f[R] .RE diff --git a/src/jdk.jcmd/share/man/jps.1 b/src/jdk.jcmd/share/man/jps.1 index 8bae0ebea8c29..f47e62d6c3bee 100644 --- a/src/jdk.jcmd/share/man/jps.1 +++ b/src/jdk.jcmd/share/man/jps.1 @@ -19,215 +19,217 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JPS" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JPS" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jps \- list the instrumented JVMs on the target system +jps - list the instrumented JVMs on the target system .SH SYNOPSIS .PP \f[B]Note:\f[R] This command is experimental and unsupported. .PP -\f[CB]jps\f[R] [\f[CB]\-q\f[R]] [\f[CB]\-mlvV\f[R]] [\f[I]hostid\f[R]] +\f[V]jps\f[R] [\f[V]-q\f[R]] [\f[V]-mlvV\f[R]] [\f[I]hostid\f[R]] .PP -\f[CB]jps\f[R] [\f[CB]\-help\f[R]] +\f[V]jps\f[R] [\f[V]-help\f[R]] .SH OPTIONS .TP -.B \f[CB]\-q\f[R] +\f[V]-q\f[R] Suppresses the output of the class name, JAR file name, and arguments -passed to the \f[CB]main\f[R] method, producing a list of only local JVM +passed to the \f[V]main\f[R] method, producing a list of only local JVM identifiers. -.RS -.RE .TP -.B \f[CB]\-mlvV\f[R] +\f[V]-mlvV\f[R] You can specify any combination of these options. .RS .IP \[bu] 2 -\f[CB]\-m\f[R] displays the arguments passed to the \f[CB]main\f[R] method. -The output may be \f[CB]null\f[R] for embedded JVMs. +\f[V]-m\f[R] displays the arguments passed to the \f[V]main\f[R] method. +The output may be \f[V]null\f[R] for embedded JVMs. .IP \[bu] 2 -\f[CB]\-l\f[R] displays the full package name for the application\[aq]s -\f[CB]main\f[R] class or the full path name to the application\[aq]s JAR +\f[V]-l\f[R] displays the full package name for the application\[aq]s +\f[V]main\f[R] class or the full path name to the application\[aq]s JAR file. .IP \[bu] 2 -\f[CB]\-v\f[R] displays the arguments passed to the JVM. +\f[V]-v\f[R] displays the arguments passed to the JVM. .IP \[bu] 2 -\f[CB]\-V\f[R] suppresses the output of the class name, JAR file name, and -arguments passed to the \f[CB]main\f[R] method, producing a list of only +\f[V]-V\f[R] suppresses the output of the class name, JAR file name, and +arguments passed to the \f[V]main\f[R] method, producing a list of only local JVM identifiers. .RE .TP -.B \f[I]hostid\f[R] +\f[I]hostid\f[R] The identifier of the host for which the process report should be generated. -The \f[CB]hostid\f[R] can include optional components that indicate the +The \f[V]hostid\f[R] can include optional components that indicate the communications protocol, port number, and other implementation specific data. See \f[B]Host Identifier\f[R]. -.RS -.RE .TP -.B \f[CB]\-help\f[R] -Displays the help message for the \f[CB]jps\f[R] command. -.RS -.RE +\f[V]-help\f[R] +Displays the help message for the \f[V]jps\f[R] command. .SH DESCRIPTION .PP -The \f[CB]jps\f[R] command lists the instrumented Java HotSpot VMs on the +The \f[V]jps\f[R] command lists the instrumented Java HotSpot VMs on the target system. The command is limited to reporting information on JVMs for which it has the access permissions. .PP -If the \f[CB]jps\f[R] command is run without specifying a \f[CB]hostid\f[R], -then it searches for instrumented JVMs on the local host. -If started with a \f[CB]hostid\f[R], then it searches for JVMs on the +If the \f[V]jps\f[R] command is run without specifying a +\f[V]hostid\f[R], then it searches for instrumented JVMs on the local +host. +If started with a \f[V]hostid\f[R], then it searches for JVMs on the indicated host, using the specified protocol and port. -A \f[CB]jstatd\f[R] process is assumed to be running on the target host. +A \f[V]jstatd\f[R] process is assumed to be running on the target host. .PP -The \f[CB]jps\f[R] command reports the local JVM identifier, or -\f[CB]lvmid\f[R], for each instrumented JVM found on the target system. -The \f[CB]lvmid\f[R] is typically, but not necessarily, the operating +The \f[V]jps\f[R] command reports the local JVM identifier, or +\f[V]lvmid\f[R], for each instrumented JVM found on the target system. +The \f[V]lvmid\f[R] is typically, but not necessarily, the operating system\[aq]s process identifier for the JVM process. -With no options, the \f[CB]jps\f[R] command lists each Java -application\[aq]s \f[CB]lvmid\f[R] followed by the short form of the +With no options, the \f[V]jps\f[R] command lists each Java +application\[aq]s \f[V]lvmid\f[R] followed by the short form of the application\[aq]s class name or jar file name. The short form of the class name or JAR file name omits the class\[aq]s package information or the JAR files path information. .PP -The \f[CB]jps\f[R] command uses the Java launcher to find the class name +The \f[V]jps\f[R] command uses the Java launcher to find the class name and arguments passed to the main method. If the target JVM is started with a custom launcher, then the class or -JAR file name, and the arguments to the \f[CB]main\f[R] method aren\[aq]t +JAR file name, and the arguments to the \f[V]main\f[R] method aren\[aq]t available. -In this case, the \f[CB]jps\f[R] command outputs the string -\f[CB]Unknown\f[R] for the class name, or JAR file name, and for the -arguments to the \f[CB]main\f[R] method. +In this case, the \f[V]jps\f[R] command outputs the string +\f[V]Unknown\f[R] for the class name, or JAR file name, and for the +arguments to the \f[V]main\f[R] method. .PP -The list of JVMs produced by the \f[CB]jps\f[R] command can be limited by +The list of JVMs produced by the \f[V]jps\f[R] command can be limited by the permissions granted to the principal running the command. The command lists only the JVMs for which the principal has access -rights as determined by operating system\-specific access control +rights as determined by operating system-specific access control mechanisms. .SH HOST IDENTIFIER .PP -The host identifier, or \f[CB]hostid\f[R], is a string that indicates the +The host identifier, or \f[V]hostid\f[R], is a string that indicates the target system. -The syntax of the \f[CB]hostid\f[R] string corresponds to the syntax of a +The syntax of the \f[V]hostid\f[R] string corresponds to the syntax of a URI: .RS .PP -[\f[I]protocol\f[R]\f[CB]:\f[R]][[\f[CB]//\f[R]]\f[I]hostname\f[R]][\f[CB]:\f[R]\f[I]port\f[R]][\f[CB]/\f[R]\f[I]servername\f[R]] +[\f[I]protocol\f[R]\f[V]:\f[R]][[\f[V]//\f[R]]\f[I]hostname\f[R]][\f[V]:\f[R]\f[I]port\f[R]][\f[V]/\f[R]\f[I]servername\f[R]] .RE .TP -.B \f[I]protocol\f[R] +\f[I]protocol\f[R] The communications protocol. If the \f[I]protocol\f[R] is omitted and a \f[I]hostname\f[R] isn\[aq]t -specified, then the default protocol is a platform\-specific, optimized, +specified, then the default protocol is a platform-specific, optimized, local protocol. If the protocol is omitted and a host name is specified, then the -default protocol is \f[CB]rmi\f[R]. -.RS -.RE +default protocol is \f[V]rmi\f[R]. .TP -.B \f[I]hostname\f[R] +\f[I]hostname\f[R] A host name or IP address that indicates the target host. -If you omit the \f[I]hostname\f[R] parameter, then the target host is the -local host. -.RS -.RE +If you omit the \f[I]hostname\f[R] parameter, then the target host is +the local host. .TP -.B \f[I]port\f[R] +\f[I]port\f[R] The default port for communicating with the remote server. If the \f[I]hostname\f[R] parameter is omitted or the \f[I]protocol\f[R] -parameter specifies an optimized, local protocol, then the \f[I]port\f[R] -parameter is ignored. +parameter specifies an optimized, local protocol, then the +\f[I]port\f[R] parameter is ignored. Otherwise, treatment of the \f[I]port\f[R] parameter is -implementation\-specific. -For the default \f[CB]rmi\f[R] protocol, the \f[I]port\f[R] parameter -indicates the port number for the \f[CB]rmiregistry\f[R] on the remote +implementation-specific. +For the default \f[V]rmi\f[R] protocol, the \f[I]port\f[R] parameter +indicates the port number for the \f[V]rmiregistry\f[R] on the remote host. If the \f[I]port\f[R] parameter is omitted, and the \f[I]protocol\f[R] -parameter indicates \f[CB]rmi\f[R], then the default \f[CB]rmiregistry\f[R] -port (\f[CB]1099\f[R]) is used. -.RS -.RE +parameter indicates \f[V]rmi\f[R], then the default +\f[V]rmiregistry\f[R] port (\f[V]1099\f[R]) is used. .TP -.B \f[I]servername\f[R] +\f[I]servername\f[R] The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. -For the \f[CB]rmi\f[R] protocol, this parameter is a string that +For the \f[V]rmi\f[R] protocol, this parameter is a string that represents the name of the RMI remote object on the remote host. -See the \f[B]jstatd\f[R] command \f[CB]\-n\f[R] option. -.RS -.RE +See the \f[B]jstatd\f[R] command \f[V]-n\f[R] option. .SH OUTPUT FORMAT OF THE JPS COMMAND .PP -The output of the \f[CB]jps\f[R] command has the following pattern: +The output of the \f[V]jps\f[R] command has the following pattern: .RS .PP \f[I]lvmid\f[R] [ [ \f[I]classname\f[R] | \f[I]JARfilename\f[R] | -\f[CB]"Unknown"\f[R]] [ \f[I]arg\f[R]* ] [ \f[I]jvmarg\f[R]* ] ] +\f[V]\[dq]Unknown\[dq]\f[R]] [ \f[I]arg\f[R]* ] [ \f[I]jvmarg\f[R]* ] ] .RE .PP All output tokens are separated by white space. -An \f[CB]arg\f[R] value that includes embedded white space introduces +An \f[V]arg\f[R] value that includes embedded white space introduces ambiguity when attempting to map arguments to their actual positional parameters. .PP \f[B]Note:\f[R] .PP It\[aq]s recommended that you don\[aq]t write scripts to parse -\f[CB]jps\f[R] output because the format might change in future releases. -If you write scripts that parse \f[CB]jps\f[R] output, then expect to +\f[V]jps\f[R] output because the format might change in future releases. +If you write scripts that parse \f[V]jps\f[R] output, then expect to modify them for future releases of this tool. .SH EXAMPLES .PP -This section provides examples of the \f[CB]jps\f[R] command. +This section provides examples of the \f[V]jps\f[R] command. .PP List the instrumented JVMs on the local host: .IP .nf \f[CB] jps -18027\ Java2Demo.JAR -18032\ jps -18005\ jstat +18027 Java2Demo.JAR +18032 jps +18005 jstat \f[R] .fi .PP The following example lists the instrumented JVMs on a remote host. -This example assumes that the \f[CB]jstat\f[R] server and either the its -internal RMI registry or a separate external \f[CB]rmiregistry\f[R] +This example assumes that the \f[V]jstat\f[R] server and either the its +internal RMI registry or a separate external \f[V]rmiregistry\f[R] process are running on the remote host on the default port (port -\f[CB]1099\f[R]). +\f[V]1099\f[R]). It also assumes that the local host has appropriate permissions to access the remote host. -This example includes the \f[CB]\-l\f[R] option to output the long form of +This example includes the \f[V]-l\f[R] option to output the long form of the class names or JAR file names. .IP .nf \f[CB] -jps\ \-l\ remote.domain -3002\ /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR -2857\ sun.tools.jstatd.jstatd +jps -l remote.domain +3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR +2857 sun.tools.jstatd.jstatd \f[R] .fi .PP The following example lists the instrumented JVMs on a remote host with a nondefault port for the RMI registry. -This example assumes that the \f[CB]jstatd\f[R] server, with an internal -RMI registry bound to port \f[CB]2002\f[R], is running on the remote host. -This example also uses the \f[CB]\-m\f[R] option to include the arguments -passed to the \f[CB]main\f[R] method of each of the listed Java +This example assumes that the \f[V]jstatd\f[R] server, with an internal +RMI registry bound to port \f[V]2002\f[R], is running on the remote +host. +This example also uses the \f[V]-m\f[R] option to include the arguments +passed to the \f[V]main\f[R] method of each of the listed Java applications. .IP .nf \f[CB] -jps\ \-m\ remote.domain:2002 -3002\ /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR -3102\ sun.tools.jstatd.jstatd\ \-p\ 2002 +jps -m remote.domain:2002 +3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR +3102 sun.tools.jstatd.jstatd -p 2002 \f[R] .fi diff --git a/src/jdk.jcmd/share/man/jstack.1 b/src/jdk.jcmd/share/man/jstack.1 index 3144ebc62afb4..65ac03aee1a3a 100644 --- a/src/jdk.jcmd/share/man/jstack.1 +++ b/src/jdk.jcmd/share/man/jstack.1 @@ -19,65 +19,71 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JSTACK" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JSTACK" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jstack \- print Java stack traces of Java threads for a specified Java +jstack - print Java stack traces of Java threads for a specified Java process .SH SYNOPSIS .PP \f[B]Note:\f[R] This command is experimental and unsupported. .PP -\f[CB]jstack\f[R] [\f[I]options\f[R]] \f[I]pid\f[R] +\f[V]jstack\f[R] [\f[I]options\f[R]] \f[I]pid\f[R] .TP -.B \f[I]options\f[R] -This represents the \f[CB]jstack\f[R] command\-line options. +\f[I]options\f[R] +This represents the \f[V]jstack\f[R] command-line options. See \f[B]Options for the jstack Command\f[R]. -.RS -.RE .TP -.B \f[I]pid\f[R] +\f[I]pid\f[R] The process ID for which the stack trace is printed. The process must be a Java process. To get a list of Java processes running on a machine, use either the -\f[CB]ps\f[R] command or, if the JVM processes are not running in a +\f[V]ps\f[R] command or, if the JVM processes are not running in a separate docker instance, the \f[B]jps\f[R] command. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jstack\f[R] command prints Java stack traces of Java threads for -a specified Java process. +The \f[V]jstack\f[R] command prints Java stack traces of Java threads +for a specified Java process. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed. C++ mangled names aren\[aq]t demangled. To demangle C++ names, the output of this command can be piped to -\f[CB]c++filt\f[R]. -When the specified process is running on a 64\-bit JVM, you might need -to specify the \f[CB]\-J\-d64\f[R] option, for example: -\f[CB]jstack\ \-J\-d64\f[R] \f[I]pid\f[R]. +\f[V]c++filt\f[R]. +When the specified process is running on a 64-bit JVM, you might need to +specify the \f[V]-J-d64\f[R] option, for example: +\f[V]jstack -J-d64\f[R] \f[I]pid\f[R]. .PP \f[B]Note:\f[R] .PP This command is unsupported and might not be available in future releases of the JDK. -In Windows Systems where the \f[CB]dbgeng.dll\f[R] file isn\[aq]t present, -the Debugging Tools for Windows must be installed so that these tools -work. -The \f[CB]PATH\f[R] environment variable needs to contain the location of -the \f[CB]jvm.dll\f[R] that is used by the target process, or the location -from which the core dump file was produced. +In Windows Systems where the \f[V]dbgeng.dll\f[R] file isn\[aq]t +present, the Debugging Tools for Windows must be installed so that these +tools work. +The \f[V]PATH\f[R] environment variable needs to contain the location of +the \f[V]jvm.dll\f[R] that is used by the target process, or the +location from which the core dump file was produced. .SH OPTIONS FOR THE JSTACK COMMAND .TP -.B \f[CB]\-l\f[R] +\f[V]-l\f[R] The long listing option prints additional information about locks. -.RS -.RE .TP -.B \f[CB]\-h\f[R] or \f[CB]\-help\f[R] +\f[V]-h\f[R] or \f[V]-help\f[R] Prints a help message. -.RS -.RE diff --git a/src/jdk.jcmd/share/man/jstat.1 b/src/jdk.jcmd/share/man/jstat.1 index 54e381c994d25..f860ce82061bf 100644 --- a/src/jdk.jcmd/share/man/jstat.1 +++ b/src/jdk.jcmd/share/man/jstat.1 @@ -19,86 +19,87 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JSTAT" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JSTAT" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jstat \- monitor JVM statistics +jstat - monitor JVM statistics .SH SYNOPSIS .PP \f[B]Note:\f[R] This command is experimental and unsupported. .PP -\f[CB]jstat\f[R] \f[I]generalOptions\f[R] +\f[V]jstat\f[R] \f[I]generalOptions\f[R] .PP -\f[CB]jstat\f[R] \f[I]outputOptions\f[R] [\f[CB]\-t\f[R]] [\f[CB]\-h\f[R] +\f[V]jstat\f[R] \f[I]outputOptions\f[R] [\f[V]-t\f[R]] [\f[V]-h\f[R] \f[I]lines\f[R]] \f[I]vmid\f[R] [\f[I]interval\f[R] [\f[I]count\f[R]]] .TP -.B \f[I]generalOptions\f[R] -A single general command\-line option. +\f[I]generalOptions\f[R] +A single general command-line option. See \f[B]General Options\f[R]. -.RS -.RE .TP -.B \f[I]outputOptions\f[R] -An option reported by the \f[CB]\-options\f[R] option. -One or more output options that consist of a single \f[CB]statOption\f[R], -plus any of the \f[CB]\-t\f[R], \f[CB]\-h\f[R], and \f[CB]\-J\f[R] options. +\f[I]outputOptions\f[R] +An option reported by the \f[V]-options\f[R] option. +One or more output options that consist of a single +\f[V]statOption\f[R], plus any of the \f[V]-t\f[R], \f[V]-h\f[R], and +\f[V]-J\f[R] options. See \f[B]Output Options for the jstat Command\f[R]. -.RS -.RE .TP -.B \f[CB]\-t\f[R] -Displays a time\-stamp column as the first column of output. +\f[V]-t\f[R] +Displays a time-stamp column as the first column of output. The time stamp is the time since the start time of the target JVM. -.RS -.RE .TP -.B \f[CB]\-h\f[R] \f[I]n\f[R] +\f[V]-h\f[R] \f[I]n\f[R] Displays a column header every \f[I]n\f[R] samples (output rows), where \f[I]n\f[R] is a positive integer. -The default value is \f[CB]0\f[R], which displays the column header of the -first row of data. -.RS -.RE +The default value is \f[V]0\f[R], which displays the column header of +the first row of data. .TP -.B \f[I]vmid\f[R] +\f[I]vmid\f[R] A virtual machine identifier, which is a string that indicates the target JVM. See \f[B]Virtual Machine Identifier\f[R]. -.RS -.RE .TP -.B \f[I]interval\f[R] +\f[I]interval\f[R] The sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds. This must be a positive integer. -When specified, the \f[CB]jstat\f[R] command produces its output at each +When specified, the \f[V]jstat\f[R] command produces its output at each interval. -.RS -.RE .TP -.B \f[I]count\f[R] +\f[I]count\f[R] The number of samples to display. -The default value is infinity, which causes the \f[CB]jstat\f[R] command +The default value is infinity, which causes the \f[V]jstat\f[R] command to display statistics until the target JVM terminates or the -\f[CB]jstat\f[R] command is terminated. +\f[V]jstat\f[R] command is terminated. This value must be a positive integer. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jstat\f[R] command displays performance statistics for an +The \f[V]jstat\f[R] command displays performance statistics for an instrumented Java HotSpot VM. The target JVM is identified by its virtual machine identifier, or -\f[CB]vmid\f[R] option. +\f[V]vmid\f[R] option. .PP -The \f[CB]jstat\f[R] command supports two types of options, general +The \f[V]jstat\f[R] command supports two types of options, general options and output options. -General options cause the \f[CB]jstat\f[R] command to display simple usage -and version information. +General options cause the \f[V]jstat\f[R] command to display simple +usage and version information. Output options determine the content and format of the statistical output. .PP @@ -109,36 +110,32 @@ future releases. If you specify one of the general options, then you can\[aq]t specify any other option or parameter. .TP -.B \f[CB]\-help\f[R] +\f[V]-help\f[R] Displays a help message. -.RS -.RE .TP -.B \f[CB]\-options\f[R] +\f[V]-options\f[R] Displays a list of static options. See \f[B]Output Options for the jstat Command\f[R]. -.RS -.RE .SH OUTPUT OPTIONS FOR THE JSTAT COMMAND .PP If you don\[aq]t specify a general option, then you can specify output options. -Output options determine the content and format of the \f[CB]jstat\f[R] -command\[aq]s output, and consist of a single \f[CB]statOption\f[R], plus -any of the other output options (\f[CB]\-h\f[R], \f[CB]\-t\f[R], and -\f[CB]\-J\f[R]). -The \f[CB]statOption\f[R] must come first. +Output options determine the content and format of the \f[V]jstat\f[R] +command\[aq]s output, and consist of a single \f[V]statOption\f[R], plus +any of the other output options (\f[V]-h\f[R], \f[V]-t\f[R], and +\f[V]-J\f[R]). +The \f[V]statOption\f[R] must come first. .PP Output is formatted as a table, with columns that are separated by spaces. A header row with titles describes the columns. -Use the \f[CB]\-h\f[R] option to set the frequency at which the header is +Use the \f[V]-h\f[R] option to set the frequency at which the header is displayed. Column header names are consistent among the different options. In general, if two options provide a column with the same name, then the data source for the two columns is the same. .PP -Use the \f[CB]\-t\f[R] option to display a time\-stamp column, labeled +Use the \f[V]-t\f[R] option to display a time-stamp column, labeled Timestamp as the first column of output. The Timestamp column contains the elapsed time, in seconds, since the target JVM started. @@ -147,448 +144,438 @@ subject to variation due to delayed thread scheduling on heavily loaded systems. .PP Use the interval and count parameters to determine how frequently and -how many times, respectively, the \f[CB]jstat\f[R] command displays its +how many times, respectively, the \f[V]jstat\f[R] command displays its output. .PP \f[B]Note:\f[R] .PP -Don\[aq]t write scripts to parse the \f[CB]jstat\f[R] command\[aq]s output -because the format might change in future releases. -If you write scripts that parse the \f[CB]jstat\f[R] command output, then +Don\[aq]t write scripts to parse the \f[V]jstat\f[R] command\[aq]s +output because the format might change in future releases. +If you write scripts that parse the \f[V]jstat\f[R] command output, then expect to modify them for future releases of this tool. .TP -.B \f[CB]\-statOption\f[R] -Determines the statistics information that the \f[CB]jstat\f[R] command +\f[V]-statOption\f[R] +Determines the statistics information that the \f[V]jstat\f[R] command displays. The following lists the available options. -Use the \f[CB]\-options\f[R] general option to display the list of options +Use the \f[V]-options\f[R] general option to display the list of options for a particular platform installation. See \f[B]Stat Options and Output\f[R]. .RS .PP -\f[CB]class\f[R]: Displays statistics about the behavior of the class +\f[V]class\f[R]: Displays statistics about the behavior of the class loader. .PP -\f[CB]compiler\f[R]: Displays statistics about the behavior of the Java -HotSpot VM Just\-in\-Time compiler. +\f[V]compiler\f[R]: Displays statistics about the behavior of the Java +HotSpot VM Just-in-Time compiler. .PP -\f[CB]gc\f[R]: Displays statistics about the behavior of the garbage +\f[V]gc\f[R]: Displays statistics about the behavior of the garbage collected heap. .PP -\f[CB]gccapacity\f[R]: Displays statistics about the capacities of the +\f[V]gccapacity\f[R]: Displays statistics about the capacities of the generations and their corresponding spaces. .PP -\f[CB]gccause\f[R]: Displays a summary about garbage collection statistics -(same as \f[CB]\-gcutil\f[R]), with the cause of the last and current -(when applicable) garbage collection events. +\f[V]gccause\f[R]: Displays a summary about garbage collection +statistics (same as \f[V]-gcutil\f[R]), with the cause of the last and +current (when applicable) garbage collection events. .PP -\f[CB]gcnew\f[R]: Displays statistics about the behavior of the new +\f[V]gcnew\f[R]: Displays statistics about the behavior of the new generation. .PP -\f[CB]gcnewcapacity\f[R]: Displays statistics about the sizes of the new +\f[V]gcnewcapacity\f[R]: Displays statistics about the sizes of the new generations and their corresponding spaces. .PP -\f[CB]gcold\f[R]: Displays statistics about the behavior of the old +\f[V]gcold\f[R]: Displays statistics about the behavior of the old generation and metaspace statistics. .PP -\f[CB]gcoldcapacity\f[R]: Displays statistics about the sizes of the old +\f[V]gcoldcapacity\f[R]: Displays statistics about the sizes of the old generation. .PP -\f[CB]gcmetacapacity\f[R]: Displays statistics about the sizes of the +\f[V]gcmetacapacity\f[R]: Displays statistics about the sizes of the metaspace. .PP -\f[CB]gcutil\f[R]: Displays a summary about garbage collection statistics. +\f[V]gcutil\f[R]: Displays a summary about garbage collection +statistics. .PP -\f[CB]printcompilation\f[R]: Displays Java HotSpot VM compilation method +\f[V]printcompilation\f[R]: Displays Java HotSpot VM compilation method statistics. .RE .TP -.B \f[CB]\-J\f[R]\f[I]javaOption\f[R] +\f[V]-J\f[R]\f[I]javaOption\f[R] Passes \f[I]javaOption\f[R] to the Java application launcher. -For example, \f[CB]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB. For a complete list of options, see \f[B]java\f[R]. -.RS -.RE .SH STAT OPTIONS AND OUTPUT .PP -The following information summarizes the columns that the \f[CB]jstat\f[R] -command outputs for each \f[I]statOption\f[R]. +The following information summarizes the columns that the +\f[V]jstat\f[R] command outputs for each \f[I]statOption\f[R]. .TP -.B \f[CB]\-class\f[R] \f[I]option\f[R] +\f[V]-class\f[R] \f[I]option\f[R] Class loader statistics. .RS .PP -\f[CB]Loaded\f[R]: Number of classes loaded. +\f[V]Loaded\f[R]: Number of classes loaded. .PP -\f[CB]Bytes\f[R]: Number of KB loaded. +\f[V]Bytes\f[R]: Number of KB loaded. .PP -\f[CB]Unloaded\f[R]: Number of classes unloaded. +\f[V]Unloaded\f[R]: Number of classes unloaded. .PP -\f[CB]Bytes\f[R]: Number of KB unloaded. +\f[V]Bytes\f[R]: Number of KB unloaded. .PP -\f[CB]Time\f[R]: Time spent performing class loading and unloading +\f[V]Time\f[R]: Time spent performing class loading and unloading operations. .RE .TP -.B \f[CB]\-compiler\f[R] \f[I]option\f[R] -Java HotSpot VM Just\-in\-Time compiler statistics. +\f[V]-compiler\f[R] \f[I]option\f[R] +Java HotSpot VM Just-in-Time compiler statistics. .RS .PP -\f[CB]Compiled\f[R]: Number of compilation tasks performed. +\f[V]Compiled\f[R]: Number of compilation tasks performed. .PP -\f[CB]Failed\f[R]: Number of compilations tasks failed. +\f[V]Failed\f[R]: Number of compilations tasks failed. .PP -\f[CB]Invalid\f[R]: Number of compilation tasks that were invalidated. +\f[V]Invalid\f[R]: Number of compilation tasks that were invalidated. .PP -\f[CB]Time\f[R]: Time spent performing compilation tasks. +\f[V]Time\f[R]: Time spent performing compilation tasks. .PP -\f[CB]FailedType\f[R]: Compile type of the last failed compilation. +\f[V]FailedType\f[R]: Compile type of the last failed compilation. .PP -\f[CB]FailedMethod\f[R]: Class name and method of the last failed +\f[V]FailedMethod\f[R]: Class name and method of the last failed compilation. .RE .TP -.B \f[CB]\-gc\f[R] \f[I]option\f[R] +\f[V]-gc\f[R] \f[I]option\f[R] Garbage collected heap statistics. .RS .PP -\f[CB]S0C\f[R]: Current survivor space 0 capacity (KB). +\f[V]S0C\f[R]: Current survivor space 0 capacity (KB). .PP -\f[CB]S1C\f[R]: Current survivor space 1 capacity (KB). +\f[V]S1C\f[R]: Current survivor space 1 capacity (KB). .PP -\f[CB]S0U\f[R]: Survivor space 0 utilization (KB). +\f[V]S0U\f[R]: Survivor space 0 utilization (KB). .PP -\f[CB]S1U\f[R]: Survivor space 1 utilization (KB). +\f[V]S1U\f[R]: Survivor space 1 utilization (KB). .PP -\f[CB]EC\f[R]: Current eden space capacity (KB). +\f[V]EC\f[R]: Current eden space capacity (KB). .PP -\f[CB]EU\f[R]: Eden space utilization (KB). +\f[V]EU\f[R]: Eden space utilization (KB). .PP -\f[CB]OC\f[R]: Current old space capacity (KB). +\f[V]OC\f[R]: Current old space capacity (KB). .PP -\f[CB]OU\f[R]: Old space utilization (KB). +\f[V]OU\f[R]: Old space utilization (KB). .PP -\f[CB]MC\f[R]: Metaspace Committed Size (KB). +\f[V]MC\f[R]: Metaspace Committed Size (KB). .PP -\f[CB]MU\f[R]: Metaspace utilization (KB). +\f[V]MU\f[R]: Metaspace utilization (KB). .PP -\f[CB]CCSC\f[R]: Compressed class committed size (KB). +\f[V]CCSC\f[R]: Compressed class committed size (KB). .PP -\f[CB]CCSU\f[R]: Compressed class space used (KB). +\f[V]CCSU\f[R]: Compressed class space used (KB). .PP -\f[CB]YGC\f[R]: Number of young generation garbage collection (GC) events. +\f[V]YGC\f[R]: Number of young generation garbage collection (GC) +events. .PP -\f[CB]YGCT\f[R]: Young generation garbage collection time. +\f[V]YGCT\f[R]: Young generation garbage collection time. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .PP -\f[CB]FGCT\f[R]: Full garbage collection time. +\f[V]FGCT\f[R]: Full garbage collection time. .PP -\f[CB]GCT\f[R]: Total garbage collection time. +\f[V]GCT\f[R]: Total garbage collection time. .RE .TP -.B \f[CB]\-gccapacity\f[R] \f[I]option\f[R] +\f[V]-gccapacity\f[R] \f[I]option\f[R] Memory pool generation and space capacities. .RS .PP -\f[CB]NGCMN\f[R]: Minimum new generation capacity (KB). +\f[V]NGCMN\f[R]: Minimum new generation capacity (KB). .PP -\f[CB]NGCMX\f[R]: Maximum new generation capacity (KB). +\f[V]NGCMX\f[R]: Maximum new generation capacity (KB). .PP -\f[CB]NGC\f[R]: Current new generation capacity (KB). +\f[V]NGC\f[R]: Current new generation capacity (KB). .PP -\f[CB]S0C\f[R]: Current survivor space 0 capacity (KB). +\f[V]S0C\f[R]: Current survivor space 0 capacity (KB). .PP -\f[CB]S1C\f[R]: Current survivor space 1 capacity (KB). +\f[V]S1C\f[R]: Current survivor space 1 capacity (KB). .PP -\f[CB]EC\f[R]: Current eden space capacity (KB). +\f[V]EC\f[R]: Current eden space capacity (KB). .PP -\f[CB]OGCMN\f[R]: Minimum old generation capacity (KB). +\f[V]OGCMN\f[R]: Minimum old generation capacity (KB). .PP -\f[CB]OGCMX\f[R]: Maximum old generation capacity (KB). +\f[V]OGCMX\f[R]: Maximum old generation capacity (KB). .PP -\f[CB]OGC\f[R]: Current old generation capacity (KB). +\f[V]OGC\f[R]: Current old generation capacity (KB). .PP -\f[CB]OC\f[R]: Current old space capacity (KB). +\f[V]OC\f[R]: Current old space capacity (KB). .PP -\f[CB]MCMN\f[R]: Minimum metaspace capacity (KB). +\f[V]MCMN\f[R]: Minimum metaspace capacity (KB). .PP -\f[CB]MCMX\f[R]: Maximum metaspace capacity (KB). +\f[V]MCMX\f[R]: Maximum metaspace capacity (KB). .PP -\f[CB]MC\f[R]: Metaspace Committed Size (KB). +\f[V]MC\f[R]: Metaspace Committed Size (KB). .PP -\f[CB]CCSMN\f[R]: Compressed class space minimum capacity (KB). +\f[V]CCSMN\f[R]: Compressed class space minimum capacity (KB). .PP -\f[CB]CCSMX\f[R]: Compressed class space maximum capacity (KB). +\f[V]CCSMX\f[R]: Compressed class space maximum capacity (KB). .PP -\f[CB]CCSC\f[R]: Compressed class committed size (KB). +\f[V]CCSC\f[R]: Compressed class committed size (KB). .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .RE .TP -.B \f[CB]\-gccause\f[R] \f[I]option\f[R] +\f[V]-gccause\f[R] \f[I]option\f[R] This option displays the same summary of garbage collection statistics -as the \f[CB]\-gcutil\f[R] option, but includes the causes of the last +as the \f[V]-gcutil\f[R] option, but includes the causes of the last garbage collection event and (when applicable), the current garbage collection event. -In addition to the columns listed for \f[CB]\-gcutil\f[R], this option +In addition to the columns listed for \f[V]-gcutil\f[R], this option adds the following columns: .RS .PP -\f[CB]LGCC\f[R]: Cause of last garbage collection +\f[V]LGCC\f[R]: Cause of last garbage collection .PP -\f[CB]GCC\f[R]: Cause of current garbage collection +\f[V]GCC\f[R]: Cause of current garbage collection .RE .TP -.B \f[CB]\-gcnew\f[R] \f[I]option\f[R] +\f[V]-gcnew\f[R] \f[I]option\f[R] New generation statistics. .RS .PP -\f[CB]S0C\f[R]: Current survivor space 0 capacity (KB). +\f[V]S0C\f[R]: Current survivor space 0 capacity (KB). .PP -\f[CB]S1C\f[R]: Current survivor space 1 capacity (KB). +\f[V]S1C\f[R]: Current survivor space 1 capacity (KB). .PP -\f[CB]S0U\f[R]: Survivor space 0 utilization (KB). +\f[V]S0U\f[R]: Survivor space 0 utilization (KB). .PP -\f[CB]S1U\f[R]: Survivor space 1 utilization (KB). +\f[V]S1U\f[R]: Survivor space 1 utilization (KB). .PP -\f[CB]TT\f[R]: Tenuring threshold. +\f[V]TT\f[R]: Tenuring threshold. .PP -\f[CB]MTT\f[R]: Maximum tenuring threshold. +\f[V]MTT\f[R]: Maximum tenuring threshold. .PP -\f[CB]DSS\f[R]: Desired survivor size (KB). +\f[V]DSS\f[R]: Desired survivor size (KB). .PP -\f[CB]EC\f[R]: Current eden space capacity (KB). +\f[V]EC\f[R]: Current eden space capacity (KB). .PP -\f[CB]EU\f[R]: Eden space utilization (KB). +\f[V]EU\f[R]: Eden space utilization (KB). .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]YGCT\f[R]: Young generation garbage collection time. +\f[V]YGCT\f[R]: Young generation garbage collection time. .RE .TP -.B \f[CB]\-gcnewcapacity\f[R] \f[I]option\f[R] +\f[V]-gcnewcapacity\f[R] \f[I]option\f[R] New generation space size statistics. .RS .PP -\f[CB]NGCMN\f[R]: Minimum new generation capacity (KB). +\f[V]NGCMN\f[R]: Minimum new generation capacity (KB). .PP -\f[CB]NGCMX\f[R]: Maximum new generation capacity (KB). +\f[V]NGCMX\f[R]: Maximum new generation capacity (KB). .PP -\f[CB]NGC\f[R]: Current new generation capacity (KB). +\f[V]NGC\f[R]: Current new generation capacity (KB). .PP -\f[CB]S0CMX\f[R]: Maximum survivor space 0 capacity (KB). +\f[V]S0CMX\f[R]: Maximum survivor space 0 capacity (KB). .PP -\f[CB]S0C\f[R]: Current survivor space 0 capacity (KB). +\f[V]S0C\f[R]: Current survivor space 0 capacity (KB). .PP -\f[CB]S1CMX\f[R]: Maximum survivor space 1 capacity (KB). +\f[V]S1CMX\f[R]: Maximum survivor space 1 capacity (KB). .PP -\f[CB]S1C\f[R]: Current survivor space 1 capacity (KB). +\f[V]S1C\f[R]: Current survivor space 1 capacity (KB). .PP -\f[CB]ECMX\f[R]: Maximum eden space capacity (KB). +\f[V]ECMX\f[R]: Maximum eden space capacity (KB). .PP -\f[CB]EC\f[R]: Current eden space capacity (KB). +\f[V]EC\f[R]: Current eden space capacity (KB). .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .RE .TP -.B \f[CB]\-gcold\f[R] \f[I]option\f[R] +\f[V]-gcold\f[R] \f[I]option\f[R] Old generation size statistics. .RS .PP -\f[CB]MC\f[R]: Metaspace Committed Size (KB). +\f[V]MC\f[R]: Metaspace Committed Size (KB). .PP -\f[CB]MU\f[R]: Metaspace utilization (KB). +\f[V]MU\f[R]: Metaspace utilization (KB). .PP -\f[CB]CCSC\f[R]: Compressed class committed size (KB). +\f[V]CCSC\f[R]: Compressed class committed size (KB). .PP -\f[CB]CCSU\f[R]: Compressed class space used (KB). +\f[V]CCSU\f[R]: Compressed class space used (KB). .PP -\f[CB]OC\f[R]: Current old space capacity (KB). +\f[V]OC\f[R]: Current old space capacity (KB). .PP -\f[CB]OU\f[R]: Old space utilization (KB). +\f[V]OU\f[R]: Old space utilization (KB). .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .PP -\f[CB]FGCT\f[R]: Full garbage collection time. +\f[V]FGCT\f[R]: Full garbage collection time. .PP -\f[CB]GCT\f[R]: Total garbage collection time. +\f[V]GCT\f[R]: Total garbage collection time. .RE .TP -.B \f[CB]\-gcoldcapacity\f[R] \f[I]option\f[R] +\f[V]-gcoldcapacity\f[R] \f[I]option\f[R] Old generation statistics. .RS .PP -\f[CB]OGCMN\f[R]: Minimum old generation capacity (KB). +\f[V]OGCMN\f[R]: Minimum old generation capacity (KB). .PP -\f[CB]OGCMX\f[R]: Maximum old generation capacity (KB). +\f[V]OGCMX\f[R]: Maximum old generation capacity (KB). .PP -\f[CB]OGC\f[R]: Current old generation capacity (KB). +\f[V]OGC\f[R]: Current old generation capacity (KB). .PP -\f[CB]OC\f[R]: Current old space capacity (KB). +\f[V]OC\f[R]: Current old space capacity (KB). .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .PP -\f[CB]FGCT\f[R]: Full garbage collection time. +\f[V]FGCT\f[R]: Full garbage collection time. .PP -\f[CB]GCT\f[R]: Total garbage collection time. +\f[V]GCT\f[R]: Total garbage collection time. .RE .TP -.B \f[CB]\-gcmetacapacity\f[R] \f[I]option\f[R] +\f[V]-gcmetacapacity\f[R] \f[I]option\f[R] Metaspace size statistics. .RS .PP -\f[CB]MCMN\f[R]: Minimum metaspace capacity (KB). +\f[V]MCMN\f[R]: Minimum metaspace capacity (KB). .PP -\f[CB]MCMX\f[R]: Maximum metaspace capacity (KB). +\f[V]MCMX\f[R]: Maximum metaspace capacity (KB). .PP -\f[CB]MC\f[R]: Metaspace Committed Size (KB). +\f[V]MC\f[R]: Metaspace Committed Size (KB). .PP -\f[CB]CCSMN\f[R]: Compressed class space minimum capacity (KB). +\f[V]CCSMN\f[R]: Compressed class space minimum capacity (KB). .PP -\f[CB]CCSMX\f[R]: Compressed class space maximum capacity (KB). +\f[V]CCSMX\f[R]: Compressed class space maximum capacity (KB). .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .PP -\f[CB]FGCT\f[R]: Full garbage collection time. +\f[V]FGCT\f[R]: Full garbage collection time. .PP -\f[CB]GCT\f[R]: Total garbage collection time. +\f[V]GCT\f[R]: Total garbage collection time. .RE .TP -.B \f[CB]\-gcutil\f[R] \f[I]option\f[R] +\f[V]-gcutil\f[R] \f[I]option\f[R] Summary of garbage collection statistics. .RS .PP -\f[CB]S0\f[R]: Survivor space 0 utilization as a percentage of the +\f[V]S0\f[R]: Survivor space 0 utilization as a percentage of the space\[aq]s current capacity. .PP -\f[CB]S1\f[R]: Survivor space 1 utilization as a percentage of the +\f[V]S1\f[R]: Survivor space 1 utilization as a percentage of the space\[aq]s current capacity. .PP -\f[CB]E\f[R]: Eden space utilization as a percentage of the space\[aq]s +\f[V]E\f[R]: Eden space utilization as a percentage of the space\[aq]s current capacity. .PP -\f[CB]O\f[R]: Old space utilization as a percentage of the space\[aq]s +\f[V]O\f[R]: Old space utilization as a percentage of the space\[aq]s current capacity. .PP -\f[CB]M\f[R]: Metaspace utilization as a percentage of the space\[aq]s +\f[V]M\f[R]: Metaspace utilization as a percentage of the space\[aq]s current capacity. .PP -\f[CB]CCS\f[R]: Compressed class space utilization as a percentage. +\f[V]CCS\f[R]: Compressed class space utilization as a percentage. .PP -\f[CB]YGC\f[R]: Number of young generation GC events. +\f[V]YGC\f[R]: Number of young generation GC events. .PP -\f[CB]YGCT\f[R]: Young generation garbage collection time. +\f[V]YGCT\f[R]: Young generation garbage collection time. .PP -\f[CB]FGC\f[R]: Number of full GC events. +\f[V]FGC\f[R]: Number of full GC events. .PP -\f[CB]FGCT\f[R]: Full garbage collection time. +\f[V]FGCT\f[R]: Full garbage collection time. .PP -\f[CB]GCT\f[R]: Total garbage collection time. +\f[V]GCT\f[R]: Total garbage collection time. .RE .TP -.B \f[CB]\-printcompilation\f[R] \f[I]option\f[R] +\f[V]-printcompilation\f[R] \f[I]option\f[R] Java HotSpot VM compiler method statistics. .RS .PP -\f[CB]Compiled\f[R]: Number of compilation tasks performed by the most +\f[V]Compiled\f[R]: Number of compilation tasks performed by the most recently compiled method. .PP -\f[CB]Size\f[R]: Number of bytes of byte code of the most recently +\f[V]Size\f[R]: Number of bytes of byte code of the most recently compiled method. .PP -\f[CB]Type\f[R]: Compilation type of the most recently compiled method. +\f[V]Type\f[R]: Compilation type of the most recently compiled method. .PP -\f[CB]Method\f[R]: Class name and method name identifying the most +\f[V]Method\f[R]: Class name and method name identifying the most recently compiled method. -Class name uses a slash (/) instead of a dot (.) as a name space -separator. +Class name uses a slash (/) instead of a dot (.) +as a name space separator. The method name is the method within the specified class. The format for these two fields is consistent with the HotSpot -\f[CB]\-XX:+PrintCompilation\f[R] option. +\f[V]-XX:+PrintCompilation\f[R] option. .RE .SH VIRTUAL MACHINE IDENTIFIER .PP -The syntax of the \f[CB]vmid\f[R] string corresponds to the syntax of a +The syntax of the \f[V]vmid\f[R] string corresponds to the syntax of a URI: .RS .PP -[\f[I]protocol\f[R]\f[CB]:\f[R]][\f[CB]//\f[R]]\f[I]lvmid\f[R][\f[CB]\@\f[R]\f[I]hostname\f[R][\f[CB]:\f[R]\f[I]port\f[R]][\f[CB]/\f[R]\f[I]servername\f[R]] +[\f[I]protocol\f[R]\f[V]:\f[R]][\f[V]//\f[R]]\f[I]lvmid\f[R][\f[V]\[at]\f[R]\f[I]hostname\f[R][\f[V]:\f[R]\f[I]port\f[R]][\f[V]/\f[R]\f[I]servername\f[R]] .RE .PP -The syntax of the \f[CB]vmid\f[R] string corresponds to the syntax of a +The syntax of the \f[V]vmid\f[R] string corresponds to the syntax of a URI. -The \f[CB]vmid\f[R] string can vary from a simple integer that represents +The \f[V]vmid\f[R] string can vary from a simple integer that represents a local JVM to a more complex construction that specifies a -communications protocol, port number, and other implementation\-specific +communications protocol, port number, and other implementation-specific values. .TP -.B \f[I]protocol\f[R] +\f[I]protocol\f[R] The communications protocol. If the \f[I]protocol\f[R] value is omitted and a host name isn\[aq]t -specified, then the default protocol is a platform\-specific optimized +specified, then the default protocol is a platform-specific optimized local protocol. If the \f[I]protocol\f[R] value is omitted and a host name is specified, -then the default protocol is \f[CB]rmi\f[R]. -.RS -.RE +then the default protocol is \f[V]rmi\f[R]. .TP -.B \f[I]lvmid\f[R] +\f[I]lvmid\f[R] The local virtual machine identifier for the target JVM. -The \f[I]lvmid\f[R] is a platform\-specific value that uniquely +The \f[I]lvmid\f[R] is a platform-specific value that uniquely identifies a JVM on a system. The \f[I]lvmid\f[R] is the only required component of a virtual machine identifier. The \f[I]lvmid\f[R] is typically, but not necessarily, the operating system\[aq]s process identifier for the target JVM process. -You can use the \f[CB]jps\f[R] command to determine the \f[I]lvmid\f[R] +You can use the \f[V]jps\f[R] command to determine the \f[I]lvmid\f[R] provided the JVM processes is not running in a separate docker instance. You can also determine the \f[I]lvmid\f[R] on Linux and OS X platforms -with the \f[CB]ps\f[R] command, and on Windows with the Windows Task +with the \f[V]ps\f[R] command, and on Windows with the Windows Task Manager. -.RS -.RE .TP -.B \f[I]hostname\f[R] +\f[I]hostname\f[R] A host name or IP address that indicates the target host. If the \f[I]hostname\f[R] value is omitted, then the target host is the local host. -.RS -.RE .TP -.B \f[I]port\f[R] +\f[I]port\f[R] The default port for communicating with the remote server. -If the \f[I]hostname\f[R] value is omitted or the \f[I]protocol\f[R] value -specifies an optimized, local protocol, then the \f[I]port\f[R] value is -ignored. +If the \f[I]hostname\f[R] value is omitted or the \f[I]protocol\f[R] +value specifies an optimized, local protocol, then the \f[I]port\f[R] +value is ignored. Otherwise, treatment of the \f[I]port\f[R] parameter is -implementation\-specific. -For the default \f[CB]rmi\f[R] protocol, the port value indicates the port -number for the \f[CB]rmiregistry\f[R] on the remote host. +implementation-specific. +For the default \f[V]rmi\f[R] protocol, the port value indicates the +port number for the \f[V]rmiregistry\f[R] on the remote host. If the \f[I]port\f[R] value is omitted and the \f[I]protocol\f[R] value -indicates \f[CB]rmi\f[R], then the default rmiregistry port (1099) is +indicates \f[V]rmi\f[R], then the default rmiregistry port (1099) is used. -.RS -.RE .TP -.B \f[I]servername\f[R] +\f[I]servername\f[R] The treatment of the \f[I]servername\f[R] parameter depends on implementation. For the optimized local protocol, this field is ignored. -For the \f[CB]rmi\f[R] protocol, it represents the name of the RMI remote +For the \f[V]rmi\f[R] protocol, it represents the name of the RMI remote object on the remote host. -.RS -.RE .SH EXAMPLES .PP This section presents some examples of monitoring a local JVM with an @@ -597,7 +584,7 @@ This section presents some examples of monitoring a local JVM with an .PP This example attaches to lvmid 21891 and takes 7 samples at 250 millisecond intervals and displays the output as specified by the -\f[CB]\-gcutil\f[R] option. +\f[V]-gcutil\f[R] option. .PP The output of this example shows that a young generation collection occurred between the third and fourth sample. @@ -609,23 +596,23 @@ this collection it\[aq]s 91.03% utilized. .IP .nf \f[CB] -jstat\ \-gcutil\ 21891\ 250\ 7 -\ \ S0\ \ \ \ \ S1\ \ \ \ \ E\ \ \ \ \ \ O\ \ \ \ \ \ M\ \ \ \ \ CCS\ \ \ \ YGC\ \ \ \ \ YGCT\ \ \ \ FGC\ \ \ \ FGCT\ \ \ \ \ GCT -\ \ 0.00\ \ 97.02\ \ 70.31\ \ 66.80\ \ 95.52\ \ 89.14\ \ \ \ \ \ 7\ \ \ \ 0.300\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.300 -\ \ 0.00\ \ 97.02\ \ 86.23\ \ 66.80\ \ 95.52\ \ 89.14\ \ \ \ \ \ 7\ \ \ \ 0.300\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.300 -\ \ 0.00\ \ 97.02\ \ 96.53\ \ 66.80\ \ 95.52\ \ 89.14\ \ \ \ \ \ 7\ \ \ \ 0.300\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.300 -\ 91.03\ \ \ 0.00\ \ \ 1.98\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378 -\ 91.03\ \ \ 0.00\ \ 15.82\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378 -\ 91.03\ \ \ 0.00\ \ 17.80\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378 -\ 91.03\ \ \ 0.00\ \ 17.80\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378 +jstat -gcutil 21891 250 7 + S0 S1 E O M CCS YGC YGCT FGC FGCT GCT + 0.00 97.02 70.31 66.80 95.52 89.14 7 0.300 0 0.000 0.300 + 0.00 97.02 86.23 66.80 95.52 89.14 7 0.300 0 0.000 0.300 + 0.00 97.02 96.53 66.80 95.52 89.14 7 0.300 0 0.000 0.300 + 91.03 0.00 1.98 68.19 95.89 91.24 8 0.378 0 0.000 0.378 + 91.03 0.00 15.82 68.19 95.89 91.24 8 0.378 0 0.000 0.378 + 91.03 0.00 17.80 68.19 95.89 91.24 8 0.378 0 0.000 0.378 + 91.03 0.00 17.80 68.19 95.89 91.24 8 0.378 0 0.000 0.378 \f[R] .fi .SH REPEAT THE COLUMN HEADER STRING .PP This example attaches to lvmid 21891 and takes samples at 250 millisecond intervals and displays the output as specified by -\f[CB]\-gcnew\f[R] option. -In addition, it uses the \f[CB]\-h3\f[R] option to output the column +\f[V]-gcnew\f[R] option. +In addition, it uses the \f[V]-h3\f[R] option to output the column header after every 3 lines of data. .PP In addition to showing the repeating header string, this example shows @@ -642,61 +629,61 @@ threshold to 31. .IP .nf \f[CB] -jstat\ \-gcnew\ \-h3\ 21891\ 250 -\ S0C\ \ \ \ S1C\ \ \ \ S0U\ \ \ \ S1U\ \ \ TT\ MTT\ \ DSS\ \ \ \ \ \ EC\ \ \ \ \ \ \ EU\ \ \ \ \ YGC\ \ \ \ \ YGCT -\ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 31.7\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 178.6\ \ \ \ 249\ \ \ \ 0.203 -\ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 31.7\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 355.5\ \ \ \ 249\ \ \ \ 0.203 -\ \ 64.0\ \ \ 64.0\ \ \ 35.4\ \ \ \ 0.0\ \ 2\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ \ 21.9\ \ \ \ 250\ \ \ \ 0.204 -\ S0C\ \ \ \ S1C\ \ \ \ S0U\ \ \ \ S1U\ \ \ TT\ MTT\ \ DSS\ \ \ \ \ \ EC\ \ \ \ \ \ \ EU\ \ \ \ \ YGC\ \ \ \ \ YGCT -\ \ 64.0\ \ \ 64.0\ \ \ 35.4\ \ \ \ 0.0\ \ 2\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 245.9\ \ \ \ 250\ \ \ \ 0.204 -\ \ 64.0\ \ \ 64.0\ \ \ 35.4\ \ \ \ 0.0\ \ 2\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 421.1\ \ \ \ 250\ \ \ \ 0.204 -\ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 19.0\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ \ 84.4\ \ \ \ 251\ \ \ \ 0.204 -\ S0C\ \ \ \ S1C\ \ \ \ S0U\ \ \ \ S1U\ \ \ TT\ MTT\ \ DSS\ \ \ \ \ \ EC\ \ \ \ \ \ \ EU\ \ \ \ \ YGC\ \ \ \ \ YGCT -\ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 19.0\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 306.7\ \ \ \ 251\ \ \ \ 0.204 +jstat -gcnew -h3 21891 250 + S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + 64.0 64.0 0.0 31.7 31 31 32.0 512.0 178.6 249 0.203 + 64.0 64.0 0.0 31.7 31 31 32.0 512.0 355.5 249 0.203 + 64.0 64.0 35.4 0.0 2 31 32.0 512.0 21.9 250 0.204 + S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + 64.0 64.0 35.4 0.0 2 31 32.0 512.0 245.9 250 0.204 + 64.0 64.0 35.4 0.0 2 31 32.0 512.0 421.1 250 0.204 + 64.0 64.0 0.0 19.0 31 31 32.0 512.0 84.4 251 0.204 + S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + 64.0 64.0 0.0 19.0 31 31 32.0 512.0 306.7 251 0.204 \f[R] .fi .SH INCLUDE A TIME STAMP FOR EACH SAMPLE .PP This example attaches to lvmid 21891 and takes 3 samples at 250 millisecond intervals. -The \f[CB]\-t\f[R] option is used to generate a time stamp for each sample +The \f[V]-t\f[R] option is used to generate a time stamp for each sample in the first column. .PP The Timestamp column reports the elapsed time in seconds since the start of the target JVM. -In addition, the \f[CB]\-gcoldcapacity\f[R] output shows the old +In addition, the \f[V]-gcoldcapacity\f[R] output shows the old generation capacity (OGC) and the old space capacity (OC) increasing as the heap expands to meet allocation or promotion demands. The old generation capacity (OGC) has grown from 11,696 KB to 13,820 KB -after the eighty\-first full garbage collection (FGC). +after the eighty-first full garbage collection (FGC). The maximum capacity of the generation (and space) is 60,544 KB (OGCMX), so it still has room to expand. .IP .nf \f[CB] -Timestamp\ \ \ \ \ \ OGCMN\ \ \ \ OGCMX\ \ \ \ \ OGC\ \ \ \ \ \ \ OC\ \ \ \ \ \ \ YGC\ \ \ FGC\ \ \ \ FGCT\ \ \ \ GCT -\ \ \ \ \ \ \ \ \ \ 150.1\ \ \ 1408.0\ \ 60544.0\ \ 11696.0\ \ 11696.0\ \ \ 194\ \ \ \ 80\ \ \ \ 2.874\ \ \ 3.799 -\ \ \ \ \ \ \ \ \ \ 150.4\ \ \ 1408.0\ \ 60544.0\ \ 13820.0\ \ 13820.0\ \ \ 194\ \ \ \ 81\ \ \ \ 2.938\ \ \ 3.863 -\ \ \ \ \ \ \ \ \ \ 150.7\ \ \ 1408.0\ \ 60544.0\ \ 13820.0\ \ 13820.0\ \ \ 194\ \ \ \ 81\ \ \ \ 2.938\ \ \ 3.863 +Timestamp OGCMN OGCMX OGC OC YGC FGC FGCT GCT + 150.1 1408.0 60544.0 11696.0 11696.0 194 80 2.874 3.799 + 150.4 1408.0 60544.0 13820.0 13820.0 194 81 2.938 3.863 + 150.7 1408.0 60544.0 13820.0 13820.0 194 81 2.938 3.863 \f[R] .fi .SH MONITOR INSTRUMENTATION FOR A REMOTE JVM .PP This example attaches to lvmid 40496 on the system named -\f[CB]remote.domain\f[R] using the \f[CB]\-gcutil\f[R] option, with samples +\f[V]remote.domain\f[R] using the \f[V]-gcutil\f[R] option, with samples taken every second indefinitely. .PP The lvmid is combined with the name of the remote host to construct a -vmid of \f[CB]40496\@remote.domain\f[R]. -This vmid results in the use of the \f[CB]rmi\f[R] protocol to communicate -to the default \f[CB]jstatd\f[R] server on the remote host. -The \f[CB]jstatd\f[R] server is located using the \f[CB]rmiregistry\f[R] -command on \f[CB]remote.domain\f[R] that\[aq]s bound to the default port -of the \f[CB]rmiregistry\f[R] command (port 1099). +vmid of \f[V]40496\[at]remote.domain\f[R]. +This vmid results in the use of the \f[V]rmi\f[R] protocol to +communicate to the default \f[V]jstatd\f[R] server on the remote host. +The \f[V]jstatd\f[R] server is located using the \f[V]rmiregistry\f[R] +command on \f[V]remote.domain\f[R] that\[aq]s bound to the default port +of the \f[V]rmiregistry\f[R] command (port 1099). .IP .nf \f[CB] -jstat\ \-gcutil\ 40496\@remote.domain\ 1000 -\&...\ output\ omitted +jstat -gcutil 40496\[at]remote.domain 1000 +\&... output omitted \f[R] .fi diff --git a/src/jdk.jconsole/share/man/jconsole.1 b/src/jdk.jconsole/share/man/jconsole.1 index 47f65fb8cb673..6d4837bddc6f3 100644 --- a/src/jdk.jconsole/share/man/jconsole.1 +++ b/src/jdk.jconsole/share/man/jconsole.1 @@ -19,84 +19,86 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JCONSOLE" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JCONSOLE" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jconsole \- start a graphical console to monitor and manage Java +jconsole - start a graphical console to monitor and manage Java applications .SH SYNOPSIS .PP -\f[CB]jconsole\f[R] [\f[CB]\-interval=\f[R]\f[I]n\f[R]] [\f[CB]\-notile\f[R]] -[\f[CB]\-plugin\f[R] \f[I]path\f[R]] [\f[CB]\-version\f[R]] +\f[V]jconsole\f[R] [\f[V]-interval=\f[R]\f[I]n\f[R]] [\f[V]-notile\f[R]] +[\f[V]-plugin\f[R] \f[I]path\f[R]] [\f[V]-version\f[R]] [\f[I]connection\f[R] ... -] [\f[CB]\-J\f[R]\f[I]input_arguments\f[R]] +] [\f[V]-J\f[R]\f[I]input_arguments\f[R]] .PP -\f[CB]jconsole\f[R] \f[CB]\-help\f[R] +\f[V]jconsole\f[R] \f[V]-help\f[R] .SH OPTIONS .TP -.B \f[CB]\-interval\f[R] -Sets the update interval to \f[CB]n\f[R] seconds (default is 4 seconds). -.RS -.RE +\f[V]-interval\f[R] +Sets the update interval to \f[V]n\f[R] seconds (default is 4 seconds). .TP -.B \f[CB]\-notile\f[R] +\f[V]-notile\f[R] Doesn\[aq]t tile the windows for two or more connections. -.RS -.RE .TP -.B \f[CB]\-pluginpath\f[R] \f[I]path\f[R] -Specifies the path that \f[CB]jconsole\f[R] uses to look up plug\-ins. -The plug\-in \f[I]path\f[R] should contain a provider\-configuration file -named \f[CB]META\-INF/services/com.sun.tools.jconsole.JConsolePlugin\f[R] -that contains one line for each plug\-in. +\f[V]-pluginpath\f[R] \f[I]path\f[R] +Specifies the path that \f[V]jconsole\f[R] uses to look up plug-ins. +The plug-in \f[I]path\f[R] should contain a provider-configuration file +named \f[V]META-INF/services/com.sun.tools.jconsole.JConsolePlugin\f[R] +that contains one line for each plug-in. The line specifies the fully qualified class name of the class -implementing the \f[CB]com.sun.tools.jconsole.JConsolePlugin\f[R] class. -.RS -.RE +implementing the \f[V]com.sun.tools.jconsole.JConsolePlugin\f[R] class. .TP -.B \f[CB]\-version\f[R] +\f[V]-version\f[R] Prints the program version. -.RS -.RE .TP -.B \f[I]connection\f[R] = \f[I]pid\f[R] | \f[I]host\f[R]\f[CB]:\f[R]\f[I]port\f[R] | \f[I]jmxURL\f[R] +\f[I]connection\f[R] = \f[I]pid\f[R] | \f[I]host\f[R]\f[V]:\f[R]\f[I]port\f[R] | \f[I]jmxURL\f[R] A connection is described by either \f[I]pid\f[R], -\f[I]host\f[R]\f[CB]:\f[R]\f[I]port\f[R] or \f[I]jmxURL\f[R]. +\f[I]host\f[R]\f[V]:\f[R]\f[I]port\f[R] or \f[I]jmxURL\f[R]. .RS .IP \[bu] 2 The \f[I]pid\f[R] value is the process ID of a target process. The JVM must be running with the same user ID as the user ID running the -\f[CB]jconsole\f[R] command. +\f[V]jconsole\f[R] command. .IP \[bu] 2 -The \f[I]host\f[R]\f[CB]:\f[R]\f[I]port\f[R] values are the name of the host -system on which the JVM is running, and the port number specified by the -system property \f[CB]com.sun.management.jmxremote.port\f[R] when the JVM -was started. +The \f[I]host\f[R]\f[V]:\f[R]\f[I]port\f[R] values are the name of the +host system on which the JVM is running, and the port number specified +by the system property \f[V]com.sun.management.jmxremote.port\f[R] when +the JVM was started. .IP \[bu] 2 The \f[I]jmxUrl\f[R] value is the address of the JMX agent to be connected to as described in JMXServiceURL. .RE .TP -.B \f[CB]\-J\f[R]\f[I]input_arguments\f[R] +\f[V]-J\f[R]\f[I]input_arguments\f[R] Passes \f[I]input_arguments\f[R] to the JVM on which the -\f[CB]jconsole\f[R] command is run. -.RS -.RE +\f[V]jconsole\f[R] command is run. .TP -.B \f[CB]\-help\f[R] or \f[CB]\-\-help\f[R] +\f[V]-help\f[R] or \f[V]--help\f[R] Displays the help message for the command. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jconsole\f[R] command starts a graphical console tool that lets +The \f[V]jconsole\f[R] command starts a graphical console tool that lets you monitor and manage Java applications and virtual machines on a local or remote machine. .PP -On Windows, the \f[CB]jconsole\f[R] command doesn\[aq]t associate with a +On Windows, the \f[V]jconsole\f[R] command doesn\[aq]t associate with a console window. It does, however, display a dialog box with error information when the -\f[CB]jconsole\f[R] command fails. +\f[V]jconsole\f[R] command fails. diff --git a/src/jdk.jdeps/share/man/javap.1 b/src/jdk.jdeps/share/man/javap.1 index bb74f6404ac6f..5ffce107ccc0a 100644 --- a/src/jdk.jdeps/share/man/javap.1 +++ b/src/jdk.jdeps/share/man/javap.1 @@ -19,24 +19,36 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JAVAP" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JAVAP" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -javap \- disassemble one or more class files +javap - disassemble one or more class files .SH SYNOPSIS .PP -\f[CB]javap\f[R] [\f[I]options\f[R]] \f[I]classes\f[R]... +\f[V]javap\f[R] [\f[I]options\f[R]] \f[I]classes\f[R]... .TP -.B \f[I]options\f[R] -Specifies the command\-line options. +\f[I]options\f[R] +Specifies the command-line options. See \f[B]Options for javap\f[R]. -.RS -.RE .TP -.B \f[I]classes\f[R] +\f[I]classes\f[R] Specifies one or more classes separated by spaces to be processed for annotations. You can specify a class that can be found in the class path by its file @@ -46,144 +58,108 @@ name, URL, or by its fully qualified class name. Examples: .RS .PP -\f[CB]path/to/MyClass.class\f[R] +\f[V]path/to/MyClass.class\f[R] .RE .RS .PP -\f[CB]jar:file:///path/to/MyJar.jar!/mypkg/MyClass.class\f[R] +\f[V]jar:file:///path/to/MyJar.jar!/mypkg/MyClass.class\f[R] .RE .RS .PP -\f[CB]java.lang.Object\f[R] +\f[V]java.lang.Object\f[R] .RE .RE .SH DESCRIPTION .PP -The \f[CB]javap\f[R] command disassembles one or more class files. +The \f[V]javap\f[R] command disassembles one or more class files. The output depends on the options used. -When no options are used, the \f[CB]javap\f[R] command prints the +When no options are used, the \f[V]javap\f[R] command prints the protected and public fields, and methods of the classes passed to it. .PP -The \f[CB]javap\f[R] command isn\[aq]t multirelease JAR aware. +The \f[V]javap\f[R] command isn\[aq]t multirelease JAR aware. Using the class path form of the command results in viewing the base entry in all JAR files, multirelease or not. Using the URL form, you can use the URL form of an argument to specify a specific version of a class to be disassembled. .PP -The \f[CB]javap\f[R] command prints its output to \f[CB]stdout\f[R]. +The \f[V]javap\f[R] command prints its output to \f[V]stdout\f[R]. .PP \f[B]Note:\f[R] .PP -In tools that support \f[CB]\-\-\f[R] style options, the GNU\-style -options can use the equal sign (\f[CB]=\f[R]) instead of a white space to +In tools that support \f[V]--\f[R] style options, the GNU-style options +can use the equal sign (\f[V]=\f[R]) instead of a white space to separate the name of an option from its value. .SH OPTIONS FOR JAVAP .TP -.B \f[CB]\-\-help\f[R], \f[CB]\-help\f[R] , \f[CB]\-h\f[R], or \f[CB]\-?\f[R] -Prints a help message for the \f[CB]javap\f[R] command. -.RS -.RE +\f[V]--help\f[R], \f[V]-help\f[R] , \f[V]-h\f[R], or \f[V]-?\f[R] +Prints a help message for the \f[V]javap\f[R] command. .TP -.B \f[CB]\-version\f[R] +\f[V]-version\f[R] Prints release information. -.RS -.RE .TP -.B \f[CB]\-verbose\f[R] or \f[CB]\-v\f[R] +\f[V]-verbose\f[R] or \f[V]-v\f[R] Prints additional information about the selected class. -.RS -.RE .TP -.B \f[CB]\-l\f[R] +\f[V]-l\f[R] Prints line and local variable tables. -.RS -.RE .TP -.B \f[CB]\-public\f[R] +\f[V]-public\f[R] Shows only public classes and members. -.RS -.RE .TP -.B \f[CB]\-protected\f[R] +\f[V]-protected\f[R] Shows only protected and public classes and members. -.RS -.RE .TP -.B \f[CB]\-package\f[R] +\f[V]-package\f[R] Shows package/protected/public classes and members (default). -.RS -.RE .TP -.B \f[CB]\-private\f[R] or \f[CB]\-p\f[R] +\f[V]-private\f[R] or \f[V]-p\f[R] Shows all classes and members. -.RS -.RE .TP -.B \f[CB]\-c\f[R] +\f[V]-c\f[R] Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class. -.RS -.RE .TP -.B \f[CB]\-s\f[R] +\f[V]-s\f[R] Prints internal type signatures. -.RS -.RE .TP -.B \f[CB]\-sysinfo\f[R] -Shows system information (path, size, date, SHA\-256 hash) of the class +\f[V]-sysinfo\f[R] +Shows system information (path, size, date, SHA-256 hash) of the class being processed. -.RS -.RE .TP -.B \f[CB]\-constants\f[R] -Shows \f[CB]static\ final\f[R] constants. -.RS -.RE +\f[V]-constants\f[R] +Shows \f[V]static final\f[R] constants. .TP -.B \f[CB]\-\-module\f[R] \f[I]module\f[R] or \f[CB]\-m\f[R] \f[I]module\f[R] +\f[V]--module\f[R] \f[I]module\f[R] or \f[V]-m\f[R] \f[I]module\f[R] Specifies the module containing classes to be disassembled. -.RS -.RE .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]path\f[R] +\f[V]--module-path\f[R] \f[I]path\f[R] Specifies where to find application modules. -.RS -.RE .TP -.B \f[CB]\-\-system\f[R] \f[I]jdk\f[R] +\f[V]--system\f[R] \f[I]jdk\f[R] Specifies where to find system modules. -.RS -.RE .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R], \f[CB]\-classpath\f[R] \f[I]path\f[R], or \f[CB]\-cp\f[R] \f[I]path\f[R] -Specifies the path that the \f[CB]javap\f[R] command uses to find user +\f[V]--class-path\f[R] \f[I]path\f[R], \f[V]-classpath\f[R] \f[I]path\f[R], or \f[V]-cp\f[R] \f[I]path\f[R] +Specifies the path that the \f[V]javap\f[R] command uses to find user class files. -It overrides the default or the \f[CB]CLASSPATH\f[R] environment variable +It overrides the default or the \f[V]CLASSPATH\f[R] environment variable when it\[aq]s set. -.RS -.RE .TP -.B \f[CB]\-bootclasspath\f[R] \f[I]path\f[R] +\f[V]-bootclasspath\f[R] \f[I]path\f[R] Overrides the location of bootstrap class files. -.RS -.RE .TP -.B \f[CB]\-\-multi\-release\f[R] \f[I]version\f[R] -Specifies the version to select in multi\-release JAR files. -.RS -.RE +\f[V]--multi-release\f[R] \f[I]version\f[R] +Specifies the version to select in multi-release JAR files. .TP -.B \f[CB]\-J\f[R]\f[I]option\f[R] +\f[V]-J\f[R]\f[I]option\f[R] Passes the specified option to the JVM. For example: .RS .IP .nf \f[CB] -javap\ \-J\-version +javap -J-version -javap\ \-J\-Djava.security.manager\ \-J\-Djava.security.policy=MyPolicy\ MyClassName +javap -J-Djava.security.manager -J-Djava.security.policy=MyPolicy MyClassName \f[R] .fi .PP @@ -191,90 +167,90 @@ See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R]. .RE .SH JAVAP EXAMPLE .PP -Compile the following \f[CB]HelloWorldFrame\f[R] class: +Compile the following \f[V]HelloWorldFrame\f[R] class: .IP .nf \f[CB] -import\ java.awt.Graphics; +import java.awt.Graphics; -import\ javax.swing.JFrame; -import\ javax.swing.JPanel; +import javax.swing.JFrame; +import javax.swing.JPanel; -public\ class\ HelloWorldFrame\ extends\ JFrame\ { +public class HelloWorldFrame extends JFrame { -\ \ \ String\ message\ =\ "Hello\ World!"; + String message = \[dq]Hello World!\[dq]; -\ \ \ public\ HelloWorldFrame(){ -\ \ \ \ \ \ \ \ setContentPane(new\ JPanel(){ -\ \ \ \ \ \ \ \ \ \ \ \ \@Override -\ \ \ \ \ \ \ \ \ \ \ \ protected\ void\ paintComponent(Graphics\ g)\ { -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ g.drawString(message,\ 15,\ 30); -\ \ \ \ \ \ \ \ \ \ \ \ } -\ \ \ \ \ \ \ \ }); -\ \ \ \ \ \ \ \ setSize(100,\ 100); -\ \ \ \ } -\ \ \ \ public\ static\ void\ main(String[]\ args)\ { -\ \ \ \ \ \ \ \ HelloWorldFrame\ frame\ =\ new\ HelloWorldFrame(); -\ \ \ \ \ \ \ \ frame.setVisible(true); + public HelloWorldFrame(){ + setContentPane(new JPanel(){ + \[at]Override + protected void paintComponent(Graphics g) { + g.drawString(message, 15, 30); + } + }); + setSize(100, 100); + } + public static void main(String[] args) { + HelloWorldFrame frame = new HelloWorldFrame(); + frame.setVisible(true); -\ \ \ \ } + } } \f[R] .fi .PP -The output from the \f[CB]javap\ HelloWorldFrame.class\f[R] command yields +The output from the \f[V]javap HelloWorldFrame.class\f[R] command yields the following: .IP .nf \f[CB] -Compiled\ from\ "HelloWorldFrame.java" -public\ class\ HelloWorldFrame\ extends\ javax.swing.JFrame\ { -\ \ java.lang.String\ message; -\ \ public\ HelloWorldFrame(); -\ \ public\ static\ void\ main(java.lang.String[]); +Compiled from \[dq]HelloWorldFrame.java\[dq] +public class HelloWorldFrame extends javax.swing.JFrame { + java.lang.String message; + public HelloWorldFrame(); + public static void main(java.lang.String[]); } \f[R] .fi .PP -The output from the \f[CB]javap\ \-c\ HelloWorldFrame.class\f[R] command +The output from the \f[V]javap -c HelloWorldFrame.class\f[R] command yields the following: .IP .nf \f[CB] -Compiled\ from\ "HelloWorldFrame.java" -public\ class\ HelloWorldFrame\ extends\ javax.swing.JFrame\ { -\ \ java.lang.String\ message; +Compiled from \[dq]HelloWorldFrame.java\[dq] +public class HelloWorldFrame extends javax.swing.JFrame { + java.lang.String message; -\ \ public\ HelloWorldFrame(); -\ \ \ \ Code: -\ \ \ \ \ \ \ 0:\ aload_0 -\ \ \ \ \ \ \ 1:\ invokespecial\ #1\ \ \ \ \ \ \ \ //\ Method\ javax/swing/JFrame."<init>":()V -\ \ \ \ \ \ \ 4:\ aload_0 -\ \ \ \ \ \ \ 5:\ ldc\ \ \ \ \ \ \ \ \ \ \ #2\ \ \ \ \ \ \ \ //\ String\ Hello\ World! -\ \ \ \ \ \ \ 7:\ putfield\ \ \ \ \ \ #3\ \ \ \ \ \ \ \ //\ Field\ message:Ljava/lang/String; -\ \ \ \ \ \ 10:\ aload_0 -\ \ \ \ \ \ 11:\ new\ \ \ \ \ \ \ \ \ \ \ #4\ \ \ \ \ \ \ \ //\ class\ HelloWorldFrame$1 -\ \ \ \ \ \ 14:\ dup -\ \ \ \ \ \ 15:\ aload_0 -\ \ \ \ \ \ 16:\ invokespecial\ #5\ \ \ \ \ \ \ \ //\ Method\ HelloWorldFrame$1."<init>":(LHelloWorldFrame;)V -\ \ \ \ \ \ 19:\ invokevirtual\ #6\ \ \ \ \ \ \ \ //\ Method\ setContentPane:(Ljava/awt/Container;)V -\ \ \ \ \ \ 22:\ aload_0 -\ \ \ \ \ \ 23:\ bipush\ \ \ \ \ \ \ \ 100 -\ \ \ \ \ \ 25:\ bipush\ \ \ \ \ \ \ \ 100 -\ \ \ \ \ \ 27:\ invokevirtual\ #7\ \ \ \ \ \ \ \ //\ Method\ setSize:(II)V -\ \ \ \ \ \ 30:\ return + public HelloWorldFrame(); + Code: + 0: aload_0 + 1: invokespecial #1 // Method javax/swing/JFrame.\[dq]<init>\[dq]:()V + 4: aload_0 + 5: ldc #2 // String Hello World! + 7: putfield #3 // Field message:Ljava/lang/String; + 10: aload_0 + 11: new #4 // class HelloWorldFrame$1 + 14: dup + 15: aload_0 + 16: invokespecial #5 // Method HelloWorldFrame$1.\[dq]<init>\[dq]:(LHelloWorldFrame;)V + 19: invokevirtual #6 // Method setContentPane:(Ljava/awt/Container;)V + 22: aload_0 + 23: bipush 100 + 25: bipush 100 + 27: invokevirtual #7 // Method setSize:(II)V + 30: return -\ \ public\ static\ void\ main(java.lang.String[]); -\ \ \ \ Code: -\ \ \ \ \ \ \ 0:\ new\ \ \ \ \ \ \ \ \ \ \ #8\ \ \ \ \ \ \ \ //\ class\ HelloWorldFrame -\ \ \ \ \ \ \ 3:\ dup -\ \ \ \ \ \ \ 4:\ invokespecial\ #9\ \ \ \ \ \ \ \ //\ Method\ "<init>":()V -\ \ \ \ \ \ \ 7:\ astore_1 -\ \ \ \ \ \ \ 8:\ aload_1 -\ \ \ \ \ \ \ 9:\ iconst_1 -\ \ \ \ \ \ 10:\ invokevirtual\ #10\ \ \ \ \ \ \ //\ Method\ setVisible:(Z)V -\ \ \ \ \ \ 13:\ return + public static void main(java.lang.String[]); + Code: + 0: new #8 // class HelloWorldFrame + 3: dup + 4: invokespecial #9 // Method \[dq]<init>\[dq]:()V + 7: astore_1 + 8: aload_1 + 9: iconst_1 + 10: invokevirtual #10 // Method setVisible:(Z)V + 13: return } \f[R] .fi diff --git a/src/jdk.jdeps/share/man/jdeprscan.1 b/src/jdk.jdeps/share/man/jdeprscan.1 index a56a2977ccd47..b4b541498b6f5 100644 --- a/src/jdk.jdeps/share/man/jdeprscan.1 +++ b/src/jdk.jdeps/share/man/jdeprscan.1 @@ -19,26 +19,38 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JDEPRSCAN" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JDEPRSCAN" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jdeprscan \- static analysis tool that scans a jar file (or some other +jdeprscan - static analysis tool that scans a jar file (or some other aggregation of class files) for uses of deprecated API elements .SH SYNOPSIS .PP -\f[CB]jdeprscan\f[R] [\f[I]options\f[R]] +\f[V]jdeprscan\f[R] [\f[I]options\f[R]] {\f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R]} .TP -.B \f[I]options\f[R] +\f[I]options\f[R] See \f[B]Options for the jdeprscan Command\f[R] -.RS -.RE .TP -.B \f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R] -\f[CB]jdeprscan\f[R] command scans each argument for usages of deprecated +\f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R] +\f[V]jdeprscan\f[R] command scans each argument for usages of deprecated APIs. The arguments can be a: .RS @@ -49,45 +61,45 @@ The arguments can be a: .IP \[bu] 2 \f[I]class\f[R]: Class name or class file .PP -The class name should use a dot (\f[CB]\&.\f[R]) as a separator. +The class name should use a dot (\f[V].\f[R]) as a separator. For example: .PP -\f[CB]java.lang.Thread\f[R] +\f[V]java.lang.Thread\f[R] .PP -For nested classes, the dollar sign \f[CB]$\f[R] separator character +For nested classes, the dollar sign \f[V]$\f[R] separator character should be used. For example: .PP -\f[CB]java.lang.Thread$State\f[R] +\f[V]java.lang.Thread$State\f[R] .PP A class file can also be named. For example: .PP -\f[CB]build/classes/java/lang/Thread$State.class\f[R] +\f[V]build/classes/java/lang/Thread$State.class\f[R] .RE .SH DESCRIPTION .PP -The \f[CB]jdeprscan\f[R] tool is a static analysis tool provided by the +The \f[V]jdeprscan\f[R] tool is a static analysis tool provided by the JDK that scans a JAR file or some other aggregation of class files for uses of deprecated API elements. -The deprecated APIs identified by the \f[CB]jdeprscan\f[R] tool are only +The deprecated APIs identified by the \f[V]jdeprscan\f[R] tool are only those that are defined by Java SE. -Deprecated APIs defined by third\-party libraries aren\[aq]t reported. +Deprecated APIs defined by third-party libraries aren\[aq]t reported. .PP To scan a JAR file or a set of class files, you must first ensure that all of the classes that the scanned classes depend upon are present in the class path. -Set the class path using the \f[CB]\-\-class\-path\f[R] option described -in \f[B]Options for the jdeprscan Command\f[R]. +Set the class path using the \f[V]--class-path\f[R] option described in +\f[B]Options for the jdeprscan Command\f[R]. Typically, you would use the same class path as the one that you use when invoking your application. .PP -If the \f[CB]jdeprscan\f[R] can\[aq]t find all the dependent classes, it +If the \f[V]jdeprscan\f[R] can\[aq]t find all the dependent classes, it will generate an error message for each class that\[aq]s missing. These error messages are typically of the form: .RS .PP -\f[CB]error:\ cannot\ find\ class\ ...\f[R] +\f[V]error: cannot find class ...\f[R] .RE .PP If these errors occur, then you must adjust the class path so that it @@ -96,83 +108,69 @@ includes all dependent classes. .PP The following options are available: .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R] Provides a search path for resolution of dependent classes. .RS .PP \f[I]path\f[R] can be a search path that consists of one or more -directories separated by the system\-specific path separator. +directories separated by the system-specific path separator. For example: .IP \[bu] 2 \f[B]Linux and OS X:\f[R] .RS 2 .RS .PP -\f[CB]\-\-class\-path\ /some/directory:/another/different/dir\f[R] +\f[V]--class-path /some/directory:/another/different/dir\f[R] .RE .RE .PP \f[B]Note:\f[R] .PP -On Windows, use a semicolon (\f[CB];\f[R]) as the separator instead of a -colon (\f[CB]:\f[R]). +On Windows, use a semicolon (\f[V];\f[R]) as the separator instead of a +colon (\f[V]:\f[R]). .IP \[bu] 2 \f[B]Windows:\f[R] .RS 2 .RS .PP -\f[CB]\-\-class\-path\ \\some\\directory;\\another\\different\\dir\f[R] +\f[V]--class-path \[rs]some\[rs]directory;\[rs]another\[rs]different\[rs]dir\f[R] .RE .RE .RE .TP -.B \f[CB]\-\-for\-removal\f[R] +\f[V]--for-removal\f[R] Limits scanning or listing to APIs that are deprecated for removal. Can\[aq]t be used with a release value of 6, 7, or 8. -.RS -.RE .TP -.B \f[CB]\-\-full\-version\f[R] +\f[V]--full-version\f[R] Prints out the full version string of the tool. -.RS -.RE .TP -.B \f[CB]\-\-help\f[R] or \f[CB]\-h\f[R] +\f[V]--help\f[R] or \f[V]-h\f[R] Prints out a full help message. -.RS -.RE .TP -.B \f[CB]\-\-list\f[R] or \f[CB]\-l\f[R] +\f[V]--list\f[R] or \f[V]-l\f[R] Prints the set of deprecated APIs. No scanning is done, so no directory, jar, or class arguments should be provided. -.RS -.RE .TP -.B \f[CB]\-\-release\f[R] \f[CB]6\f[R]|\f[CB]7\f[R]|\f[CB]8\f[R]|\f[CB]9\f[R] +\f[V]--release\f[R] \f[V]6\f[R]|\f[V]7\f[R]|\f[V]8\f[R]|\f[V]9\f[R] Specifies the Java SE release that provides the set of deprecated APIs for scanning. -.RS -.RE .TP -.B \f[CB]\-\-verbose\f[R] or \f[CB]\-v\f[R] +\f[V]--verbose\f[R] or \f[V]-v\f[R] Enables additional message output during processing. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Prints out the abbreviated version string of the tool. -.RS -.RE .SH EXAMPLE OF JDEPRSCAN OUTPUT .PP The JAR file for this library will be named something similar to -\f[CB]commons\-math3\-3.6.1.jar\f[R]. +\f[V]commons-math3-3.6.1.jar\f[R]. To scan this JAR file for the use of deprecated APIs, run the following command: .RS .PP -\f[CB]jdeprscan\ commons\-math3\-3.6.1.jar\f[R] +\f[V]jdeprscan commons-math3-3.6.1.jar\f[R] .RE .PP This command produces several lines of output. @@ -180,29 +178,29 @@ For example, one line of output might be: .IP .nf \f[CB] -class\ org/apache/commons/math3/util/MathUtils\ uses\ deprecated\ method\ java/lang/Double::<init>(D)V +class org/apache/commons/math3/util/MathUtils uses deprecated method java/lang/Double::<init>(D)V \f[R] .fi .PP \f[B]Note:\f[R] .PP -The class name is specified using the slash\-separated binary name as +The class name is specified using the slash-separated binary name as described in JVMS 4.2.1. This is the form used internally in class files. .PP -The deprecated API it uses is a method on the \f[CB]java.lang.Double\f[R] +The deprecated API it uses is a method on the \f[V]java.lang.Double\f[R] class. .PP -The name of the deprecated method is \f[CB]<init>\f[R], which is a special -name that means that the method is actually a constructor. -Another special name is \f[CB]<clinit>\f[R], which indicates a class +The name of the deprecated method is \f[V]<init>\f[R], which is a +special name that means that the method is actually a constructor. +Another special name is \f[V]<clinit>\f[R], which indicates a class static initializer. .PP Other methods are listed just by their method name. Following the method name is the argument list and return type: .RS .PP -\f[CB](D)V\f[R] +\f[V](D)V\f[R] .RE .PP This indicates that it takes just one double value (a primitive) and @@ -212,19 +210,19 @@ For example, another line of output might be: .IP .nf \f[CB] -class\ org/apache/commons/math3/util/Precision\ uses\ deprecated\ method\ java/math/BigDecimal::setScale(II)Ljava/math/BigDecimal; +class org/apache/commons/math3/util/Precision uses deprecated method java/math/BigDecimal::setScale(II)Ljava/math/BigDecimal; \f[R] .fi .PP In this line of output, the deprecated method is on class -\f[CB]java.math.BigDecimal\f[R], and the method is \f[CB]setScale()\f[R]. -In this case, the \f[CB](II)\f[R] means that it takes two \f[CB]int\f[R] +\f[V]java.math.BigDecimal\f[R], and the method is \f[V]setScale()\f[R]. +In this case, the \f[V](II)\f[R] means that it takes two \f[V]int\f[R] arguments. -The \f[CB]Ljava/math/BigDecimal;\f[R] after the parentheses means that it -returns a reference to \f[CB]java.math.BigDecimal\f[R]. -.SH JDEPRSCAN ANALYSIS CAN BE VERSION\-SPECIFIC +The \f[V]Ljava/math/BigDecimal;\f[R] after the parentheses means that it +returns a reference to \f[V]java.math.BigDecimal\f[R]. +.SH JDEPRSCAN ANALYSIS CAN BE VERSION-SPECIFIC .PP -You can use \f[CB]jdeprscan\f[R] relative to the previous three JDK +You can use \f[V]jdeprscan\f[R] relative to the previous three JDK releases. For example, if you are running JDK 9, then you can check against JDK 8, 7, and 6. @@ -233,41 +231,41 @@ As an example, look at this code snippet: .IP .nf \f[CB] -public\ class\ Deprecations\ { -\ \ \ SecurityManager\ sm\ =\ new\ RMISecurityManager();\ \ \ \ //\ deprecated\ in\ 8 -\ \ \ Boolean\ b2\ =\ new\ Boolean(true);\ \ \ \ \ \ \ \ \ \ //\ deprecated\ in\ 9 +public class Deprecations { + SecurityManager sm = new RMISecurityManager(); // deprecated in 8 + Boolean b2 = new Boolean(true); // deprecated in 9 } \f[R] .fi .PP The complete class compiles without warnings in JDK 7. .PP -If you run \f[CB]jdeprscan\f[R] on a system with JDK 9, then you see: +If you run \f[V]jdeprscan\f[R] on a system with JDK 9, then you see: .IP .nf \f[CB] -$\ jdeprscan\ \-\-class\-path\ classes\ \-\-release\ 7\ example.Deprecations -(no\ output) +$ jdeprscan --class-path classes --release 7 example.Deprecations +(no output) \f[R] .fi .PP -Run \f[CB]jdeprscan\f[R] with a release value of 8: +Run \f[V]jdeprscan\f[R] with a release value of 8: .IP .nf \f[CB] -$\ jdeprscan\ \-\-class\-path\ classes\ \-\-release\ 8\ example.Deprecations -class\ example/Deprecations\ uses\ type\ java/rmi/RMISecurityManager\ deprecated -class\ example/Deprecations\ uses\ method\ in\ type\ java/rmi/RMISecurityManager\ deprecated +$ jdeprscan --class-path classes --release 8 example.Deprecations +class example/Deprecations uses type java/rmi/RMISecurityManager deprecated +class example/Deprecations uses method in type java/rmi/RMISecurityManager deprecated \f[R] .fi .PP -Run \f[CB]jdeprscan\f[R] on JDK 9: +Run \f[V]jdeprscan\f[R] on JDK 9: .IP .nf \f[CB] -$\ jdeprscan\ \-\-class\-path\ classes\ example.Deprecations -class\ example/Deprecations\ uses\ type\ java/rmi/RMISecurityManager\ deprecated -class\ example/Deprecations\ uses\ method\ in\ type\ java/rmi/RMISecurityManager\ deprecated -class\ example/Deprecations\ uses\ method\ java/lang/Boolean\ <init>\ (Z)V\ deprecated +$ jdeprscan --class-path classes example.Deprecations +class example/Deprecations uses type java/rmi/RMISecurityManager deprecated +class example/Deprecations uses method in type java/rmi/RMISecurityManager deprecated +class example/Deprecations uses method java/lang/Boolean <init> (Z)V deprecated \f[R] .fi diff --git a/src/jdk.jdeps/share/man/jdeps.1 b/src/jdk.jdeps/share/man/jdeps.1 index 9daf1b9bbc089..f0485b83f14dd 100644 --- a/src/jdk.jdeps/share/man/jdeps.1 +++ b/src/jdk.jdeps/share/man/jdeps.1 @@ -19,19 +19,33 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JDEPS" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JDEPS" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jdeps \- launch the Java class dependency analyzer +jdeps - launch the Java class dependency analyzer .SH SYNOPSIS .PP -\f[CB]jdeps\f[R] [\f[I]options\f[R]] \f[I]path\f[R] ... +\f[V]jdeps\f[R] [\f[I]options\f[R]] \f[I]path\f[R] ... .TP -.B \f[I]options\f[R] -Command\-line options. +\f[I]options\f[R] +Command-line options. For detailed descriptions of the options that can be used, see .RS .IP \[bu] 2 @@ -44,322 +58,246 @@ For detailed descriptions of the options that can be used, see \f[B]Options to Filter Classes to be Analyzed\f[R] .RE .TP -.B \f[I]path\f[R] -A pathname to the \f[CB]\&.class\f[R] file, directory, or JAR file to +\f[I]path\f[R] +A pathname to the \f[V].class\f[R] file, directory, or JAR file to analyze. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jdeps\f[R] command shows the package\-level or class\-level +The \f[V]jdeps\f[R] command shows the package-level or class-level dependencies of Java class files. -The input class can be a path name to a \f[CB]\&.class\f[R] file, a +The input class can be a path name to a \f[V].class\f[R] file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files. The options determine the output. -By default, the \f[CB]jdeps\f[R] command writes the dependencies to the +By default, the \f[V]jdeps\f[R] command writes the dependencies to the system output. The command can generate the dependencies in DOT language (see the -\f[CB]\-dotoutput\f[R] option). +\f[V]-dotoutput\f[R] option). .SH POSSIBLE OPTIONS .TP -.B \f[CB]\-?\f[R] or \f[CB]\-h\f[R] or \f[CB]\-\-help\f[R] +\f[V]-?\f[R] or \f[V]-h\f[R] or \f[V]--help\f[R] Prints the help message. -.RS -.RE .TP -.B \f[CB]\-dotoutput\f[R] \f[I]dir\f[R] or \f[CB]\-\-dot\-output\f[R] \f[I]dir\f[R] +\f[V]-dotoutput\f[R] \f[I]dir\f[R] or \f[V]--dot-output\f[R] \f[I]dir\f[R] Specifies the destination directory for DOT file output. -If this option is specified, then the \f[CB]jdeps\f[R]command generates -one \f[CB]\&.dot\f[R] file for each analyzed archive named -\f[CB]archive\-file\-name.dot\f[R] that lists the dependencies, and also a -summary file named \f[CB]summary.dot\f[R] that lists the dependencies +If this option is specified, then the \f[V]jdeps\f[R]command generates +one \f[V].dot\f[R] file for each analyzed archive named +\f[V]archive-file-name.dot\f[R] that lists the dependencies, and also a +summary file named \f[V]summary.dot\f[R] that lists the dependencies among the archive files. -.RS -.RE .TP -.B \f[CB]\-s\f[R] or \f[CB]\-summary\f[R] +\f[V]-s\f[R] or \f[V]-summary\f[R] Prints a dependency summary only. -.RS -.RE .TP -.B \f[CB]\-v\f[R] or \f[CB]\-verbose\f[R] -Prints all class\-level dependencies. +\f[V]-v\f[R] or \f[V]-verbose\f[R] +Prints all class-level dependencies. This is equivalent to .RS .RS .PP -\f[CB]\-verbose:class\ \-filter:none\f[R] +\f[V]-verbose:class -filter:none\f[R] .RE .RE .TP -.B \f[CB]\-verbose:package\f[R] -Prints package\-level dependencies excluding, by default, dependences +\f[V]-verbose:package\f[R] +Prints package-level dependencies excluding, by default, dependences within the same package. -.RS -.RE .TP -.B \f[CB]\-verbose:class\f[R] -Prints class\-level dependencies excluding, by default, dependencies +\f[V]-verbose:class\f[R] +Prints class-level dependencies excluding, by default, dependencies within the same archive. -.RS -.RE .TP -.B \f[CB]\-apionly\f[R] or \f[CB]\-\-api\-only\f[R] +\f[V]-apionly\f[R] or \f[V]--api-only\f[R] Restricts the analysis to APIs, for example, dependences from the -signature of \f[CB]public\f[R] and \f[CB]protected\f[R] members of public +signature of \f[V]public\f[R] and \f[V]protected\f[R] members of public classes including field type, method parameter types, returned type, and checked exception types. -.RS -.RE .TP -.B \f[CB]\-jdkinternals\f[R] or \f[CB]\-\-jdk\-internals\f[R] -Finds class\-level dependences in the JDK internal APIs. +\f[V]-jdkinternals\f[R] or \f[V]--jdk-internals\f[R] +Finds class-level dependences in the JDK internal APIs. By default, this option analyzes all classes specified in the -\f[CB]\-\-classpath\f[R] option and input files unless you specified the -\f[CB]\-include\f[R] option. -You can\[aq]t use this option with the \f[CB]\-p\f[R], \f[CB]\-e\f[R], and -\f[CB]\-s\f[R] options. +\f[V]--classpath\f[R] option and input files unless you specified the +\f[V]-include\f[R] option. +You can\[aq]t use this option with the \f[V]-p\f[R], \f[V]-e\f[R], and +\f[V]-s\f[R] options. .RS .PP \f[B]Warning\f[R]: The JDK internal APIs are inaccessible. .RE .TP -.B \f[CB]\-cp\f[R] \f[I]path\f[R], \f[CB]\-classpath\f[R] \f[I]path\f[R], or \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]-cp\f[R] \f[I]path\f[R], \f[V]-classpath\f[R] \f[I]path\f[R], or \f[V]--class-path\f[R] \f[I]path\f[R] Specifies where to find class files. -.RS -.RE .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]module\-path\f[R] +\f[V]--module-path\f[R] \f[I]module-path\f[R] Specifies the module path. -.RS -.RE .TP -.B \f[CB]\-\-upgrade\-module\-path\f[R] \f[I]module\-path\f[R] +\f[V]--upgrade-module-path\f[R] \f[I]module-path\f[R] Specifies the upgrade module path. -.RS -.RE .TP -.B \f[CB]\-\-system\f[R] \f[I]java\-home\f[R] +\f[V]--system\f[R] \f[I]java-home\f[R] Specifies an alternate system module path. -.RS -.RE .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\-name\f[R][\f[CB],\f[R] \f[I]module\-name\f[R]...] +\f[V]--add-modules\f[R] \f[I]module-name\f[R][\f[V],\f[R] \f[I]module-name\f[R]...] Adds modules to the root set for analysis. -.RS -.RE .TP -.B \f[CB]\-\-multi\-release\f[R] \f[I]version\f[R] -Specifies the version when processing multi\-release JAR files. +\f[V]--multi-release\f[R] \f[I]version\f[R] +Specifies the version when processing multi-release JAR files. \f[I]version\f[R] should be an integer >=9 or base. -.RS -.RE .TP -.B \f[CB]\-q\f[R] or \f[CB]\-quiet\f[R] +\f[V]-q\f[R] or \f[V]-quiet\f[R] Doesn\[aq]t show missing dependencies from -\f[CB]\-generate\-module\-info\f[R] output. -.RS -.RE +\f[V]-generate-module-info\f[R] output. .TP -.B \f[CB]\-version\f[R] or \f[CB]\-\-version\f[R] +\f[V]-version\f[R] or \f[V]--version\f[R] Prints version information. -.RS -.RE .SH MODULE DEPENDENCE ANALYSIS OPTIONS .TP -.B \f[CB]\-m\f[R] \f[I]module\-name\f[R] or \f[CB]\-\-module\f[R] \f[I]module\-name\f[R] +\f[V]-m\f[R] \f[I]module-name\f[R] or \f[V]--module\f[R] \f[I]module-name\f[R] Specifies the root module for analysis. -.RS -.RE .TP -.B \f[CB]\-\-generate\-module\-info\f[R] \f[I]dir\f[R] -Generates \f[CB]module\-info.java\f[R] under the specified directory. +\f[V]--generate-module-info\f[R] \f[I]dir\f[R] +Generates \f[V]module-info.java\f[R] under the specified directory. The specified JAR files will be analyzed. -This option cannot be used with \f[CB]\-\-dot\-output\f[R] or -\f[CB]\-\-class\-path\f[R] options. -Use the \f[CB]\-\-generate\-open\-module\f[R] option for open modules. -.RS -.RE +This option cannot be used with \f[V]--dot-output\f[R] or +\f[V]--class-path\f[R] options. +Use the \f[V]--generate-open-module\f[R] option for open modules. .TP -.B \f[CB]\-\-generate\-open\-module\f[R] \f[I]dir\f[R] -Generates \f[CB]module\-info.java\f[R] for the specified JAR files under +\f[V]--generate-open-module\f[R] \f[I]dir\f[R] +Generates \f[V]module-info.java\f[R] for the specified JAR files under the specified directory as open modules. -This option cannot be used with the \f[CB]\-\-dot\-output\f[R] or -\f[CB]\-\-class\-path\f[R] options. -.RS -.RE +This option cannot be used with the \f[V]--dot-output\f[R] or +\f[V]--class-path\f[R] options. .TP -.B \f[CB]\-\-check\f[R] \f[I]module\-name\f[R] [\f[CB],\f[R] \f[I]module\-name\f[R]...] +\f[V]--check\f[R] \f[I]module-name\f[R] [\f[V],\f[R] \f[I]module-name\f[R]...] Analyzes the dependence of the specified modules. It prints the module descriptor, the resulting module dependences after analysis and the graph after transition reduction. It also identifies any unused qualified exports. -.RS -.RE .TP -.B \f[CB]\-\-list\-deps\f[R] +\f[V]--list-deps\f[R] Lists the module dependences and also the package names of JDK internal APIs (if referenced). This option transitively analyzes libraries on class path and module path if referenced. -Use \f[CB]\-\-no\-recursive\f[R] option for non\-transitive dependency +Use \f[V]--no-recursive\f[R] option for non-transitive dependency analysis. -.RS -.RE .TP -.B \f[CB]\-\-list\-reduced\-deps\f[R] -Same as \f[CB]\-\-list\-deps\f[R] without listing the implied reads edges +\f[V]--list-reduced-deps\f[R] +Same as \f[V]--list-deps\f[R] without listing the implied reads edges from the module graph. If module M1 reads M2, and M2 requires transitive on M3, then M1 reading M3 is implied and is not shown in the graph. -.RS -.RE .TP -.B \f[CB]\-\-print\-module\-deps\f[R] -Same as \f[CB]\-\-list\-reduced\-deps\f[R] with printing a -comma\-separated list of module dependences. -The output can be used by \f[CB]jlink\ \-\-add\-modules\f[R] to create a +\f[V]--print-module-deps\f[R] +Same as \f[V]--list-reduced-deps\f[R] with printing a comma-separated +list of module dependences. +The output can be used by \f[V]jlink --add-modules\f[R] to create a custom image that contains those modules and their transitive dependences. -.RS -.RE .TP -.B \f[CB]\-\-ignore\-missing\-deps\f[R] +\f[V]--ignore-missing-deps\f[R] Ignore missing dependences. -.RS -.RE .SH OPTIONS TO FILTER DEPENDENCES .TP -.B \f[CB]\-p\f[R] \f[I]pkg_name\f[R], \f[CB]\-package\f[R] \f[I]pkg_name\f[R], or \f[CB]\-\-package\f[R] \f[I]pkg_name\f[R] +\f[V]-p\f[R] \f[I]pkg_name\f[R], \f[V]-package\f[R] \f[I]pkg_name\f[R], or \f[V]--package\f[R] \f[I]pkg_name\f[R] Finds dependences matching the specified package name. You can specify this option multiple times for different packages. -The \f[CB]\-p\f[R] and \f[CB]\-e\f[R] options are mutually exclusive. -.RS -.RE +The \f[V]-p\f[R] and \f[V]-e\f[R] options are mutually exclusive. .TP -.B \f[CB]\-e\f[R] \f[I]regex\f[R], \f[CB]\-regex\f[R] \f[I]regex\f[R], or \f[CB]\-\-regex\f[R] \f[I]regex\f[R] +\f[V]-e\f[R] \f[I]regex\f[R], \f[V]-regex\f[R] \f[I]regex\f[R], or \f[V]--regex\f[R] \f[I]regex\f[R] Finds dependences matching the specified pattern. -The \f[CB]\-p\f[R] and \f[CB]\-e\f[R] options are mutually exclusive. -.RS -.RE +The \f[V]-p\f[R] and \f[V]-e\f[R] options are mutually exclusive. .TP -.B \f[CB]\-\-require\f[R] \f[I]module\-name\f[R] +\f[V]--require\f[R] \f[I]module-name\f[R] Finds dependences matching the given module name (may be given multiple times). -The \f[CB]\-\-package\f[R], \f[CB]\-\-regex\f[R], and \f[CB]\-\-require\f[R] +The \f[V]--package\f[R], \f[V]--regex\f[R], and \f[V]--require\f[R] options are mutually exclusive. -.RS -.RE .TP -.B \f[CB]\-f\f[R] \f[I]regex\f[R] or \f[CB]\-filter\f[R] \f[I]regex\f[R] +\f[V]-f\f[R] \f[I]regex\f[R] or \f[V]-filter\f[R] \f[I]regex\f[R] Filters dependences matching the given pattern. If give multiple times, the last one will be selected. -.RS -.RE .TP -.B \f[CB]\-filter:package\f[R] +\f[V]-filter:package\f[R] Filters dependences within the same package. This is the default. -.RS -.RE .TP -.B \f[CB]\-filter:archive\f[R] +\f[V]-filter:archive\f[R] Filters dependences within the same archive. -.RS -.RE .TP -.B \f[CB]\-filter:module\f[R] +\f[V]-filter:module\f[R] Filters dependences within the same module. -.RS -.RE .TP -.B \f[CB]\-filter:none\f[R] -No \f[CB]\-filter:package\f[R] and \f[CB]\-filter:archive\f[R] filtering. -Filtering specified via the \f[CB]\-filter\f[R] option still applies. -.RS -.RE +\f[V]-filter:none\f[R] +No \f[V]-filter:package\f[R] and \f[V]-filter:archive\f[R] filtering. +Filtering specified via the \f[V]-filter\f[R] option still applies. .TP -.B \f[CB]\-\-missing\-deps\f[R] +\f[V]--missing-deps\f[R] Finds missing dependences. -This option cannot be used with \f[CB]\-p\f[R], \f[CB]\-e\f[R] and -\f[CB]\-s\f[R] options. -.RS -.RE +This option cannot be used with \f[V]-p\f[R], \f[V]-e\f[R] and +\f[V]-s\f[R] options. .SH OPTIONS TO FILTER CLASSES TO BE ANALYZED .TP -.B \f[CB]\-include\f[R] \f[I]regex\f[R] +\f[V]-include\f[R] \f[I]regex\f[R] Restricts analysis to the classes matching pattern. This option filters the list of classes to be analyzed. -It can be used together with \f[CB]\-p\f[R] and \f[CB]\-e\f[R], which apply +It can be used together with \f[V]-p\f[R] and \f[V]-e\f[R], which apply the pattern to the dependencies. -.RS -.RE .TP -.B \f[CB]\-P\f[R] or \f[CB]\-profile\f[R] +\f[V]-P\f[R] or \f[V]-profile\f[R] Shows the profile containing a package. -.RS -.RE .TP -.B \f[CB]\-R\f[R] or \f[CB]\-\-recursive\f[R] -Recursively traverses all run\-time dependences. -The \f[CB]\-R\f[R] option implies \f[CB]\-filter:none\f[R]. -If \f[CB]\-p\f[R], \f[CB]\-e\f[R], or \f[CB]\-f\f[R] options are specified, +\f[V]-R\f[R] or \f[V]--recursive\f[R] +Recursively traverses all run-time dependences. +The \f[V]-R\f[R] option implies \f[V]-filter:none\f[R]. +If \f[V]-p\f[R], \f[V]-e\f[R], or \f[V]-f\f[R] options are specified, only the matching dependences are analyzed. -.RS -.RE .TP -.B \f[CB]\-\-no\-recursive\f[R] +\f[V]--no-recursive\f[R] Do not recursively traverse dependences. -.RS -.RE .TP -.B \f[CB]\-I\f[R] or \f[CB]\-\-inverse\f[R] +\f[V]-I\f[R] or \f[V]--inverse\f[R] Analyzes the dependences per other given options and then finds all artifacts that directly and indirectly depend on the matching nodes. -This is equivalent to the inverse of the compile\-time view analysis and +This is equivalent to the inverse of the compile-time view analysis and the print dependency summary. -This option must be used with the \f[CB]\-\-require\f[R], -\f[CB]\-\-package\f[R], or \f[CB]\-\-regex\f[R] options. -.RS -.RE +This option must be used with the \f[V]--require\f[R], +\f[V]--package\f[R], or \f[V]--regex\f[R] options. .TP -.B \f[CB]\-\-compile\-time\f[R] -Analyzes the compile\-time view of transitive dependencies, such as the -compile\-time view of the \f[CB]\-R\f[R] option. +\f[V]--compile-time\f[R] +Analyzes the compile-time view of transitive dependencies, such as the +compile-time view of the \f[V]-R\f[R] option. Analyzes the dependences per other specified options. If a dependency is found from a directory, a JAR file or a module, all classes in that containing archive are analyzed. -.RS -.RE .SH EXAMPLE OF ANALYZING DEPENDENCIES .PP The following example demonstrates analyzing the dependencies of the -\f[CB]Notepad.jar\f[R] file. +\f[V]Notepad.jar\f[R] file. .PP \f[B]Linux and OS X:\f[R] .IP .nf \f[CB] -$\ jdeps\ demo/jfc/Notepad/Notepad.jar -Notepad.jar\ \->\ java.base -Notepad.jar\ \->\ java.desktop -Notepad.jar\ \->\ java.logging -\ \ \ <unnamed>\ (Notepad.jar) -\ \ \ \ \ \ \->\ java.awt -\ \ \ \ \ \ \->\ java.awt.event -\ \ \ \ \ \ \->\ java.beans -\ \ \ \ \ \ \->\ java.io -\ \ \ \ \ \ \->\ java.lang -\ \ \ \ \ \ \->\ java.net -\ \ \ \ \ \ \->\ java.util -\ \ \ \ \ \ \->\ java.util.logging -\ \ \ \ \ \ \->\ javax.swing -\ \ \ \ \ \ \->\ javax.swing.border -\ \ \ \ \ \ \->\ javax.swing.event -\ \ \ \ \ \ \->\ javax.swing.text -\ \ \ \ \ \ \->\ javax.swing.tree -\ \ \ \ \ \ \->\ javax.swing.undo +$ jdeps demo/jfc/Notepad/Notepad.jar +Notepad.jar -> java.base +Notepad.jar -> java.desktop +Notepad.jar -> java.logging + <unnamed> (Notepad.jar) + -> java.awt + -> java.awt.event + -> java.beans + -> java.io + -> java.lang + -> java.net + -> java.util + -> java.util.logging + -> javax.swing + -> javax.swing.border + -> javax.swing.event + -> javax.swing.text + -> javax.swing.tree + -> javax.swing.undo \f[R] .fi .PP @@ -367,37 +305,37 @@ Notepad.jar\ \->\ java.logging .IP .nf \f[CB] -C:\\Java\\jdk1.9.0>jdeps\ demo\\jfc\\Notepad\\Notepad.jar -Notepad.jar\ \->\ java.base -Notepad.jar\ \->\ java.desktop -Notepad.jar\ \->\ java.logging -\ \ \ <unnamed>\ (Notepad.jar) -\ \ \ \ \ \ \->\ java.awt -\ \ \ \ \ \ \->\ java.awt.event -\ \ \ \ \ \ \->\ java.beans -\ \ \ \ \ \ \->\ java.io -\ \ \ \ \ \ \->\ java.lang -\ \ \ \ \ \ \->\ java.net -\ \ \ \ \ \ \->\ java.util -\ \ \ \ \ \ \->\ java.util.logging -\ \ \ \ \ \ \->\ javax.swing -\ \ \ \ \ \ \->\ javax.swing.border -\ \ \ \ \ \ \->\ javax.swing.event -\ \ \ \ \ \ \->\ javax.swing.text -\ \ \ \ \ \ \->\ javax.swing.tree -\ \ \ \ \ \ \->\ javax.swing.undo +C:\[rs]Java\[rs]jdk1.9.0>jdeps demo\[rs]jfc\[rs]Notepad\[rs]Notepad.jar +Notepad.jar -> java.base +Notepad.jar -> java.desktop +Notepad.jar -> java.logging + <unnamed> (Notepad.jar) + -> java.awt + -> java.awt.event + -> java.beans + -> java.io + -> java.lang + -> java.net + -> java.util + -> java.util.logging + -> javax.swing + -> javax.swing.border + -> javax.swing.event + -> javax.swing.text + -> javax.swing.tree + -> javax.swing.undo \f[R] .fi -.SH EXAMPLE USING THE \-\-INVERSE OPTION +.SH EXAMPLE USING THE --INVERSE OPTION .IP .nf \f[CB] -\ $\ jdeps\ \-\-inverse\ \-\-require\ java.xml.bind -Inverse\ transitive\ dependences\ on\ [java.xml.bind] -java.xml.bind\ <\-\ java.se.ee -java.xml.bind\ <\-\ jdk.xml.ws -java.xml.bind\ <\-\ java.xml.ws\ <\-\ java.se.ee -java.xml.bind\ <\-\ java.xml.ws\ <\-\ jdk.xml.ws -java.xml.bind\ <\-\ jdk.xml.bind\ <\-\ jdk.xml.ws + $ jdeps --inverse --require java.xml.bind +Inverse transitive dependences on [java.xml.bind] +java.xml.bind <- java.se.ee +java.xml.bind <- jdk.xml.ws +java.xml.bind <- java.xml.ws <- java.se.ee +java.xml.bind <- java.xml.ws <- jdk.xml.ws +java.xml.bind <- jdk.xml.bind <- jdk.xml.ws \f[R] .fi diff --git a/src/jdk.jdi/share/man/jdb.1 b/src/jdk.jdi/share/man/jdb.1 index 3c95d16c949b7..4b0e99279034b 100644 --- a/src/jdk.jdi/share/man/jdb.1 +++ b/src/jdk.jdi/share/man/jdb.1 @@ -19,40 +19,48 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JDB" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JDB" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jdb \- find and fix bugs in Java platform programs +jdb - find and fix bugs in Java platform programs .SH SYNOPSIS .PP -\f[CB]jdb\f[R] [\f[I]options\f[R]] [\f[I]classname\f[R]] +\f[V]jdb\f[R] [\f[I]options\f[R]] [\f[I]classname\f[R]] [\f[I]arguments\f[R]] .TP -.B \f[I]options\f[R] -This represents the \f[CB]jdb\f[R] command\-line options. +\f[I]options\f[R] +This represents the \f[V]jdb\f[R] command-line options. See \f[B]Options for the jdb command\f[R]. -.RS -.RE .TP -.B \f[I]classname\f[R] +\f[I]classname\f[R] This represents the name of the main class to debug. -.RS -.RE .TP -.B \f[I]arguments\f[R] -This represents the arguments that are passed to the \f[CB]main()\f[R] +\f[I]arguments\f[R] +This represents the arguments that are passed to the \f[V]main()\f[R] method of the class. -.RS -.RE .SH DESCRIPTION .PP -The Java Debugger (JDB) is a simple command\-line debugger for Java +The Java Debugger (JDB) is a simple command-line debugger for Java classes. -The \f[CB]jdb\f[R] command and its options call the JDB. -The \f[CB]jdb\f[R] command demonstrates the Java Platform Debugger +The \f[V]jdb\f[R] command and its options call the JDB. +The \f[V]jdb\f[R] command demonstrates the Java Platform Debugger Architecture and provides inspection and debugging of a local or remote JVM. .SH START A JDB SESSION @@ -60,45 +68,45 @@ JVM. There are many ways to start a JDB session. The most frequently used way is to have the JDB launch a new JVM with the main class of the application to be debugged. -Do this by substituting the \f[CB]jdb\f[R] command for the \f[CB]java\f[R] +Do this by substituting the \f[V]jdb\f[R] command for the \f[V]java\f[R] command in the command line. -For example, if your application\[aq]s main class is \f[CB]MyClass\f[R], +For example, if your application\[aq]s main class is \f[V]MyClass\f[R], then use the following command to debug it under the JDB: .RS .PP -\f[CB]jdb\ MyClass\f[R] +\f[V]jdb MyClass\f[R] .RE .PP -When started this way, the \f[CB]jdb\f[R] command calls a second JVM with +When started this way, the \f[V]jdb\f[R] command calls a second JVM with the specified parameters, loads the specified class, and stops the JVM before executing that class\[aq]s first instruction. .PP -Another way to use the \f[CB]jdb\f[R] command is by attaching it to a JVM +Another way to use the \f[V]jdb\f[R] command is by attaching it to a JVM that\[aq]s already running. -Syntax for starting a JVM to which the \f[CB]jdb\f[R] command attaches +Syntax for starting a JVM to which the \f[V]jdb\f[R] command attaches when the JVM is running is as follows. -This loads in\-process debugging libraries and specifies the kind of +This loads in-process debugging libraries and specifies the kind of connection to be made. .RS .PP -\f[CB]java\ \-agentlib:jdwp=transport=dt_socket,server=y,suspend=n\ MyClass\f[R] +\f[V]java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n MyClass\f[R] .RE .PP -You can then attach the \f[CB]jdb\f[R] command to the JVM with the +You can then attach the \f[V]jdb\f[R] command to the JVM with the following command: .RS .PP -\f[CB]jdb\ \-attach\ 8000\f[R] +\f[V]jdb -attach 8000\f[R] .RE .PP 8000 is the address of the running JVM. .PP -The \f[CB]MyClass\f[R] argument isn\[aq]t specified in the \f[CB]jdb\f[R] -command line in this case because the \f[CB]jdb\f[R] command is connecting -to an existing JVM instead of launching a new JVM. +The \f[V]MyClass\f[R] argument isn\[aq]t specified in the \f[V]jdb\f[R] +command line in this case because the \f[V]jdb\f[R] command is +connecting to an existing JVM instead of launching a new JVM. .PP There are many other ways to connect the debugger to a JVM, and all of -them are supported by the \f[CB]jdb\f[R] command. +them are supported by the \f[V]jdb\f[R] command. The Java Platform Debugger Architecture has additional documentation on these connection options. .SH BREAKPOINTS @@ -106,175 +114,139 @@ these connection options. Breakpoints can be set in the JDB at line numbers or at the first instruction of a method, for example: .IP \[bu] 2 -The command \f[CB]stop\ at\ MyClass:22\f[R] sets a breakpoint at the first -instruction for line 22 of the source file containing \f[CB]MyClass\f[R]. +The command \f[V]stop at MyClass:22\f[R] sets a breakpoint at the first +instruction for line 22 of the source file containing \f[V]MyClass\f[R]. .IP \[bu] 2 -The command \f[CB]stop\ in\ java.lang.String.length\f[R] sets a breakpoint -at the beginning of the method \f[CB]java.lang.String.length\f[R]. +The command \f[V]stop in java.lang.String.length\f[R] sets a breakpoint +at the beginning of the method \f[V]java.lang.String.length\f[R]. .IP \[bu] 2 -The command \f[CB]stop\ in\ MyClass.<clinit>\f[R] uses \f[CB]<clinit>\f[R] -to identify the static initialization code for \f[CB]MyClass\f[R]. +The command \f[V]stop in MyClass.<clinit>\f[R] uses \f[V]<clinit>\f[R] +to identify the static initialization code for \f[V]MyClass\f[R]. .PP When a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. -For example, \f[CB]MyClass.myMethod(int,java.lang.String)\f[R] or -\f[CB]MyClass.myMethod()\f[R]. +For example, \f[V]MyClass.myMethod(int,java.lang.String)\f[R] or +\f[V]MyClass.myMethod()\f[R]. .PP -The \f[CB]clear\f[R] command removes breakpoints using the following -syntax: \f[CB]clear\ MyClass:45\f[R]. -Using the \f[CB]clear\f[R] or \f[CB]stop\f[R] command with no argument +The \f[V]clear\f[R] command removes breakpoints using the following +syntax: \f[V]clear MyClass:45\f[R]. +Using the \f[V]clear\f[R] or \f[V]stop\f[R] command with no argument displays a list of all breakpoints currently set. -The \f[CB]cont\f[R] command continues execution. +The \f[V]cont\f[R] command continues execution. .SH STEPPING .PP -The \f[CB]step\f[R] command advances execution to the next line whether +The \f[V]step\f[R] command advances execution to the next line whether it\[aq]s in the current stack frame or a called method. -The \f[CB]next\f[R] command advances execution to the next line in the +The \f[V]next\f[R] command advances execution to the next line in the current stack frame. .SH EXCEPTIONS .PP -When an exception occurs for which there isn\[aq]t a \f[CB]catch\f[R] +When an exception occurs for which there isn\[aq]t a \f[V]catch\f[R] statement anywhere in the throwing thread\[aq]s call stack, the JVM typically prints an exception trace and exits. When running under the JDB, however, control returns to the JDB at the offending throw. -You can then use the \f[CB]jdb\f[R] command to diagnose the cause of the +You can then use the \f[V]jdb\f[R] command to diagnose the cause of the exception. .PP -Use the \f[CB]catch\f[R] command to cause the debugged application to stop -at other thrown exceptions, for example: -\f[CB]catch\ java.io.FileNotFoundException\f[R] or \f[CB]catch\f[R] -\f[CB]mypackage.BigTroubleException\f[R]. +Use the \f[V]catch\f[R] command to cause the debugged application to +stop at other thrown exceptions, for example: +\f[V]catch java.io.FileNotFoundException\f[R] or \f[V]catch\f[R] +\f[V]mypackage.BigTroubleException\f[R]. Any exception that\[aq]s an instance of the specified class or subclass stops the application at the point where the exception is thrown. .PP -The \f[CB]ignore\f[R] command negates the effect of an earlier -\f[CB]catch\f[R] command. -The \f[CB]ignore\f[R] command doesn\[aq]t cause the debugged JVM to ignore -specific exceptions, but only to ignore the debugger. +The \f[V]ignore\f[R] command negates the effect of an earlier +\f[V]catch\f[R] command. +The \f[V]ignore\f[R] command doesn\[aq]t cause the debugged JVM to +ignore specific exceptions, but only to ignore the debugger. .SH OPTIONS FOR THE JDB COMMAND .PP -When you use the \f[CB]jdb\f[R] command instead of the \f[CB]java\f[R] -command on the command line, the \f[CB]jdb\f[R] command accepts many of -the same options as the \f[CB]java\f[R] command. +When you use the \f[V]jdb\f[R] command instead of the \f[V]java\f[R] +command on the command line, the \f[V]jdb\f[R] command accepts many of +the same options as the \f[V]java\f[R] command. .PP -The following options are accepted by the \f[CB]jdb\f[R] command: +The following options are accepted by the \f[V]jdb\f[R] command: .TP -.B \f[CB]\-help\f[R] +\f[V]-help\f[R] Displays a help message. -.RS -.RE .TP -.B \f[CB]\-sourcepath\f[R] \f[I]dir1\f[R]\f[CB]:\f[R]\f[I]dir2\f[R]\f[CB]:\f[R]... +\f[V]-sourcepath\f[R] \f[I]dir1\f[R]\f[V]:\f[R]\f[I]dir2\f[R]\f[V]:\f[R]... Uses the specified path to search for source files in the specified path. If this option is not specified, then use the default path of dot -(\f[CB]\&.\f[R]). -.RS -.RE +(\f[V].\f[R]). .TP -.B \f[CB]\-attach\f[R] \f[I]address\f[R] +\f[V]-attach\f[R] \f[I]address\f[R] Attaches the debugger to a running JVM with the default connection mechanism. -.RS -.RE .TP -.B \f[CB]\-listen\f[R] \f[I]address\f[R] +\f[V]-listen\f[R] \f[I]address\f[R] Waits for a running JVM to connect to the specified address with a standard connector. -.RS -.RE .TP -.B \f[CB]\-listenany\f[R] +\f[V]-listenany\f[R] Waits for a running JVM to connect at any available address using a standard connector. -.RS -.RE .TP -.B \f[CB]\-launch\f[R] +\f[V]-launch\f[R] Starts the debugged application immediately upon startup of the -\f[CB]jdb\f[R] command. -The \f[CB]\-launch\f[R] option removes the need for the \f[CB]run\f[R] +\f[V]jdb\f[R] command. +The \f[V]-launch\f[R] option removes the need for the \f[V]run\f[R] command. The debugged application is launched and then stopped just before the initial application class is loaded. At that point, you can set any necessary breakpoints and use the -\f[CB]cont\f[R] command to continue execution. -.RS -.RE +\f[V]cont\f[R] command to continue execution. .TP -.B \f[CB]\-listconnectors\f[R] +\f[V]-listconnectors\f[R] Lists the connectors available in this JVM. -.RS -.RE .TP -.B \f[CB]\-connect\f[R] \f[I]connector\-name\f[R]\f[CB]:\f[R]\f[I]name1\f[R]\f[CB]=\f[R]\f[I]value1\f[R].... +\f[V]-connect\f[R] \f[I]connector-name\f[R]\f[V]:\f[R]\f[I]name1\f[R]\f[V]=\f[R]\f[I]value1\f[R].... Connects to the target JVM with the named connector and listed argument values. -.RS -.RE .TP -.B \f[CB]\-dbgtrace\f[R] [\f[I]flags\f[R]] -Prints information for debugging the \f[CB]jdb\f[R] command. -.RS -.RE +\f[V]-dbgtrace\f[R] [\f[I]flags\f[R]] +Prints information for debugging the \f[V]jdb\f[R] command. .TP -.B \f[CB]\-tclient\f[R] +\f[V]-tclient\f[R] Runs the application in the Java HotSpot VM client. -.RS -.RE .TP -.B \f[CB]\-trackallthreads\f[R] +\f[V]-trackallthreads\f[R] Track all threads as they are created, including virtual threads. See \f[B]Working With Virtual Threads\f[R] below. Virtual threads are a preview feature of the Java platform. -.RS -.RE .TP -.B \f[CB]\-tserver\f[R] +\f[V]-tserver\f[R] Runs the application in the Java HotSpot VM server. -.RS -.RE .TP -.B \f[CB]\-J\f[R]\f[I]option\f[R] +\f[V]-J\f[R]\f[I]option\f[R] Passes \f[I]option\f[R] to the JDB JVM, where option is one of the options described on the reference page for the Java application launcher. -For example, \f[CB]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB. See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R]. -.RS -.RE .PP The following options are forwarded to the debuggee process: .TP -.B \f[CB]\-R\f[R]\f[I]option\f[R] +\f[V]-R\f[R]\f[I]option\f[R] Passes \f[I]option\f[R] to the debuggee JVM, where option is one of the options described on the reference page for the Java application launcher. -For example, \f[CB]\-R\-Xms48m\f[R] sets the startup memory to 48 MB. +For example, \f[V]-R-Xms48m\f[R] sets the startup memory to 48 MB. See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R]. -.RS -.RE .TP -.B \f[CB]\-v\f[R] or \f[CB]\-verbose\f[R][\f[CB]:\f[R]\f[I]class\f[R]|\f[CB]gc\f[R]|\f[CB]jni\f[R]] +\f[V]-v\f[R] or \f[V]-verbose\f[R][\f[V]:\f[R]\f[I]class\f[R]|\f[V]gc\f[R]|\f[V]jni\f[R]] Turns on the verbose mode. -.RS -.RE .TP -.B \f[CB]\-D\f[R]\f[I]name\f[R]\f[CB]=\f[R]\f[I]value\f[R] +\f[V]-D\f[R]\f[I]name\f[R]\f[V]=\f[R]\f[I]value\f[R] Sets a system property. -.RS -.RE .TP -.B \f[CB]\-classpath\f[R] \f[I]dir\f[R] +\f[V]-classpath\f[R] \f[I]dir\f[R] Lists directories separated by colons in which to look for classes. -.RS -.RE .TP -.B \f[CB]\-X\f[R] \f[I]option\f[R] +\f[V]-X\f[R] \f[I]option\f[R] A nonstandard target JVM option. -.RS -.RE .PP Other options are supported to provide alternate mechanisms for connecting the debugger to the JVM that it\[aq]s to debug. @@ -290,7 +262,7 @@ For this reason by default JDB does not keep track of virtual threads as they are created. It will only keep track of virtual threads that an event has arrived on, such as a breakpoint event. -The \f[CB]\-trackallthreads\f[R] option can be used to make JDB track all +The \f[V]-trackallthreads\f[R] option can be used to make JDB track all virtual threads as they are created. .PP When JDB first connects, it requests a list of all known threads from @@ -298,12 +270,12 @@ the Debug Agent. By default the debug agent does not return any virtual threads in this list, once again because the list could be so large that it overwhelms the debugger. -The Debug Agent has an \f[CB]includevirtualthreads\f[R] option that can be -enabled to change this behavior so all known virtual threads will be +The Debug Agent has an \f[V]includevirtualthreads\f[R] option that can +be enabled to change this behavior so all known virtual threads will be included in the list. -The JDB \f[CB]\-trackallthreads\f[R] option will cause JDB to +The JDB \f[V]-trackallthreads\f[R] option will cause JDB to automatically enable the Debug Agent\[aq]s -\f[CB]includevirtualthreads\f[R] option when JDB launches an application +\f[V]includevirtualthreads\f[R] option when JDB launches an application to debug. However, keep in mind that the Debug Agent may not know about any virtual threads that were created before JDB attached to the debugged diff --git a/src/jdk.jfr/share/man/jfr.1 b/src/jdk.jfr/share/man/jfr.1 index aa0c64b4ed704..993575f817698 100644 --- a/src/jdk.jfr/share/man/jfr.1 +++ b/src/jdk.jfr/share/man/jfr.1 @@ -19,57 +19,64 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JFR" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JFR" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jfr \- parse and print Flight Recorder files +jfr - parse and print Flight Recorder files .SH SYNOPSIS .PP To print the contents of a flight recording to standard out: .PP -\f[CB]jfr\f[R] \f[CB]print\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +\f[V]jfr\f[R] \f[V]print\f[R] [\f[I]options\f[R]] \f[I]file\f[R] .PP To print metadata information about flight recording events: .PP -\f[CB]jfr\f[R] \f[CB]metadata\f[R] \f[I]file\f[R] +\f[V]jfr\f[R] \f[V]metadata\f[R] \f[I]file\f[R] .PP To assemble chunk files into a flight recording file: .PP -\f[CB]jfr\f[R] \f[CB]assemble\f[R] \f[I]repository\f[R] \f[I]file\f[R] +\f[V]jfr\f[R] \f[V]assemble\f[R] \f[I]repository\f[R] \f[I]file\f[R] .PP To disassemble a flight recording file into chunk files: .PP -\f[CB]jfr\f[R] \f[CB]disassmble\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +\f[V]jfr\f[R] \f[V]disassmble\f[R] [\f[I]options\f[R]] \f[I]file\f[R] .PP To view the summary statistics for a flight recording file: .PP -\f[CB]jfr\f[R] \f[CB]summary\f[R] \f[I]file\f[R] +\f[V]jfr\f[R] \f[V]summary\f[R] \f[I]file\f[R] .TP -.B \f[I]options\f[R] -Optional: Specifies command\-line options separated by spaces. +\f[I]options\f[R] +Optional: Specifies command-line options separated by spaces. See the individual subcomponent sections for descriptions of the available options. -.RS -.RE .TP -.B \f[I]file\f[R] -Specifies the name of the target flight recording file -(\f[CB]\&.jfr\f[R]). -.RS -.RE +\f[I]file\f[R] +Specifies the name of the target flight recording file (\f[V].jfr\f[R]). .TP -.B \f[I]repository\f[R] +\f[I]repository\f[R] Specifies the location of the chunk files which are to be assembled into a flight recording. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jfr\f[R] command provides a tool for interacting with flight -recorder files (\f[CB]\&.jfr\f[R]). +The \f[V]jfr\f[R] command provides a tool for interacting with flight +recorder files (\f[V].jfr\f[R]). The main function is to filter, summarize and output flight recording files into human readable format. There is also support for merging and splitting recording files. @@ -80,77 +87,65 @@ manipulate the contents and translate them into human readable format helps developers to debug performance issues with Java applications. .SS Subcommands .PP -The \f[CB]jfr\f[R] command has several subcommands: +The \f[V]jfr\f[R] command has several subcommands: .IP \[bu] 2 -\f[CB]print\f[R] +\f[V]print\f[R] .IP \[bu] 2 -\f[CB]summary\f[R] +\f[V]summary\f[R] .IP \[bu] 2 -\f[CB]assemble\f[R] +\f[V]assemble\f[R] .IP \[bu] 2 -\f[CB]disassemble\f[R] +\f[V]disassemble\f[R] .IP \[bu] 2 -\f[CB]metadata\f[R] -.SS \f[CB]jfr\ print\f[R] subcommand +\f[V]metadata\f[R] +.SS \f[V]jfr print\f[R] subcommand .PP -Use \f[CB]jfr\ print\f[R] to print the contents of a flight recording file +Use \f[V]jfr print\f[R] to print the contents of a flight recording file to standard out. The syntax is: .PP -\f[CB]jfr\ print\f[R] [\f[CB]\-\-xml\f[R]|\f[CB]\-\-json\f[R]] -[\f[CB]\-\-categories\f[R] <\f[I]filters\f[R]>] [\f[CB]\-\-events\f[R] -<\f[I]filters\f[R]>] [\f[CB]\-\-stack\-depth\f[R] <\f[I]depth\f[R]>] +\f[V]jfr print\f[R] [\f[V]--xml\f[R]|\f[V]--json\f[R]] +[\f[V]--categories\f[R] <\f[I]filters\f[R]>] [\f[V]--events\f[R] +<\f[I]filters\f[R]>] [\f[V]--stack-depth\f[R] <\f[I]depth\f[R]>] <\f[I]file\f[R]> .PP where: .TP -.B \f[CB]\-\-xml\f[R] +\f[V]--xml\f[R] Print the recording in XML format -.RS -.RE .TP -.B \f[CB]\-\-json\f[R] +\f[V]--json\f[R] Print the recording in JSON format -.RS -.RE .TP -.B \f[CB]\-\-categories\f[R] <\f[I]filters\f[R]> +\f[V]--categories\f[R] <\f[I]filters\f[R]> Select events matching a category name. -The filter is a comma\-separated list of names, simple and/or qualified, +The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns -.RS -.RE .TP -.B \f[CB]\-\-events\f[R] <\f[I]filters\f[R]> +\f[V]--events\f[R] <\f[I]filters\f[R]> Select events matching an event name. -The filter is a comma\-separated list of names, simple and/or qualified, +The filter is a comma-separated list of names, simple and/or qualified, and/or quoted glob patterns -.RS -.RE .TP -.B \f[CB]\-\-stack\-depth\f[R] <\f[I]depth\f[R]> +\f[V]--stack-depth\f[R] <\f[I]depth\f[R]> Number of frames in stack traces, by default 5 -.RS -.RE .TP -.B <\f[I]file\f[R]> -Location of the recording file (\f[CB]\&.jfr\f[R]) -.RS -.RE +<\f[I]file\f[R]> +Location of the recording file (\f[V].jfr\f[R]) .PP The default format for printing the contents of the flight recording -file is human readable form unless either \f[CB]xml\f[R] or \f[CB]json\f[R] -is specified. -These options provide machine\-readable output that can be further -parsed or processed by user created scripts. +file is human readable form unless either \f[V]xml\f[R] or +\f[V]json\f[R] is specified. +These options provide machine-readable output that can be further parsed +or processed by user created scripts. .PP -Use \f[CB]jfr\ \-\-help\ print\f[R] to see example usage of filters. +Use \f[V]jfr --help print\f[R] to see example usage of filters. .PP To reduce the amount of data displayed, it is possible to filter out events or categories of events. The filter operates on the symbolic name of an event, set by using the -\f[CB]\@Name\f[R] annotation, or the category name, set by using the -\f[CB]\@Category\f[R] annotation. +\f[V]\[at]Name\f[R] annotation, or the category name, set by using the +\f[V]\[at]Category\f[R] annotation. If multiple filters are used, events from both filters will be included. If no filter is used, all the events will be printed. If a combination of a category filter and event filter is used, the @@ -159,19 +154,19 @@ selected events will be the union of the two filters. For example, to show all GC events and the CPULoad event, the following command could be used: .PP -\f[CB]jfr\ print\ \-\-categories\ GC\ \-\-events\ CPULoad\ recording.jfr\f[R] +\f[V]jfr print --categories GC --events CPULoad recording.jfr\f[R] .PP Event values are formatted according to the content types that are being used. -For example, a field with the \f[CB]jdk.jfr.Percentage\f[R] annotation +For example, a field with the \f[V]jdk.jfr.Percentage\f[R] annotation that has the value 0.52 is formatted as 52%. .PP Stack traces are by default truncated to 5 frames, but the number can be -increased/decreased using the \f[CB]\-\-stack\-depth\f[R] command\-line +increased/decreased using the \f[V]--stack-depth\f[R] command-line option. -.SS \f[CB]jfr\ summary\f[R] subcommand +.SS \f[V]jfr summary\f[R] subcommand .PP -Use \f[CB]jfr\ summary\f[R] to print statistics for a recording. +Use \f[V]jfr summary\f[R] to print statistics for a recording. For example, a summary can illustrate the number of recorded events and how much disk space they used. This is useful for troubleshooting and understanding the impact of event @@ -179,117 +174,102 @@ settings. .PP The syntax is: .PP -\f[CB]jfr\ summary\f[R] <\f[I]file\f[R]> +\f[V]jfr summary\f[R] <\f[I]file\f[R]> .PP where: .TP -.B <\f[I]file\f[R]> -Location of the flight recording file (\f[CB]\&.jfr\f[R]) -.RS -.RE -.SS \f[CB]jfr\ metadata\f[R] subcommand +<\f[I]file\f[R]> +Location of the flight recording file (\f[V].jfr\f[R]) +.SS \f[V]jfr metadata\f[R] subcommand .PP -Use \f[CB]jfr\ metadata\f[R] to view information about events, such as +Use \f[V]jfr metadata\f[R] to view information about events, such as event names, categories and field layout within a flight recording file. The syntax is: .PP -\f[CB]jfr\ metadata\f[R] <\f[I]file\f[R]> +\f[V]jfr metadata\f[R] <\f[I]file\f[R]> .PP where: .TP -.B <\f[I]file\f[R]> -Location of the flight recording file (\f[CB]\&.jfr\f[R]) -.RS -.RE -.SS jfr \f[CB]assemble\f[R] subcommand +<\f[I]file\f[R]> +Location of the flight recording file (\f[V].jfr\f[R]) +.SS jfr \f[V]assemble\f[R] subcommand .PP -Use jfr \f[CB]assemble\f[R] to assemble chunk files into a recording file. +Use jfr \f[V]assemble\f[R] to assemble chunk files into a recording +file. .PP The syntax is: .PP -\f[CB]jfr\ assemble\f[R] <\f[I]repository\f[R]> <\f[I]file\f[R]> +\f[V]jfr assemble\f[R] <\f[I]repository\f[R]> <\f[I]file\f[R]> .PP where: .TP -.B <\f[I]repository\f[R]> +<\f[I]repository\f[R]> Directory where the repository containing chunk files is located -.RS -.RE .TP -.B <\f[I]file\f[R]> -Location of the flight recording file (\f[CB]\&.jfr\f[R]) -.RS -.RE +<\f[I]file\f[R]> +Location of the flight recording file (\f[V].jfr\f[R]) .PP Flight recording information is written in chunks. A chunk contains all of the information necessary for parsing. A chunk typically contains events useful for troubleshooting. If a JVM should crash, these chunks can be recovered and used to create -a flight recording file using this \f[CB]jfr\ assemble\f[R] command. +a flight recording file using this \f[V]jfr assemble\f[R] command. These chunk files are concatenated in chronological order and chunk files that are not finished (.part) are excluded. -.SS \f[CB]jfr\ disassemble\f[R] subcommand +.SS \f[V]jfr disassemble\f[R] subcommand .PP -Use \f[CB]jfr\ disassemble\f[R] to decompose a flight recording file into +Use \f[V]jfr disassemble\f[R] to decompose a flight recording file into its chunk file pieces. The syntax is: .PP -\f[CB]jfr\ disassemble\f[R] [\f[CB]\-\-max\-chunks\f[R] <\f[I]chunks\f[R]>] -[\f[CB]\-\-output\f[R] <\f[I]directory\f[R]>] <\f[I]file\f[R]> +\f[V]jfr disassemble\f[R] [\f[V]--max-chunks\f[R] <\f[I]chunks\f[R]>] +[\f[V]--output\f[R] <\f[I]directory\f[R]>] <\f[I]file\f[R]> .PP where: .TP -.B \f[CB]\-\-output\f[R] <\f[I]directory\f[R]> +\f[V]--output\f[R] <\f[I]directory\f[R]> The location to write the disassembled file, by default the current directory -.RS -.RE .TP -.B \f[CB]\-\-max\-chunks\f[R] <\f[I]chunks\f[R]> +\f[V]--max-chunks\f[R] <\f[I]chunks\f[R]> Maximum number of chunks per file, by default 5. The chunk size varies, but is typically around 15 MB. -.RS -.RE .TP -.B \f[CB]\-\-max\-size\f[R] <\f[I]size\f[R]> +\f[V]--max-size\f[R] <\f[I]size\f[R]> Maximum number of bytes per file. -.RS -.RE .TP -.B <\f[I]file\f[R]> -Location of the flight recording file (\f[CB]\&.jfr\f[R]) -.RS -.RE +<\f[I]file\f[R]> +Location of the flight recording file (\f[V].jfr\f[R]) .PP This function can be useful for repairing a broken file by removing the faulty chunk. It can also be used to reduce the size of a file that is too large to transfer. -The resulting chunk files are named \f[CB]myfile_1.jfr\f[R], -\f[CB]myfile_2.jfr\f[R], etc. +The resulting chunk files are named \f[V]myfile_1.jfr\f[R], +\f[V]myfile_2.jfr\f[R], etc. If needed, the resulting file names will be padded with zeros to preserve chronological order. -For example, the chunk file name is \f[CB]myfile_001.jfr\f[R] if the +For example, the chunk file name is \f[V]myfile_001.jfr\f[R] if the recording consists of more than 100 chunks. .SS jfr version and help subcommands .PP -Use \f[CB]jfr\ \-\-version\f[R] or \f[CB]jfr\ version\f[R] to view the -version string information for this jfr command. +Use \f[V]jfr --version\f[R] or \f[V]jfr version\f[R] to view the version +string information for this jfr command. .PP To get help on any of the jfr subcommands, use: .PP -\f[CB]jfr\ <\-\-help|help>\f[R] [\f[I]subcommand\f[R]] +\f[V]jfr <--help|help>\f[R] [\f[I]subcommand\f[R]] .PP where: .PP [\f[I]subcommand\f[R]] is any of: .IP \[bu] 2 -\f[CB]print\f[R] +\f[V]print\f[R] .IP \[bu] 2 -\f[CB]metadata\f[R] +\f[V]metadata\f[R] .IP \[bu] 2 -\f[CB]summary\f[R] +\f[V]summary\f[R] .IP \[bu] 2 -\f[CB]assemble\f[R] +\f[V]assemble\f[R] .IP \[bu] 2 -\f[CB]disassemble\f[R] +\f[V]disassemble\f[R] diff --git a/src/jdk.jlink/share/man/jlink.1 b/src/jdk.jlink/share/man/jlink.1 index ddec44d442791..4c58e8cc9b3ae 100644 --- a/src/jdk.jlink/share/man/jlink.1 +++ b/src/jdk.jlink/share/man/jlink.1 @@ -19,41 +19,49 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JLINK" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JLINK" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jlink \- assemble and optimize a set of modules and their dependencies +jlink - assemble and optimize a set of modules and their dependencies into a custom runtime image .SH SYNOPSIS .PP -\f[CB]jlink\f[R] [\f[I]options\f[R]] \f[CB]\-\-module\-path\f[R] -\f[I]modulepath\f[R] \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R] [, +\f[V]jlink\f[R] [\f[I]options\f[R]] \f[V]--module-path\f[R] +\f[I]modulepath\f[R] \f[V]--add-modules\f[R] \f[I]module\f[R] [, \f[I]module\f[R]...] .TP -.B \f[I]options\f[R] -Command\-line options separated by spaces. +\f[I]options\f[R] +Command-line options separated by spaces. See \f[B]jlink Options\f[R]. -.RS -.RE .TP -.B \f[I]modulepath\f[R] -The path where the \f[CB]jlink\f[R] tool discovers observable modules. +\f[I]modulepath\f[R] +The path where the \f[V]jlink\f[R] tool discovers observable modules. These modules can be modular JAR files, JMOD files, or exploded modules. -.RS -.RE .TP -.B \f[I]module\f[R] +\f[I]module\f[R] The names of the modules to add to the runtime image. -The \f[CB]jlink\f[R] tool adds these modules and their transitive +The \f[V]jlink\f[R] tool adds these modules and their transitive dependencies. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jlink\f[R] tool links a set of modules, along with their +The \f[V]jlink\f[R] tool links a set of modules, along with their transitive dependences, to create a custom runtime image. .PP \f[B]Note:\f[R] @@ -61,120 +69,90 @@ transitive dependences, to create a custom runtime image. Developers are responsible for updating their custom runtime images. .SH JLINK OPTIONS .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]mod\f[R] [\f[CB],\f[R] \f[I]mod\f[R]...] +\f[V]--add-modules\f[R] \f[I]mod\f[R] [\f[V],\f[R] \f[I]mod\f[R]...] Adds the named modules, \f[I]mod\f[R], to the default set of root modules. The default set of root modules is empty. -.RS -.RE .TP -.B \f[CB]\-\-bind\-services\f[R] +\f[V]--bind-services\f[R] Link service provider modules and their dependencies. -.RS -.RE .TP -.B \f[CB]\-c\ ={0|1|2}\f[R] or \f[CB]\-\-compress={0|1|2}\f[R] +\f[V]-c ={0|1|2}\f[R] or \f[V]--compress={0|1|2}\f[R] Enable compression of resources: .RS .IP \[bu] 2 -\f[CB]0\f[R]: No compression +\f[V]0\f[R]: No compression .IP \[bu] 2 -\f[CB]1\f[R]: Constant string sharing +\f[V]1\f[R]: Constant string sharing .IP \[bu] 2 -\f[CB]2\f[R]: ZIP +\f[V]2\f[R]: ZIP .RE .TP -.B \f[CB]\-\-disable\-plugin\f[R] \f[I]pluginname\f[R] -Disables the specified plug\-in. -See \f[B]jlink Plug\-ins\f[R] for the list of supported plug\-ins. -.RS -.RE +\f[V]--disable-plugin\f[R] \f[I]pluginname\f[R] +Disables the specified plug-in. +See \f[B]jlink Plug-ins\f[R] for the list of supported plug-ins. .TP -.B \f[CB]\-\-endian\f[R] {\f[CB]little\f[R]|\f[CB]big\f[R]} +\f[V]--endian\f[R] {\f[V]little\f[R]|\f[V]big\f[R]} Specifies the byte order of the generated image. The default value is the format of your system\[aq]s architecture. -.RS -.RE .TP -.B \f[CB]\-h\f[R] or \f[CB]\-\-help\f[R] +\f[V]-h\f[R] or \f[V]--help\f[R] Prints the help message. -.RS -.RE .TP -.B \f[CB]\-\-ignore\-signing\-information\f[R] +\f[V]--ignore-signing-information\f[R] Suppresses a fatal error when signed modular JARs are linked in the runtime image. -The signature\-related files of the signed modular JARs aren\[aq]t -copied to the runtime image. -.RS -.RE +The signature-related files of the signed modular JARs aren\[aq]t copied +to the runtime image. .TP -.B \f[CB]\-\-launcher\f[R] \f[I]command\f[R]\f[CB]=\f[R]\f[I]module\f[R] or \f[CB]\-\-launcher\f[R] \f[I]command\f[R]\f[CB]=\f[R]\f[I]module\f[R]\f[CB]/\f[R]\f[I]main\f[R] +\f[V]--launcher\f[R] \f[I]command\f[R]\f[V]=\f[R]\f[I]module\f[R] or \f[V]--launcher\f[R] \f[I]command\f[R]\f[V]=\f[R]\f[I]module\f[R]\f[V]/\f[R]\f[I]main\f[R] Specifies the launcher command name for the module or the command name for the module and main class (the module and the main class names are -separated by a slash (\f[CB]/\f[R])). -.RS -.RE +separated by a slash (\f[V]/\f[R])). .TP -.B \f[CB]\-\-limit\-modules\f[R] \f[I]mod\f[R] [\f[CB],\f[R] \f[I]mod\f[R]...] +\f[V]--limit-modules\f[R] \f[I]mod\f[R] [\f[V],\f[R] \f[I]mod\f[R]...] Limits the universe of observable modules to those in the transitive -closure of the named modules, \f[CB]mod\f[R], plus the main module, if -any, plus any further modules specified in the \f[CB]\-\-add\-modules\f[R] +closure of the named modules, \f[V]mod\f[R], plus the main module, if +any, plus any further modules specified in the \f[V]--add-modules\f[R] option. -.RS -.RE .TP -.B \f[CB]\-\-list\-plugins\f[R] -Lists available plug\-ins, which you can access through command\-line -options; see \f[B]jlink Plug\-ins\f[R]. -.RS -.RE +\f[V]--list-plugins\f[R] +Lists available plug-ins, which you can access through command-line +options; see \f[B]jlink Plug-ins\f[R]. .TP -.B \f[CB]\-p\f[R] or \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R] +\f[V]-p\f[R] or \f[V]--module-path\f[R] \f[I]modulepath\f[R] Specifies the module path. .RS .PP If this option is not specified, then the default module path is -\f[CB]$JAVA_HOME/jmods\f[R]. -This directory contains the \f[CB]java.base\f[R] module and the other +\f[V]$JAVA_HOME/jmods\f[R]. +This directory contains the \f[V]java.base\f[R] module and the other standard and JDK modules. -If this option is specified but the \f[CB]java.base\f[R] module cannot be -resolved from it, then the \f[CB]jlink\f[R] command appends -\f[CB]$JAVA_HOME/jmods\f[R] to the module path. +If this option is specified but the \f[V]java.base\f[R] module cannot be +resolved from it, then the \f[V]jlink\f[R] command appends +\f[V]$JAVA_HOME/jmods\f[R] to the module path. .RE .TP -.B \f[CB]\-\-no\-header\-files\f[R] +\f[V]--no-header-files\f[R] Excludes header files. -.RS -.RE .TP -.B \f[CB]\-\-no\-man\-pages\f[R] +\f[V]--no-man-pages\f[R] Excludes man pages. -.RS -.RE .TP -.B \f[CB]\-\-output\f[R] \f[I]path\f[R] +\f[V]--output\f[R] \f[I]path\f[R] Specifies the location of the generated runtime image. -.RS -.RE .TP -.B \f[CB]\-\-save\-opts\f[R] \f[I]filename\f[R] -Saves \f[CB]jlink\f[R] options in the specified file. -.RS -.RE +\f[V]--save-opts\f[R] \f[I]filename\f[R] +Saves \f[V]jlink\f[R] options in the specified file. .TP -.B \f[CB]\-\-suggest\-providers\f[R] [\f[I]name\f[R]\f[CB],\f[R] ...] +\f[V]--suggest-providers\f[R] [\f[I]name\f[R]\f[V],\f[R] ...] Suggest providers that implement the given service types from the module path. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Prints version information. -.RS -.RE .TP -.B \f[CB]\@\f[R]\f[I]filename\f[R] +\f[V]\[at]\f[R]\f[I]filename\f[R] Reads options from the specified file. .RS .PP @@ -182,55 +160,53 @@ An options file is a text file that contains the options and values that you would typically enter in a command prompt. Options may appear on one line or on several lines. You may not specify environment variables for path names. -You may comment out lines by prefixing a hash symbol (\f[CB]#\f[R]) to the -beginning of the line. +You may comment out lines by prefixing a hash symbol (\f[V]#\f[R]) to +the beginning of the line. .PP -The following is an example of an options file for the \f[CB]jlink\f[R] +The following is an example of an options file for the \f[V]jlink\f[R] command: .IP .nf \f[CB] -#Wed\ Dec\ 07\ 00:40:19\ EST\ 2016 -\-\-module\-path\ mlib -\-\-add\-modules\ com.greetings -\-\-output\ greetingsapp +#Wed Dec 07 00:40:19 EST 2016 +--module-path mlib +--add-modules com.greetings +--output greetingsapp \f[R] .fi .RE -.SH JLINK PLUG\-INS +.SH JLINK PLUG-INS .PP \f[B]Note:\f[R] .PP -Plug\-ins not listed in this section aren\[aq]t supported and are -subject to change. +Plug-ins not listed in this section aren\[aq]t supported and are subject +to change. .PP -For plug\-in options that require a \f[I]pattern\-list\f[R], the value is -a comma\-separated list of elements, with each element using one the +For plug-in options that require a \f[I]pattern-list\f[R], the value is +a comma-separated list of elements, with each element using one the following forms: .IP \[bu] 2 -\f[I]glob\-pattern\f[R] +\f[I]glob-pattern\f[R] .IP \[bu] 2 -\f[CB]glob:\f[R]\f[I]glob\-pattern\f[R] +\f[V]glob:\f[R]\f[I]glob-pattern\f[R] .IP \[bu] 2 -\f[CB]regex:\f[R]\f[I]regex\-pattern\f[R] +\f[V]regex:\f[R]\f[I]regex-pattern\f[R] .IP \[bu] 2 -\f[CB]\@\f[R]\f[I]filename\f[R] +\f[V]\[at]\f[R]\f[I]filename\f[R] .RS 2 .IP \[bu] 2 \f[I]filename\f[R] is the name of a file that contains patterns to be used, one pattern per line. .RE .PP -For a complete list of all available plug\-ins, run the command -\f[CB]jlink\ \-\-list\-plugins\f[R]. -.SS Plugin \f[CB]compress\f[R] +For a complete list of all available plug-ins, run the command +\f[V]jlink --list-plugins\f[R]. +.SS Plugin \f[V]compress\f[R] .TP -.B Options -\f[CB]\-\-compress=\f[R]{\f[CB]0\f[R]|\f[CB]1\f[R]|\f[CB]2\f[R]}[\f[CB]:filter=\f[R]\f[I]pattern\-list\f[R]] -.RS -.RE +Options +\f[V]--compress=\f[R]{\f[V]0\f[R]|\f[V]1\f[R]|\f[V]2\f[R]}[\f[V]:filter=\f[R]\f[I]pattern-list\f[R]] .TP -.B Description +Description Compresses all resources in the output image. .RS .IP \[bu] 2 @@ -240,19 +216,17 @@ Level 1: Constant string sharing .IP \[bu] 2 Level 2: ZIP .PP -An optional \f[I]pattern\-list\f[R] filter can be specified to list the +An optional \f[I]pattern-list\f[R] filter can be specified to list the pattern of files to include. .RE -.SS Plugin \f[CB]include\-locales\f[R] +.SS Plugin \f[V]include-locales\f[R] .TP -.B Options -\f[CB]\-\-include\-locales=\f[R]\f[I]langtag\f[R][\f[CB],\f[R]\f[I]langtag\f[R]]* -.RS -.RE +Options +\f[V]--include-locales=\f[R]\f[I]langtag\f[R][\f[V],\f[R]\f[I]langtag\f[R]]* .TP -.B Description -Includes the list of locales where \f[I]langtag\f[R] is a BCP 47 language -tag. +Description +Includes the list of locales where \f[I]langtag\f[R] is a BCP 47 +language tag. This option supports locale matching as defined in RFC 4647. Ensure that you add the module jdk.localedata when using this option. .RS @@ -260,74 +234,64 @@ Ensure that you add the module jdk.localedata when using this option. Example: .RS .PP -\f[CB]\-\-add\-modules\ jdk.localedata\ \-\-include\-locales=en,ja,*\-IN\f[R] +\f[V]--add-modules jdk.localedata --include-locales=en,ja,*-IN\f[R] .RE .RE -.SS Plugin \f[CB]order\-resources\f[R] +.SS Plugin \f[V]order-resources\f[R] .TP -.B Options -\f[CB]\-\-order\-resources=\f[R]\f[I]pattern\-list\f[R] -.RS -.RE +Options +\f[V]--order-resources=\f[R]\f[I]pattern-list\f[R] .TP -.B Description +Description Orders the specified paths in priority order. -If \f[CB]\@\f[R]\f[I]filename\f[R] is specified, then each line in -\f[I]pattern\-list\f[R] must be an exact match for the paths to be +If \f[V]\[at]\f[R]\f[I]filename\f[R] is specified, then each line in +\f[I]pattern-list\f[R] must be an exact match for the paths to be ordered. .RS .PP Example: .RS .PP -\f[CB]\-\-order\-resources=/module\-info.class,\@classlist,/java.base/java/lang/\f[R] +\f[V]--order-resources=/module-info.class,\[at]classlist,/java.base/java/lang/\f[R] .RE .RE -.SS Plugin \f[CB]strip\-debug\f[R] +.SS Plugin \f[V]strip-debug\f[R] .TP -.B Options -\f[CB]\-\-strip\-debug\f[R] -.RS -.RE +Options +\f[V]--strip-debug\f[R] .TP -.B Description +Description Strips debug information from the output image. -.RS -.RE -.SS Plugin \f[CB]generate\-cds\-archive\f[R] +.SS Plugin \f[V]generate-cds-archive\f[R] .TP -.B Options -\f[CB]\-\-generate\-cds\-archive\f[R] -.RS -.RE +Options +\f[V]--generate-cds-archive\f[R] .TP -.B Description +Description Generate CDS archive if the runtime image supports the CDS feature. -.RS -.RE .SH JLINK EXAMPLES .PP The following command creates a runtime image in the directory -\f[CB]greetingsapp\f[R]. -This command links the module \f[CB]com.greetings\f[R], whose module -definition is contained in the directory \f[CB]mlib\f[R]. +\f[V]greetingsapp\f[R]. +This command links the module \f[V]com.greetings\f[R], whose module +definition is contained in the directory \f[V]mlib\f[R]. .IP .nf \f[CB] -jlink\ \-\-module\-path\ mlib\ \-\-add\-modules\ com.greetings\ \-\-output\ greetingsapp +jlink --module-path mlib --add-modules com.greetings --output greetingsapp \f[R] .fi .PP The following command lists the modules in the runtime image -\f[CB]greetingsapp\f[R]: +\f[V]greetingsapp\f[R]: .IP .nf \f[CB] -greetingsapp/bin/java\ \-\-list\-modules +greetingsapp/bin/java --list-modules com.greetings -java.base\@11 -java.logging\@11 -org.astro\@1.0 +java.base\[at]11 +java.logging\[at]11 +org.astro\[at]1.0 \f[R] .fi .PP @@ -337,64 +301,64 @@ reduce space, and includes French language locale information: .IP .nf \f[CB] -jlink\ \-\-add\-modules\ jdk.localedata\ \-\-strip\-debug\ \-\-compress=2\ \-\-include\-locales=fr\ \-\-output\ compressedrt +jlink --add-modules jdk.localedata --strip-debug --compress=2 --include-locales=fr --output compressedrt \f[R] .fi .PP The following example compares the size of the runtime image -\f[CB]compressedrt\f[R] with \f[CB]fr_rt\f[R], which isn\[aq]t stripped of +\f[V]compressedrt\f[R] with \f[V]fr_rt\f[R], which isn\[aq]t stripped of debug symbols and doesn\[aq]t use compression: .IP .nf \f[CB] -jlink\ \-\-add\-modules\ jdk.localedata\ \-\-include\-locales=fr\ \-\-output\ fr_rt +jlink --add-modules jdk.localedata --include-locales=fr --output fr_rt -du\ \-sh\ ./compressedrt\ ./fr_rt -23M\ \ \ \ \ ./compressedrt -36M\ \ \ \ \ ./fr_rt +du -sh ./compressedrt ./fr_rt +23M ./compressedrt +36M ./fr_rt \f[R] .fi .PP The following example lists the providers that implement -\f[CB]java.security.Provider\f[R]: +\f[V]java.security.Provider\f[R]: .IP .nf \f[CB] -jlink\ \-\-suggest\-providers\ java.security.Provider +jlink --suggest-providers java.security.Provider -Suggested\ providers: -\ \ java.naming\ provides\ java.security.Provider\ used\ by\ java.base -\ \ java.security.jgss\ provides\ java.security.Provider\ used\ by\ java.base -\ \ java.security.sasl\ provides\ java.security.Provider\ used\ by\ java.base -\ \ java.smartcardio\ provides\ java.security.Provider\ used\ by\ java.base -\ \ java.xml.crypto\ provides\ java.security.Provider\ used\ by\ java.base -\ \ jdk.crypto.cryptoki\ provides\ java.security.Provider\ used\ by\ java.base -\ \ jdk.crypto.ec\ provides\ java.security.Provider\ used\ by\ java.base -\ \ jdk.crypto.mscapi\ provides\ java.security.Provider\ used\ by\ java.base -\ \ jdk.security.jgss\ provides\ java.security.Provider\ used\ by\ java.base +Suggested providers: + java.naming provides java.security.Provider used by java.base + java.security.jgss provides java.security.Provider used by java.base + java.security.sasl provides java.security.Provider used by java.base + java.smartcardio provides java.security.Provider used by java.base + java.xml.crypto provides java.security.Provider used by java.base + jdk.crypto.cryptoki provides java.security.Provider used by java.base + jdk.crypto.ec provides java.security.Provider used by java.base + jdk.crypto.mscapi provides java.security.Provider used by java.base + jdk.security.jgss provides java.security.Provider used by java.base \f[R] .fi .PP The following example creates a custom runtime image named -\f[CB]mybuild\f[R] that includes only \f[CB]java.naming\f[R] and -\f[CB]jdk.crypto.cryptoki\f[R] and their dependencies but no other +\f[V]mybuild\f[R] that includes only \f[V]java.naming\f[R] and +\f[V]jdk.crypto.cryptoki\f[R] and their dependencies but no other providers. Note that these dependencies must exist in the module path: .IP .nf \f[CB] -jlink\ \-\-add\-modules\ java.naming,jdk.crypto.cryptoki\ \-\-output\ mybuild +jlink --add-modules java.naming,jdk.crypto.cryptoki --output mybuild \f[R] .fi .PP The following command is similar to the one that creates a runtime image -named \f[CB]greetingsapp\f[R], except that it will link the modules +named \f[V]greetingsapp\f[R], except that it will link the modules resolved from root modules with service binding; see the -\f[B]\f[BC]Configuration.resolveAndBind\f[B]\f[R] method. +\f[B]\f[VB]Configuration.resolveAndBind\f[B]\f[R] method. .IP .nf \f[CB] -jlink\ \-\-module\-path\ mlib\ \-\-add\-modules\ com.greetings\ \-\-output\ greetingsapp\ \-\-bind\-services +jlink --module-path mlib --add-modules com.greetings --output greetingsapp --bind-services \f[R] .fi .PP @@ -403,43 +367,43 @@ greetingsapp created by this command: .IP .nf \f[CB] -greetingsapp/bin/java\ \-\-list\-modules +greetingsapp/bin/java --list-modules com.greetings -java.base\@11 -java.compiler\@11 -java.datatransfer\@11 -java.desktop\@11 -java.logging\@11 -java.management\@11 -java.management.rmi\@11 -java.naming\@11 -java.prefs\@11 -java.rmi\@11 -java.security.jgss\@11 -java.security.sasl\@11 -java.smartcardio\@11 -java.xml\@11 -java.xml.crypto\@11 -jdk.accessibility\@11 -jdk.charsets\@11 -jdk.compiler\@11 -jdk.crypto.cryptoki\@11 -jdk.crypto.ec\@11 -jdk.crypto.mscapi\@11 -jdk.internal.opt\@11 -jdk.jartool\@11 -jdk.javadoc\@11 -jdk.jdeps\@11 -jdk.jfr\@11 -jdk.jlink\@11 -jdk.localedata\@11 -jdk.management\@11 -jdk.management.jfr\@11 -jdk.naming.dns\@11 -jdk.naming.rmi\@11 -jdk.security.auth\@11 -jdk.security.jgss\@11 -jdk.zipfs\@11 -org.astro\@1.0 +java.base\[at]11 +java.compiler\[at]11 +java.datatransfer\[at]11 +java.desktop\[at]11 +java.logging\[at]11 +java.management\[at]11 +java.management.rmi\[at]11 +java.naming\[at]11 +java.prefs\[at]11 +java.rmi\[at]11 +java.security.jgss\[at]11 +java.security.sasl\[at]11 +java.smartcardio\[at]11 +java.xml\[at]11 +java.xml.crypto\[at]11 +jdk.accessibility\[at]11 +jdk.charsets\[at]11 +jdk.compiler\[at]11 +jdk.crypto.cryptoki\[at]11 +jdk.crypto.ec\[at]11 +jdk.crypto.mscapi\[at]11 +jdk.internal.opt\[at]11 +jdk.jartool\[at]11 +jdk.javadoc\[at]11 +jdk.jdeps\[at]11 +jdk.jfr\[at]11 +jdk.jlink\[at]11 +jdk.localedata\[at]11 +jdk.management\[at]11 +jdk.management.jfr\[at]11 +jdk.naming.dns\[at]11 +jdk.naming.rmi\[at]11 +jdk.security.auth\[at]11 +jdk.security.jgss\[at]11 +jdk.zipfs\[at]11 +org.astro\[at]1.0 \f[R] .fi diff --git a/src/jdk.jlink/share/man/jmod.1 b/src/jdk.jlink/share/man/jmod.1 index 4b233e4e356c8..06caed48425a7 100644 --- a/src/jdk.jlink/share/man/jmod.1 +++ b/src/jdk.jlink/share/man/jmod.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. +.\" Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. .\" .\" This code is free software; you can redistribute it and/or modify it @@ -19,219 +19,190 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JMOD" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JMOD" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jmod \- create JMOD files and list the content of existing JMOD files +jmod - create JMOD files and list the content of existing JMOD files .SH SYNOPSIS .PP -\f[CB]jmod\f[R] -(\f[CB]create\f[R]|\f[CB]extract\f[R]|\f[CB]list\f[R]|\f[CB]describe\f[R]|\f[CB]hash\f[R]) -[\f[I]options\f[R]] \f[I]jmod\-file\f[R] +\f[V]jmod\f[R] +(\f[V]create\f[R]|\f[V]extract\f[R]|\f[V]list\f[R]|\f[V]describe\f[R]|\f[V]hash\f[R]) +[\f[I]options\f[R]] \f[I]jmod-file\f[R] .PP Includes the following: .PP \f[B]Main operation modes\f[R] .TP -.B \f[CB]create\f[R] +\f[V]create\f[R] Creates a new JMOD archive file. -.RS -.RE .TP -.B \f[CB]extract\f[R] +\f[V]extract\f[R] Extracts all the files from the JMOD archive file. -.RS -.RE .TP -.B \f[CB]list\f[R] +\f[V]list\f[R] Prints the names of all the entries. -.RS -.RE .TP -.B \f[CB]describe\f[R] +\f[V]describe\f[R] Prints the module details. -.RS -.RE .TP -.B \f[CB]hash\f[R] +\f[V]hash\f[R] Determines leaf modules and records the hashes of the dependencies that directly and indirectly require them. -.RS -.RE .PP \f[B]Options\f[R] .TP -.B \f[I]options\f[R] +\f[I]options\f[R] See \f[B]Options for jmod\f[R]. -.RS -.RE .PP \f[B]Required\f[R] .TP -.B \f[I]jmod\-file\f[R] +\f[I]jmod-file\f[R] Specifies the name of the JMOD file to create or from which to retrieve information. -.RS -.RE .SH DESCRIPTION .PP \f[B]Note:\f[R] For most development tasks, including deploying modules on the module path or publishing them to a Maven repository, continue to package modules in modular JAR files. -The \f[CB]jmod\f[R] tool is intended for modules that have native +The \f[V]jmod\f[R] tool is intended for modules that have native libraries or other configuration files or for modules that you intend to link, with the \f[B]jlink\f[R] tool, to a runtime image. .PP The JMOD file format lets you aggregate files other than -\f[CB]\&.class\f[R] files, metadata, and resources. +\f[V].class\f[R] files, metadata, and resources. This format is transportable but not executable, which means that you can use it during compile time or link time but not at run time. .PP -Many \f[CB]jmod\f[R] options involve specifying a path whose contents are +Many \f[V]jmod\f[R] options involve specifying a path whose contents are copied into the resulting JMOD files. These options copy all the contents of the specified path, including subdirectories and their contents, but exclude files whose names match -the pattern specified by the \f[CB]\-\-exclude\f[R] option. +the pattern specified by the \f[V]--exclude\f[R] option. .PP -With the \f[CB]\-\-hash\-modules\f[R] option or the \f[CB]jmod\ hash\f[R] +With the \f[V]--hash-modules\f[R] option or the \f[V]jmod hash\f[R] command, you can, in each module\[aq]s descriptor, record hashes of the -content of the modules that are allowed to depend upon it, thus "tying" -together these modules. -This enables a package to be exported to one or more specifically\-named +content of the modules that are allowed to depend upon it, thus +\[dq]tying\[dq] together these modules. +This enables a package to be exported to one or more specifically-named modules and to no others through qualified exports. The runtime verifies if the recorded hash of a module matches the one resolved at run time; if not, the runtime returns an error. .SH OPTIONS FOR JMOD .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R] Specifies the location of application JAR files or a directory containing classes to copy into the resulting JMOD file. -.RS -.RE .TP -.B \f[CB]\-\-cmds\f[R] \f[I]path\f[R] +\f[V]--cmds\f[R] \f[I]path\f[R] Specifies the location of native commands to copy into the resulting JMOD file. -.RS -.RE .TP -.B \f[CB]\-\-config\f[R] \f[I]path\f[R] -Specifies the location of user\-editable configuration files to copy -into the resulting JMOD file. -.RS -.RE +\f[V]--compress\f[R] \f[I]compress\f[R] +Specifies the compression to use in creating the JMOD file. +The accepted values are \f[V]zip-[0-9]\f[R], where \f[V]zip-0\f[R] +provides no compression, and \f[V]zip-9\f[R] provides the best +compression. +Default is \f[V]zip-6\f[R]. .TP -.B \f[CB]\-\-date\f[R]\f[I]TIMESTAMP\f[R] -The timestamp in ISO\-8601 extended offset date\-time with optional -time\-zone format, to use for the timestamp of the entries, e.g. -"2022\-02\-12T12:30:00\-05:00". -.RS -.RE +\f[V]--config\f[R] \f[I]path\f[R] +Specifies the location of user-editable configuration files to copy into +the resulting JMOD file. .TP -.B \f[CB]\-\-dir\f[R] \f[I]path\f[R] -Specifies the location where \f[CB]jmod\f[R] puts extracted files from the -specified JMOD archive. -.RS -.RE +\f[V]--date\f[R]\f[I]TIMESTAMP\f[R] +The timestamp in ISO-8601 extended offset date-time with optional +time-zone format, to use for the timestamp of the entries, e.g. +\[dq]2022-02-12T12:30:00-05:00\[dq]. +.TP +\f[V]--dir\f[R] \f[I]path\f[R] +Specifies the location where \f[V]jmod\f[R] puts extracted files from +the specified JMOD archive. .TP -.B \f[CB]\-\-dry\-run\f[R] +\f[V]--dry-run\f[R] Performs a dry run of hash mode. It identifies leaf modules and their required modules without recording any hash values. -.RS -.RE .TP -.B \f[CB]\-\-exclude\f[R] \f[I]pattern\-list\f[R] -Excludes files matching the supplied comma\-separated pattern list, each +\f[V]--exclude\f[R] \f[I]pattern-list\f[R] +Excludes files matching the supplied comma-separated pattern list, each element using one the following forms: .RS .IP \[bu] 2 -\f[I]glob\-pattern\f[R] +\f[I]glob-pattern\f[R] .IP \[bu] 2 -\f[CB]glob:\f[R]\f[I]glob\-pattern\f[R] +\f[V]glob:\f[R]\f[I]glob-pattern\f[R] .IP \[bu] 2 -\f[CB]regex:\f[R]\f[I]regex\-pattern\f[R] +\f[V]regex:\f[R]\f[I]regex-pattern\f[R] .PP -See the \f[B]\f[BC]FileSystem.getPathMatcher\f[B]\f[R] method for the -syntax of \f[I]glob\-pattern\f[R]. -See the \f[B]\f[BC]Pattern\f[B]\f[R] class for the syntax of -\f[I]regex\-pattern\f[R], which represents a regular expression. +See the \f[B]\f[VB]FileSystem.getPathMatcher\f[B]\f[R] method for the +syntax of \f[I]glob-pattern\f[R]. +See the \f[B]\f[VB]Pattern\f[B]\f[R] class for the syntax of +\f[I]regex-pattern\f[R], which represents a regular expression. .RE .TP -.B \f[CB]\-\-hash\-modules\f[R] \f[I]regex\-pattern\f[R] +\f[V]--hash-modules\f[R] \f[I]regex-pattern\f[R] Determines the leaf modules and records the hashes of the dependencies directly and indirectly requiring them, based on the module graph of the -modules matching the given \f[I]regex\-pattern\f[R]. +modules matching the given \f[I]regex-pattern\f[R]. The hashes are recorded in the JMOD archive file being created, or a JMOD archive or modular JAR on the module path specified by the -\f[CB]jmod\ hash\f[R] command. -.RS -.RE +\f[V]jmod hash\f[R] command. .TP -.B \f[CB]\-\-header\-files\f[R] \f[I]path\f[R] +\f[V]--header-files\f[R] \f[I]path\f[R] Specifies the location of header files to copy into the resulting JMOD file. -.RS -.RE .TP -.B \f[CB]\-\-help\f[R] or \f[CB]\-h\f[R] +\f[V]--help\f[R] or \f[V]-h\f[R] Prints a usage message. -.RS -.RE .TP -.B \f[CB]\-\-help\-extra\f[R] +\f[V]--help-extra\f[R] Prints help for extra options. -.RS -.RE .TP -.B \f[CB]\-\-legal\-notices\f[R] \f[I]path\f[R] +\f[V]--legal-notices\f[R] \f[I]path\f[R] Specifies the location of legal notices to copy into the resulting JMOD file. -.RS -.RE .TP -.B \f[CB]\-\-libs\f[R] \f[I]path\f[R] +\f[V]--libs\f[R] \f[I]path\f[R] Specifies location of native libraries to copy into the resulting JMOD file. -.RS -.RE .TP -.B \f[CB]\-\-main\-class\f[R] \f[I]class\-name\f[R] -Specifies main class to record in the module\-info.class file. -.RS -.RE +\f[V]--main-class\f[R] \f[I]class-name\f[R] +Specifies main class to record in the module-info.class file. .TP -.B \f[CB]\-\-man\-pages\f[R] \f[I]path\f[R] +\f[V]--man-pages\f[R] \f[I]path\f[R] Specifies the location of man pages to copy into the resulting JMOD file. -.RS -.RE .TP -.B \f[CB]\-\-module\-version\f[R] \f[I]module\-version\f[R] -Specifies the module version to record in the module\-info.class file. -.RS -.RE +\f[V]--module-version\f[R] \f[I]module-version\f[R] +Specifies the module version to record in the module-info.class file. .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]path\f[R] or \f[CB]\-p\f[R] \f[I]path\f[R] +\f[V]--module-path\f[R] \f[I]path\f[R] or \f[V]-p\f[R] \f[I]path\f[R] Specifies the module path. -This option is required if you also specify \f[CB]\-\-hash\-modules\f[R]. -.RS -.RE +This option is required if you also specify \f[V]--hash-modules\f[R]. .TP -.B \f[CB]\-\-target\-platform\f[R] \f[I]platform\f[R] +\f[V]--target-platform\f[R] \f[I]platform\f[R] Specifies the target platform. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] -Prints version information of the \f[CB]jmod\f[R] tool. -.RS -.RE +\f[V]--version\f[R] +Prints version information of the \f[V]jmod\f[R] tool. .TP -.B \f[CB]\@\f[R]\f[I]filename\f[R] +\f[V]\[at]\f[R]\f[I]filename\f[R] Reads options from the specified file. .RS .PP @@ -239,21 +210,21 @@ An options file is a text file that contains the options and values that you would ordinarily enter in a command prompt. Options may appear on one line or on several lines. You may not specify environment variables for path names. -You may comment out lines by prefixinga hash symbol (\f[CB]#\f[R]) to the +You may comment out lines by prefixinga hash symbol (\f[V]#\f[R]) to the beginning of the line. .PP -The following is an example of an options file for the \f[CB]jmod\f[R] +The following is an example of an options file for the \f[V]jmod\f[R] command: .IP .nf \f[CB] -#Wed\ Dec\ 07\ 00:40:19\ EST\ 2016 -create\ \-\-class\-path\ mods/com.greetings\ \-\-module\-path\ mlib -\ \ \-\-cmds\ commands\ \-\-config\ configfiles\ \-\-header\-files\ src/h -\ \ \-\-libs\ lib\ \-\-main\-class\ com.greetings.Main -\ \ \-\-man\-pages\ man\ \-\-module\-version\ 1.0 -\ \ \-\-os\-arch\ "x86_x64"\ \-\-os\-name\ "Mac\ OS\ X" -\ \ \-\-os\-version\ "10.10.5"\ greetingsmod +#Wed Dec 07 00:40:19 EST 2016 +create --class-path mods/com.greetings --module-path mlib + --cmds commands --config configfiles --header-files src/h + --libs lib --main-class com.greetings.Main + --man-pages man --module-version 1.0 + --os-arch \[dq]x86_x64\[dq] --os-name \[dq]Mac OS X\[dq] + --os-version \[dq]10.10.5\[dq] greetingsmod \f[R] .fi .RE @@ -262,90 +233,86 @@ create\ \-\-class\-path\ mods/com.greetings\ \-\-module\-path\ mlib In addition to the options described in \f[B]Options for jmod\f[R], the following are extra options that can be used with the command. .TP -.B \f[CB]\-\-do\-not\-resolve\-by\-default\f[R] +\f[V]--do-not-resolve-by-default\f[R] Exclude from the default root set of modules -.RS -.RE .TP -.B \f[CB]\-\-warn\-if\-resolved\f[R] +\f[V]--warn-if-resolved\f[R] Hint for a tool to issue a warning if the module is resolved. -One of deprecated, deprecated\-for\-removal, or incubating. -.RS -.RE +One of deprecated, deprecated-for-removal, or incubating. .SH JMOD CREATE EXAMPLE .PP The following is an example of creating a JMOD file: .IP .nf \f[CB] -jmod\ create\ \-\-class\-path\ mods/com.greetings\ \-\-cmds\ commands -\ \ \-\-config\ configfiles\ \-\-header\-files\ src/h\ \-\-libs\ lib -\ \ \-\-main\-class\ com.greetings.Main\ \-\-man\-pages\ man\ \-\-module\-version\ 1.0 -\ \ \-\-os\-arch\ "x86_x64"\ \-\-os\-name\ "Mac\ OS\ X" -\ \ \-\-os\-version\ "10.10.5"\ greetingsmod +jmod create --class-path mods/com.greetings --cmds commands + --config configfiles --header-files src/h --libs lib + --main-class com.greetings.Main --man-pages man --module-version 1.0 + --os-arch \[dq]x86_x64\[dq] --os-name \[dq]Mac OS X\[dq] + --os-version \[dq]10.10.5\[dq] greetingsmod \f[R] .fi .PP Create a JMOD file specifying the date for the entries as -\f[CB]2022\ March\ 15\ 00:00:00\f[R]: +\f[V]2022 March 15 00:00:00\f[R]: .IP .nf \f[CB] -jmod\ create\ \-\-class\-path\ build/foo/classes\ \-\-date\ 2022\-03\-15T00:00:00Z -\ \ \ jmods/foo1.jmod +jmod create --class-path build/foo/classes --date 2022-03-15T00:00:00Z + jmods/foo1.jmod \f[R] .fi .SH JMOD HASH EXAMPLE .PP The following example demonstrates what happens when you try to link a -leaf module (in this example, \f[CB]ma\f[R]) with a required module -(\f[CB]mb\f[R]), and the hash value recorded in the required module +leaf module (in this example, \f[V]ma\f[R]) with a required module +(\f[V]mb\f[R]), and the hash value recorded in the required module doesn\[aq]t match that of the leaf module. .IP "1." 3 -Create and compile the following \f[CB]\&.java\f[R] files: +Create and compile the following \f[V].java\f[R] files: .RS 4 .IP \[bu] 2 -\f[CB]jmodhashex/src/ma/module\-info.java\f[R] +\f[V]jmodhashex/src/ma/module-info.java\f[R] .RS 2 .IP .nf \f[CB] -module\ ma\ { -\ \ requires\ mb; +module ma { + requires mb; } \f[R] .fi .RE .IP \[bu] 2 -\f[CB]jmodhashex/src/mb/module\-info.java\f[R] +\f[V]jmodhashex/src/mb/module-info.java\f[R] .RS 2 .IP .nf \f[CB] -module\ mb\ { +module mb { } \f[R] .fi .RE .IP \[bu] 2 -\f[CB]jmodhashex2/src/ma/module\-info.java\f[R] +\f[V]jmodhashex2/src/ma/module-info.java\f[R] .RS 2 .IP .nf \f[CB] -module\ ma\ { -\ \ requires\ mb; +module ma { + requires mb; } \f[R] .fi .RE .IP \[bu] 2 -\f[CB]jmodhashex2/src/mb/module\-info.java\f[R] +\f[V]jmodhashex2/src/mb/module-info.java\f[R] .RS 2 .IP .nf \f[CB] -module\ mb\ { +module mb { } \f[R] .fi @@ -353,87 +320,87 @@ module\ mb\ { .RE .IP "2." 3 Create a JMOD archive for each module. -Create the directories \f[CB]jmodhashex/jmods\f[R] and -\f[CB]jmodhashex2/jmods\f[R], and then run the following commands from the -\f[CB]jmodhashex\f[R] directory, then from the \f[CB]jmodhashex2\f[R] +Create the directories \f[V]jmodhashex/jmods\f[R] and +\f[V]jmodhashex2/jmods\f[R], and then run the following commands from +the \f[V]jmodhashex\f[R] directory, then from the \f[V]jmodhashex2\f[R] directory: .RS 4 .IP \[bu] 2 -\f[CB]jmod\ create\ \-\-class\-path\ mods/ma\ jmods/ma.jmod\f[R] +\f[V]jmod create --class-path mods/ma jmods/ma.jmod\f[R] .IP \[bu] 2 -\f[CB]jmod\ create\ \-\-class\-path\ mods/mb\ jmods/mb.jmod\f[R] +\f[V]jmod create --class-path mods/mb jmods/mb.jmod\f[R] .RE .IP "3." 3 -Optionally preview the \f[CB]jmod\ hash\f[R] command. -Run the following command from the \f[CB]jmodhashex\f[R] directory: +Optionally preview the \f[V]jmod hash\f[R] command. +Run the following command from the \f[V]jmodhashex\f[R] directory: .RS 4 .PP -\f[CB]jmod\ hash\ \-\-dry\-run\ \-module\-path\ jmods\ \-\-hash\-modules\ .*\f[R] +\f[V]jmod hash --dry-run -module-path jmods --hash-modules .*\f[R] .PP The command prints the following: .IP .nf \f[CB] -Dry\ run: +Dry run: mb -\ \ hashes\ ma\ SHA\-256\ 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a + hashes ma SHA-256 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a \f[R] .fi .PP -This indicates that the \f[CB]jmod\ hash\f[R] command (without the -\f[CB]\-\-dry\-run\f[R] option) will record the hash value of the leaf -module \f[CB]ma\f[R] in the module \f[CB]mb\f[R]. +This indicates that the \f[V]jmod hash\f[R] command (without the +\f[V]--dry-run\f[R] option) will record the hash value of the leaf +module \f[V]ma\f[R] in the module \f[V]mb\f[R]. .RE .IP "4." 3 Record hash values in the JMOD archive files contained in the -\f[CB]jmodhashex\f[R] directory. -Run the following command from the \f[CB]jmodhashex\f[R] directory: +\f[V]jmodhashex\f[R] directory. +Run the following command from the \f[V]jmodhashex\f[R] directory: .RS 4 .RS .PP -\f[CB]jmod\ hash\ \-\-module\-path\ jmods\ \-\-hash\-modules\ .*\f[R] +\f[V]jmod hash --module-path jmods --hash-modules .*\f[R] .RE .PP The command prints the following: .RS .PP -\f[CB]Hashes\ are\ recorded\ in\ module\ mb\f[R] +\f[V]Hashes are recorded in module mb\f[R] .RE .RE .IP "5." 3 Print information about each JMOD archive contained in the -\f[CB]jmodhashex\f[R] directory. -Run the highlighted commands from the \f[CB]jmodhashex\f[R] directory: +\f[V]jmodhashex\f[R] directory. +Run the highlighted commands from the \f[V]jmodhashex\f[R] directory: .RS 4 .IP .nf \f[CB] -jmod\ describe\ jmods/ma.jmod +jmod describe jmods/ma.jmod ma -\ \ requires\ mandated\ java.base -\ \ requires\ mb + requires mandated java.base + requires mb -jmod\ describe\ jmods/mb.jmod +jmod describe jmods/mb.jmod mb -\ \ requires\ mandated\ java.base -\ \ hashes\ ma\ SHA\-256\ 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a + requires mandated java.base + hashes ma SHA-256 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a \f[R] .fi .RE .IP "6." 3 -Attempt to create a runtime image that contains the module \f[CB]ma\f[R] -from the directory \f[CB]jmodhashex2\f[R] but the module \f[CB]mb\f[R] from -the directory \f[CB]jmodhashex\f[R]. -Run the following command from the \f[CB]jmodhashex2\f[R] directory: +Attempt to create a runtime image that contains the module \f[V]ma\f[R] +from the directory \f[V]jmodhashex2\f[R] but the module \f[V]mb\f[R] +from the directory \f[V]jmodhashex\f[R]. +Run the following command from the \f[V]jmodhashex2\f[R] directory: .RS 4 .IP \[bu] 2 \f[B]Linux and OS X:\f[R] .RS 2 .RS .PP -\f[CB]jlink\ \-\-module\-path\ $JAVA_HOME/jmods:jmods/ma.jmod:../jmodhashex/jmods/mb.jmod\ \-\-add\-modules\ ma\ \-\-output\ ma\-app\f[R] +\f[V]jlink --module-path $JAVA_HOME/jmods:jmods/ma.jmod:../jmodhashex/jmods/mb.jmod --add-modules ma --output ma-app\f[R] .RE .RE .IP \[bu] 2 @@ -441,7 +408,7 @@ Run the following command from the \f[CB]jmodhashex2\f[R] directory: .RS 2 .RS .PP -\f[CB]jlink\ \-\-module\-path\ %JAVA_HOME%/jmods;jmods/ma.jmod;../jmodhashex/jmods/mb.jmod\ \-\-add\-modules\ ma\ \-\-output\ ma\-app\f[R] +\f[V]jlink --module-path %JAVA_HOME%/jmods;jmods/ma.jmod;../jmodhashex/jmods/mb.jmod --add-modules ma --output ma-app\f[R] .RE .RE .PP @@ -449,8 +416,8 @@ The command prints an error message similar to the following: .IP .nf \f[CB] -Error:\ Hash\ of\ ma\ (a2d77889b0cb067df02a3abc39b01ac1151966157a68dc4241562c60499150d2)\ differs\ to -expected\ hash\ (07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a)\ recorded\ in\ mb +Error: Hash of ma (a2d77889b0cb067df02a3abc39b01ac1151966157a68dc4241562c60499150d2) differs to +expected hash (07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a) recorded in mb \f[R] .fi .RE diff --git a/src/jdk.jpackage/share/man/jpackage.1 b/src/jdk.jpackage/share/man/jpackage.1 index 2a3f7947d8627..8e617340394d4 100644 --- a/src/jdk.jpackage/share/man/jpackage.1 +++ b/src/jdk.jpackage/share/man/jpackage.1 @@ -19,88 +19,90 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JPACKAGE" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JPACKAGE" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jpackage \- tool for packaging self\-contained Java applications. +jpackage - tool for packaging self-contained Java applications. .SH SYNOPSIS .PP -\f[CB]jpackage\f[R] [\f[I]options\f[R]] +\f[V]jpackage\f[R] [\f[I]options\f[R]] .TP -.B \f[I]options\f[R] -Command\-line options separated by spaces. +\f[I]options\f[R] +Command-line options separated by spaces. See \f[B]jpackage Options\f[R]. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jpackage\f[R] tool will take as input a Java application and a -Java run\-time image, and produce a Java application image that includes +The \f[V]jpackage\f[R] tool will take as input a Java application and a +Java run-time image, and produce a Java application image that includes all the necessary dependencies. -It will be able to produce a native package in a platform\-specific +It will be able to produce a native package in a platform-specific format, such as an exe on Windows or a dmg on macOS. Each format must be built on the platform it runs on, there is no -cross\-platform support. +cross-platform support. The tool will have options that allow packaged applications to be customized in various ways. .SH JPACKAGE OPTIONS .SS Generic Options: .TP -.B \f[CB]\@\f[R]\f[I]filename\f[R] +\f[V]\[at]\f[R]\f[I]filename\f[R] Read options from a file. .RS .PP This option can be used multiple times. .RE .TP -.B \f[CB]\-\-type\f[R] or \f[CB]\-t\f[R] \f[I]type\f[R] +\f[V]--type\f[R] or \f[V]-t\f[R] \f[I]type\f[R] The type of package to create .RS .PP -Valid values are: {"app\-image", "exe", "msi", "rpm", "deb", "pkg", -"dmg"} +Valid values are: {\[dq]app-image\[dq], \[dq]exe\[dq], \[dq]msi\[dq], +\[dq]rpm\[dq], \[dq]deb\[dq], \[dq]pkg\[dq], \[dq]dmg\[dq]} .PP If this option is not specified a platform dependent default type will be created. .RE .TP -.B \f[CB]\-\-app\-version\f[R] \f[I]version\f[R] +\f[V]--app-version\f[R] \f[I]version\f[R] Version of the application and/or package -.RS -.RE .TP -.B \f[CB]\-\-copyright\f[R] \f[I]copyright\f[R] +\f[V]--copyright\f[R] \f[I]copyright\f[R] Copyright for the application -.RS -.RE .TP -.B \f[CB]\-\-description\f[R] \f[I]description\f[R] +\f[V]--description\f[R] \f[I]description\f[R] Description of the application -.RS -.RE .TP -.B \f[CB]\-\-help\f[R] or \f[CB]\-h\f[R] +\f[V]--help\f[R] or \f[V]-h\f[R] Print the usage text with a list and description of each valid option for the current platform to the output stream, and exit. -.RS -.RE .TP -.B \f[CB]\-\-icon\f[R] \f[I]path\f[R] +\f[V]--icon\f[R] \f[I]path\f[R] Path of the icon of the application package .RS .PP (absolute path or relative to the current directory) .RE .TP -.B \f[CB]\-\-name\f[R] or \f[CB]\-n\f[R] \f[I]name\f[R] +\f[V]--name\f[R] or \f[V]-n\f[R] \f[I]name\f[R] Name of the application and/or package -.RS -.RE .TP -.B \f[CB]\-\-dest\f[R] or \f[CB]\-d\f[R] \f[I]destination\f[R] +\f[V]--dest\f[R] or \f[V]-d\f[R] \f[I]destination\f[R] Path where generated output file is placed .RS .PP @@ -109,7 +111,7 @@ Path where generated output file is placed Defaults to the current working directory. .RE .TP -.B \f[CB]\-\-temp\f[R] \f[I]directory\f[R] +\f[V]--temp\f[R] \f[I]directory\f[R] Path of a new or empty directory used to create temporary files .RS .PP @@ -122,36 +124,30 @@ If not specified, a temporary directory will be created and removed upon the task completion. .RE .TP -.B \f[CB]\-\-vendor\f[R] \f[I]vendor\f[R] +\f[V]--vendor\f[R] \f[I]vendor\f[R] Vendor of the application -.RS -.RE .TP -.B \f[CB]\-\-verbose\f[R] +\f[V]--verbose\f[R] Enables verbose output. -.RS -.RE .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Print the product version to the output stream and exit. -.RS -.RE .SS Options for creating the runtime image: .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\-name\f[R] [\f[CB],\f[R]\f[I]module\-name\f[R]...] -A comma (",") separated list of modules to add +\f[V]--add-modules\f[R] \f[I]module-name\f[R] [\f[V],\f[R]\f[I]module-name\f[R]...] +A comma (\[dq],\[dq]) separated list of modules to add .RS .PP This module list, along with the main module (if specified) will be -passed to jlink as the \-\-add\-module argument. -If not specified, either just the main module (if \-\-module is -specified), or the default set of modules (if \-\-main\-jar is -specified) are used. +passed to jlink as the --add-module argument. +If not specified, either just the main module (if --module is +specified), or the default set of modules (if --main-jar is specified) +are used. .PP This option can be used multiple times. .RE .TP -.B \f[CB]\-\-module\-path\f[R] or \f[CB]\-p\f[R] \f[I]module\-path\f[R] [\f[CB],\f[R]\f[I]module\-path\f[R]...] +\f[V]--module-path\f[R] or \f[V]-p\f[R] \f[I]module-path\f[R] [\f[V],\f[R]\f[I]module-path\f[R]...] A File.pathSeparator separated list of paths .RS .PP @@ -161,29 +157,29 @@ and is absolute or relative to the current directory. This option can be used multiple times. .RE .TP -.B \f[CB]\-\-jlink\-options\f[R] \f[I]options\f[R] +\f[V]--jlink-options\f[R] \f[I]options\f[R] A space separated list of options to pass to jlink .RS .PP -If not specified, defaults to "\-\-strip\-native\-commands -\-\-strip\-debug \-\-no\-man\-pages \-\-no\-header\-files" +If not specified, defaults to \[dq]--strip-native-commands --strip-debug +--no-man-pages --no-header-files\[dq] .PP This option can be used multiple times. .RE .TP -.B \f[CB]\-\-runtime\-image\f[R] \f[I]directory\f[R] +\f[V]--runtime-image\f[R] \f[I]directory\f[R] Path of the predefined runtime image that will be copied into the application image .RS .PP (absolute path or relative to the current directory) .PP -If \-\-runtime\-image is not specified, jpackage will run jlink to -create the runtime image using options specified by \-\-jlink\-options. +If --runtime-image is not specified, jpackage will run jlink to create +the runtime image using options specified by --jlink-options. .RE .SS Options for creating the application image: .TP -.B \f[CB]\-\-input\f[R] or \f[CB]\-i\f[R] \f[I]directory\f[R] +\f[V]--input\f[R] or \f[V]-i\f[R] \f[I]directory\f[R] Path of the input directory that contains the files to be packaged .RS .PP @@ -193,7 +189,7 @@ All files in the input directory will be packaged into the application image. .RE .TP -.B `\-\-app\-content \f[I]additional\-content\f[R][,\f[I]additional\-content\f[R]...] +\[ga]--app-content \f[I]additional-content\f[R][,\f[I]additional-content\f[R]...] A comma separated list of paths to files and/or directories to add to the application payload. .RS @@ -202,17 +198,18 @@ This option can be used more than once. .RE .SS Options for creating the application launcher(s): .TP -.B \f[CB]\-\-add\-launcher\f[R] \f[I]name\f[R]=\f[I]path\f[R] +\f[V]--add-launcher\f[R] \f[I]name\f[R]=\f[I]path\f[R] Name of launcher, and a path to a Properties file that contains a list of key, value pairs .RS .PP (absolute path or relative to the current directory) .PP -The keys "module", "main\-jar", "main\-class", "description", -"arguments", "java\-options", "app\-version", "icon", -"launcher\-as\-service", "win\-console", "win\-shortcut", "win\-menu", -"linux\-app\-category", and "linux\-shortcut" can be used. +The keys \[dq]module\[dq], \[dq]main-jar\[dq], \[dq]main-class\[dq], +\[dq]description\[dq], \[dq]arguments\[dq], \[dq]java-options\[dq], +\[dq]app-version\[dq], \[dq]icon\[dq], \[dq]launcher-as-service\[dq], +\[dq]win-console\[dq], \[dq]win-shortcut\[dq], \[dq]win-menu\[dq], +\[dq]linux-app-category\[dq], and \[dq]linux-shortcut\[dq] can be used. .PP These options are added to, or used to overwrite, the original command line options to build an additional alternative launcher. @@ -223,7 +220,7 @@ this option can be used multiple times to build multiple additional launchers. .RE .TP -.B \f[CB]\-\-arguments\f[R] \f[I]arguments\f[R] +\f[V]--arguments\f[R] \f[I]arguments\f[R] Command line arguments to pass to the main class if no command line arguments are given to the launcher .RS @@ -231,29 +228,29 @@ arguments are given to the launcher This option can be used multiple times. .RE .TP -.B \f[CB]\-\-java\-options\f[R] \f[I]options\f[R] +\f[V]--java-options\f[R] \f[I]options\f[R] Options to pass to the Java runtime .RS .PP This option can be used multiple times. .RE .TP -.B \f[CB]\-\-main\-class\f[R] \f[I]class\-name\f[R] +\f[V]--main-class\f[R] \f[I]class-name\f[R] Qualified name of the application main class to execute .RS .PP -This option can only be used if \-\-main\-jar is specified. +This option can only be used if --main-jar is specified. .RE .TP -.B \f[CB]\-\-main\-jar\f[R] \f[I]main\-jar\f[R] +\f[V]--main-jar\f[R] \f[I]main-jar\f[R] The main JAR of the application; containing the main class (specified as a path relative to the input path) .RS .PP -Either \-\-module or \-\-main\-jar option can be specified but not both. +Either --module or --main-jar option can be specified but not both. .RE .TP -.B \f[CB]\-\-module\f[R] or \f[CB]\-m\f[R] \f[I]module\-name\f[R][/\f[I]main\-class\f[R]] +\f[V]--module\f[R] or \f[V]-m\f[R] \f[I]module-name\f[R][/\f[I]main-class\f[R]] The main module (and optionally main class) of the application .RS .PP @@ -261,29 +258,27 @@ This module must be located on the module path. .PP When this option is specified, the main module will be linked in the Java runtime image. -Either \-\-module or \-\-main\-jar option can be specified but not both. +Either --module or --main-jar option can be specified but not both. .RE .SS Platform dependent option for creating the application launcher: .SS Windows platform options (available only when running on Windows): .TP -.B \f[CB]\-\-win\-console\f[R] +\f[V]--win-console\f[R] Creates a console launcher for the application, should be specified for application which requires console interactions -.RS -.RE .SS macOS platform options (available only when running on macOS): .TP -.B \f[CB]\-\-mac\-package\-identifier\f[R] \f[I]identifier\f[R] +\f[V]--mac-package-identifier\f[R] \f[I]identifier\f[R] An identifier that uniquely identifies the application for macOS .RS .PP Defaults to the main class name. .PP -May only use alphanumeric (A\-Z,a\-z,0\-9), hyphen (\-), and period (.) +May only use alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters. .RE .TP -.B \f[CB]\-\-mac\-package\-name\f[R] \f[I]name\f[R] +\f[V]--mac-package-name\f[R] \f[I]name\f[R] Name of the application as it appears in the Menu Bar .RS .PP @@ -294,55 +289,43 @@ displaying in the menu bar and the application Info window. Defaults to the application name. .RE .TP -.B \f[CB]\-\-mac\-package\-signing\-prefix\f[R] \f[I]prefix\f[R] +\f[V]--mac-package-signing-prefix\f[R] \f[I]prefix\f[R] When signing the application package, this value is prefixed to all components that need to be signed that don\[aq]t have an existing package identifier. -.RS -.RE .TP -.B \f[CB]\-\-mac\-sign\f[R] +\f[V]--mac-sign\f[R] Request that the package or the predefined application image be signed. -.RS -.RE .TP -.B \f[CB]\-\-mac\-signing\-keychain\f[R] \f[I]keychain\-name\f[R] +\f[V]--mac-signing-keychain\f[R] \f[I]keychain-name\f[R] Name of the keychain to search for the signing identity .RS .PP If not specified, the standard keychains are used. .RE .TP -.B \f[CB]\-\-mac\-signing\-key\-user\-name\f[R] \f[I]name\f[R] +\f[V]--mac-signing-key-user-name\f[R] \f[I]name\f[R] Team or user name portion in Apple signing identities -.RS -.RE .TP -.B \f[CB]\-\-mac\-app\-store\f[R] +\f[V]--mac-app-store\f[R] Indicates that the jpackage output is intended for the Mac App Store. -.RS -.RE .TP -.B \f[CB]\-\-mac\-entitlements\f[R] \f[I]path\f[R] +\f[V]--mac-entitlements\f[R] \f[I]path\f[R] Path to file containing entitlements to use when signing executables and libraries in the bundle -.RS -.RE .TP -.B \f[CB]\-\-mac\-app\-category\f[R] \f[I]category\f[R] +\f[V]--mac-app-category\f[R] \f[I]category\f[R] String used to construct LSApplicationCategoryType in application plist .RS .PP -The default value is "utilities". +The default value is \[dq]utilities\[dq]. .RE .SS Options for creating the application package: .TP -.B \f[CB]\-\-about\-url\f[R] \f[I]url\f[R] +\f[V]--about-url\f[R] \f[I]url\f[R] URL of the application\[aq]s home page -.RS -.RE .TP -.B \f[CB]\-\-app\-image\f[R] \f[I]directory\f[R] +\f[V]--app-image\f[R] \f[I]directory\f[R] Location of the predefined application image that is used to build an installable package (on all platforms) or to be signed (on macOS) .RS @@ -350,43 +333,41 @@ installable package (on all platforms) or to be signed (on macOS) (absolute path or relative to the current directory) .RE .TP -.B \f[CB]\-\-file\-associations\f[R] \f[I]path\f[R] +\f[V]--file-associations\f[R] \f[I]path\f[R] Path to a Properties file that contains list of key, value pairs .RS .PP (absolute path or relative to the current directory) .PP -The keys "extension", "mime\-type", "icon", and "description" can be -used to describe the association. +The keys \[dq]extension\[dq], \[dq]mime-type\[dq], \[dq]icon\[dq], and +\[dq]description\[dq] can be used to describe the association. .PP This option can be used multiple times. .RE .TP -.B \f[CB]\-\-install\-dir\f[R] \f[I]path\f[R] +\f[V]--install-dir\f[R] \f[I]path\f[R] Absolute path of the installation directory of the application (on macOS -or linux), or relative sub\-path of the installation directory such as -"Program Files" or "AppData" (on Windows) -.RS -.RE +or linux), or relative sub-path of the installation directory such as +\[dq]Program Files\[dq] or \[dq]AppData\[dq] (on Windows) .TP -.B \f[CB]\-\-license\-file\f[R] \f[I]path\f[R] +\f[V]--license-file\f[R] \f[I]path\f[R] Path to the license file .RS .PP (absolute path or relative to the current directory) .RE .TP -.B \f[CB]\-\-resource\-dir\f[R] \f[I]path\f[R] +\f[V]--resource-dir\f[R] \f[I]path\f[R] Path to override jpackage resources .RS .PP (absolute path or relative to the current directory) .PP Icons, template files, and other resources of jpackage can be -over\-ridden by adding replacement resources to this directory. +over-ridden by adding replacement resources to this directory. .RE .TP -.B \f[CB]\-\-runtime\-image\f[R] \f[I]path\f[R] +\f[V]--runtime-image\f[R] \f[I]path\f[R] Path of the predefined runtime image to install .RS .PP @@ -395,107 +376,74 @@ Path of the predefined runtime image to install Option is required when creating a runtime installer. .RE .TP -.B \f[CB]\-\-launcher\-as\-service\f[R] +\f[V]--launcher-as-service\f[R] Request to create an installer that will register the main application -launcher as a background service\-type application. -.RS -.RE +launcher as a background service-type application. .SS Platform dependent options for creating the application package: .SS Windows platform options (available only when running on Windows): .TP -.B \f[CB]\-\-win\-dir\-chooser\f[R] +\f[V]--win-dir-chooser\f[R] Adds a dialog to enable the user to choose a directory in which the product is installed. -.RS -.RE .TP -.B \f[CB]\-\-win\-help\-url\f[R] \f[I]url\f[R] +\f[V]--win-help-url\f[R] \f[I]url\f[R] URL where user can obtain further information or technical support -.RS -.RE .TP -.B \f[CB]\-\-win\-menu\f[R] +\f[V]--win-menu\f[R] Request to add a Start Menu shortcut for this application -.RS -.RE .TP -.B \f[CB]\-\-win\-menu\-group\f[R] \f[I]menu\-group\-name\f[R] +\f[V]--win-menu-group\f[R] \f[I]menu-group-name\f[R] Start Menu group this application is placed in -.RS -.RE .TP -.B \f[CB]\-\-win\-per\-user\-install\f[R] -Request to perform an install on a per\-user basis -.RS -.RE +\f[V]--win-per-user-install\f[R] +Request to perform an install on a per-user basis .TP -.B \f[CB]\-\-win\-shortcut\f[R] +\f[V]--win-shortcut\f[R] Request to create a desktop shortcut for this application -.RS -.RE .TP -.B \f[CB]\-\-win\-shortcut\-prompt\f[R] +\f[V]--win-shortcut-prompt\f[R] Adds a dialog to enable the user to choose if shortcuts will be created by installer -.RS -.RE .TP -.B \f[CB]\-\-win\-update\-url\f[R] \f[I]url\f[R] +\f[V]--win-update-url\f[R] \f[I]url\f[R] URL of available application update information -.RS -.RE .TP -.B \f[CB]\-\-win\-upgrade\-uuid\f[R] \f[I]id\f[R] +\f[V]--win-upgrade-uuid\f[R] \f[I]id\f[R] UUID associated with upgrades for this package -.RS -.RE .SS Linux platform options (available only when running on Linux): .TP -.B \f[CB]\-\-linux\-package\-name\f[R] \f[I]name\f[R] +\f[V]--linux-package-name\f[R] \f[I]name\f[R] Name for Linux package .RS .PP Defaults to the application name. .RE .TP -.B \f[CB]\-\-linux\-deb\-maintainer\f[R] \f[I]email\-address\f[R] +\f[V]--linux-deb-maintainer\f[R] \f[I]email-address\f[R] Maintainer for .deb bundle -.RS -.RE .TP -.B \f[CB]\-\-linux\-menu\-group\f[R] \f[I]menu\-group\-name\f[R] +\f[V]--linux-menu-group\f[R] \f[I]menu-group-name\f[R] Menu group this application is placed in -.RS -.RE .TP -.B \f[CB]\-\-linux\-package\-deps\f[R] +\f[V]--linux-package-deps\f[R] Required packages or capabilities for the application -.RS -.RE .TP -.B \f[CB]\-\-linux\-rpm\-license\-type\f[R] \f[I]type\f[R] -Type of the license ("License: \f[I]value\f[R]" of the RPM .spec) -.RS -.RE +\f[V]--linux-rpm-license-type\f[R] \f[I]type\f[R] +Type of the license (\[dq]License: \f[I]value\f[R]\[dq] of the RPM +\&.spec) .TP -.B \f[CB]\-\-linux\-app\-release\f[R] \f[I]release\f[R] +\f[V]--linux-app-release\f[R] \f[I]release\f[R] Release value of the RPM <name>.spec file or Debian revision value of the DEB control file -.RS -.RE .TP -.B \f[CB]\-\-linux\-app\-category\f[R] \f[I]category\-value\f[R] +\f[V]--linux-app-category\f[R] \f[I]category-value\f[R] Group value of the RPM /.spec file or Section value of DEB control file -.RS -.RE .TP -.B \f[CB]\-\-linux\-shortcut\f[R] +\f[V]--linux-shortcut\f[R] Creates a shortcut for the application. -.RS -.RE .SS macOS platform options (available only when running on macOS): .TP -.B \[aq]\-\-mac\-dmg\-content \f[I]additional\-content\f[R][,\f[I]additional\-content\f[R]...] +\[aq]--mac-dmg-content \f[I]additional-content\f[R][,\f[I]additional-content\f[R]...] Include all the referenced content in the dmg. .RS .PP @@ -505,88 +453,88 @@ This option can be used more than once. .IP .nf \f[CB] -Generate\ an\ application\ package\ suitable\ for\ the\ host\ system: +Generate an application package suitable for the host system: \f[R] .fi .IP .nf \f[CB] -For\ a\ modular\ application: -\ \ \ \ jpackage\ \-n\ name\ \-p\ modulePath\ \-m\ moduleName/className -For\ a\ non\-modular\ application: -\ \ \ \ jpackage\ \-i\ inputDir\ \-n\ name\ \\ -\ \ \ \ \ \ \ \ \-\-main\-class\ className\ \-\-main\-jar\ myJar.jar -From\ a\ pre\-built\ application\ image: -\ \ \ \ jpackage\ \-n\ name\ \-\-app\-image\ appImageDir +For a modular application: + jpackage -n name -p modulePath -m moduleName/className +For a non-modular application: + jpackage -i inputDir -n name \[rs] + --main-class className --main-jar myJar.jar +From a pre-built application image: + jpackage -n name --app-image appImageDir \f[R] .fi .IP .nf \f[CB] -Generate\ an\ application\ image: +Generate an application image: \f[R] .fi .IP .nf \f[CB] -For\ a\ modular\ application: -\ \ \ \ jpackage\ \-\-type\ app\-image\ \-n\ name\ \-p\ modulePath\ \\ -\ \ \ \ \ \ \ \ \-m\ moduleName/className -For\ a\ non\-modular\ application: -\ \ \ \ jpackage\ \-\-type\ app\-image\ \-i\ inputDir\ \-n\ name\ \\ -\ \ \ \ \ \ \ \ \-\-main\-class\ className\ \-\-main\-jar\ myJar.jar -To\ provide\ your\ own\ options\ to\ jlink,\ run\ jlink\ separately: -\ \ \ \ jlink\ \-\-output\ appRuntimeImage\ \-p\ modulePath\ \\ -\ \ \ \ \ \ \ \ \-\-add\-modules\ moduleName\ \\ -\ \ \ \ \ \ \ \ \-\-no\-header\-files\ [<additional\ jlink\ options>...] -\ \ \ \ jpackage\ \-\-type\ app\-image\ \-n\ name\ \\ -\ \ \ \ \ \ \ \ \-m\ moduleName/className\ \-\-runtime\-image\ appRuntimeImage +For a modular application: + jpackage --type app-image -n name -p modulePath \[rs] + -m moduleName/className +For a non-modular application: + jpackage --type app-image -i inputDir -n name \[rs] + --main-class className --main-jar myJar.jar +To provide your own options to jlink, run jlink separately: + jlink --output appRuntimeImage -p modulePath \[rs] + --add-modules moduleName \[rs] + --no-header-files [<additional jlink options>...] + jpackage --type app-image -n name \[rs] + -m moduleName/className --runtime-image appRuntimeImage \f[R] .fi .IP .nf \f[CB] -Generate\ a\ Java\ runtime\ package: +Generate a Java runtime package: \f[R] .fi .IP .nf \f[CB] -jpackage\ \-n\ name\ \-\-runtime\-image\ <runtime\-image> +jpackage -n name --runtime-image <runtime-image> \f[R] .fi .IP .nf \f[CB] -Sign\ the\ predefined\ application\ image\ (on\ macOS): +Sign the predefined application image (on macOS): \f[R] .fi .IP .nf \f[CB] -jpackage\ \-\-type\ app\-image\ \-\-app\-image\ <app\-image>\ \\ -\ \ \ \ \-\-mac\-sign\ [<additional\ signing\ options>...] +jpackage --type app-image --app-image <app-image> \[rs] + --mac-sign [<additional signing options>...] -Note:\ the\ only\ additional\ options\ that\ are\ permitted\ in\ this\ mode\ are: -\ \ \ \ \ \ the\ set\ of\ additional\ mac\ signing\ options\ and\ \-\-verbose +Note: the only additional options that are permitted in this mode are: + the set of additional mac signing options and --verbose \f[R] .fi .SH JPACKAGE RESOURCE DIRECTORY .PP Icons, template files, and other resources of jpackage can be -over\-ridden by adding replacement resources to this directory. +over-ridden by adding replacement resources to this directory. jpackage will lookup files by specific names in the resource directory. .SS Resource directory files considered only when running on Linux: .TP -.B \f[CB]<launcher\-name>.png\f[R] +\f[V]<launcher-name>.png\f[R] Application launcher icon .RS .PP Default resource is \f[I]JavaApp.png\f[R] .RE .TP -.B \f[CB]<launcher\-name>.desktop\f[R] -A desktop file to be used with \f[CB]xdg\-desktop\-menu\f[R] command +\f[V]<launcher-name>.desktop\f[R] +A desktop file to be used with \f[V]xdg-desktop-menu\f[R] command .RS .PP Considered with application launchers registered for file associations @@ -594,135 +542,129 @@ and/or have an icon .PP Default resource is \f[I]template.desktop\f[R] .RE -.SS Resource directory files considered only when building Linux DEB/RPM -installer: +.SS Resource directory files considered only when building Linux DEB/RPM installer: .TP -.B \f[CB]<package\-name>\-<launcher\-name>.service\f[R] +\f[V]<package-name>-<launcher-name>.service\f[R] systemd unit file for application launcher registered as a background -service\-type application +service-type application .RS .PP -Default resource is \f[I]unit\-template.service\f[R] +Default resource is \f[I]unit-template.service\f[R] .RE -.SS Resource directory files considered only when building Linux RPM -installer: +.SS Resource directory files considered only when building Linux RPM installer: .TP -.B \f[CB]<package\-name>.spec\f[R] +\f[V]<package-name>.spec\f[R] RPM spec file .RS .PP Default resource is \f[I]template.spec\f[R] .RE -.SS Resource directory files considered only when building Linux DEB -installer: +.SS Resource directory files considered only when building Linux DEB installer: .TP -.B \f[CB]control\f[R] +\f[V]control\f[R] Control file .RS .PP Default resource is \f[I]template.control\f[R] .RE .TP -.B \f[CB]copyright\f[R] +\f[V]copyright\f[R] Copyright file .RS .PP Default resource is \f[I]template.copyright\f[R] .RE .TP -.B \f[CB]preinstall\f[R] -Pre\-install shell script +\f[V]preinstall\f[R] +Pre-install shell script .RS .PP Default resource is \f[I]template.preinstall\f[R] .RE .TP -.B \f[CB]prerm\f[R] -Pre\-remove shell script +\f[V]prerm\f[R] +Pre-remove shell script .RS .PP Default resource is \f[I]template.prerm\f[R] .RE .TP -.B \f[CB]postinstall\f[R] -Post\-install shell script +\f[V]postinstall\f[R] +Post-install shell script .RS .PP Default resource is \f[I]template.postinstall\f[R] .RE .TP -.B \f[CB]postrm\f[R] -Post\-remove shell script +\f[V]postrm\f[R] +Post-remove shell script .RS .PP Default resource is \f[I]template.postrm\f[R] .RE .SS Resource directory files considered only when running on Windows: .TP -.B \f[CB]<launcher\-name>.ico\f[R] +\f[V]<launcher-name>.ico\f[R] Application launcher icon .RS .PP Default resource is \f[I]JavaApp.ico\f[R] .RE .TP -.B \f[CB]<launcher\-name>.properties\f[R] +\f[V]<launcher-name>.properties\f[R] Properties file for application launcher executable .RS .PP Default resource is \f[I]WinLauncher.template\f[R] .RE -.SS Resource directory files considered only when building Windows -MSI/EXE installer: +.SS Resource directory files considered only when building Windows MSI/EXE installer: .TP -.B \f[CB]<application\-name>\-post\-image.wsf\f[R] +\f[V]<application-name>-post-image.wsf\f[R] A Windows Script File (WSF) to run after building application image -.RS -.RE .TP -.B \f[CB]main.wxs\f[R] +\f[V]main.wxs\f[R] Main WiX project file .RS .PP Default resource is \f[I]main.wxs\f[R] .RE .TP -.B \f[CB]overrides.wxi\f[R] +\f[V]overrides.wxi\f[R] Overrides WiX project file .RS .PP Default resource is \f[I]overrides.wxi\f[R] .RE .TP -.B \f[CB]service\-installer.exe\f[R] +\f[V]service-installer.exe\f[R] Service installer executable .RS .PP Considered if some application launchers are registered as background -service\-type applications +service-type applications .RE .TP -.B \f[CB]<launcher\-name>\-service\-install.wxi\f[R] +\f[V]<launcher-name>-service-install.wxi\f[R] Service installer WiX project file .RS .PP Considered if some application launchers are registered as background -service\-type applications +service-type applications .PP -Default resource is \f[I]service\-install.wxi\f[R] +Default resource is \f[I]service-install.wxi\f[R] .RE .TP -.B \f[CB]<launcher\-name>\-service\-config.wxi\f[R] +\f[V]<launcher-name>-service-config.wxi\f[R] Service installer WiX project file .RS .PP Considered if some application launchers are registered as background -service\-type applications +service-type applications .PP -Default resource is \f[I]service\-config.wxi\f[R] +Default resource is \f[I]service-config.wxi\f[R] .RE .TP -.B \f[CB]InstallDirNotEmptyDlg.wxs\f[R] +\f[V]InstallDirNotEmptyDlg.wxs\f[R] WiX project file for installer UI dialog checking installation directory doesn\[aq]t exist or is empty .RS @@ -730,173 +672,161 @@ doesn\[aq]t exist or is empty Default resource is \f[I]InstallDirNotEmptyDlg.wxs\f[R] .RE .TP -.B \f[CB]ShortcutPromptDlg.wxs\f[R] +\f[V]ShortcutPromptDlg.wxs\f[R] WiX project file for installer UI dialog configuring shortcuts .RS .PP Default resource is \f[I]ShortcutPromptDlg.wxs\f[R] .RE .TP -.B \f[CB]bundle.wxf\f[R] +\f[V]bundle.wxf\f[R] WiX project file with the hierarchy of components of application image -.RS -.RE .TP -.B \f[CB]ui.wxf\f[R] +\f[V]ui.wxf\f[R] WiX project file for installer UI -.RS -.RE -.SS Resource directory files considered only when building Windows EXE -installer: +.SS Resource directory files considered only when building Windows EXE installer: .TP -.B \f[CB]WinInstaller.properties\f[R] +\f[V]WinInstaller.properties\f[R] Properties file for the installer executable .RS .PP Default resource is \f[I]WinInstaller.template\f[R] .RE .TP -.B \f[CB]<package\-name>\-post\-msi.wsf\f[R] +\f[V]<package-name>-post-msi.wsf\f[R] A Windows Script File (WSF) to run after building embedded MSI installer for EXE installer -.RS -.RE .SS Resource directory files considered only when running on macOS: .TP -.B \f[CB]<launcher\-name>.icns\f[R] +\f[V]<launcher-name>.icns\f[R] Application launcher icon .RS .PP Default resource is \f[I]JavaApp.icns\f[R] .RE .TP -.B \f[CB]Info.plist\f[R] +\f[V]Info.plist\f[R] Application property list file .RS .PP -Default resource is \f[I]Info\-lite.plist.template\f[R] +Default resource is \f[I]Info-lite.plist.template\f[R] .RE .TP -.B \f[CB]Runtime\-Info.plist\f[R] +\f[V]Runtime-Info.plist\f[R] Java Runtime property list file .RS .PP -Default resource is \f[I]Runtime\-Info.plist.template\f[R] +Default resource is \f[I]Runtime-Info.plist.template\f[R] .RE .TP -.B \f[CB]<application\-name>.entitlements\f[R] +\f[V]<application-name>.entitlements\f[R] Signing entitlements property list file .RS .PP Default resource is \f[I]sandbox.plist\f[R] .RE -.SS Resource directory files considered only when building macOS PKG/DMG -installer: +.SS Resource directory files considered only when building macOS PKG/DMG installer: .TP -.B \f[CB]<package\-name>\-post\-image.sh\f[R] +\f[V]<package-name>-post-image.sh\f[R] Shell script to run after building application image -.RS -.RE -.SS Resource directory files considered only when building macOS PKG -installer: +.SS Resource directory files considered only when building macOS PKG installer: .TP -.B \f[CB]uninstaller\f[R] +\f[V]uninstaller\f[R] Uninstaller shell script .RS .PP Considered if some application launchers are registered as background -service\-type applications +service-type applications .PP Default resource is \f[I]uninstall.command.template\f[R] .RE .TP -.B \f[CB]preinstall\f[R] -Pre\-install shell script +\f[V]preinstall\f[R] +Pre-install shell script .RS .PP Default resource is \f[I]preinstall.template\f[R] .RE .TP -.B \f[CB]postinstall\f[R] -Post\-install shell script +\f[V]postinstall\f[R] +Post-install shell script .RS .PP Default resource is \f[I]postinstall.template\f[R] .RE .TP -.B \f[CB]services\-preinstall\f[R] -Pre\-install shell script for services package +\f[V]services-preinstall\f[R] +Pre-install shell script for services package .RS .PP Considered if some application launchers are registered as background -service\-type applications +service-type applications .PP -Default resource is \f[I]services\-preinstall.template\f[R] +Default resource is \f[I]services-preinstall.template\f[R] .RE .TP -.B \f[CB]services\-postinstall\f[R] -Post\-install shell script for services package +\f[V]services-postinstall\f[R] +Post-install shell script for services package .RS .PP Considered if some application launchers are registered as background -service\-type applications +service-type applications .PP -Default resource is \f[I]services\-postinstall.template\f[R] +Default resource is \f[I]services-postinstall.template\f[R] .RE .TP -.B \f[CB]<package\-name>\-background.png\f[R] +\f[V]<package-name>-background.png\f[R] Background image .RS .PP Default resource is \f[I]background_pkg.png\f[R] .RE .TP -.B \f[CB]<package\-name>\-background\-darkAqua.png\f[R] +\f[V]<package-name>-background-darkAqua.png\f[R] Dark background image .RS .PP Default resource is \f[I]background_pkg.png\f[R] .RE .TP -.B \f[CB]product\-def.plist\f[R] +\f[V]product-def.plist\f[R] Package property list file .RS .PP -Default resource is \f[I]product\-def.plist\f[R] +Default resource is \f[I]product-def.plist\f[R] .RE .TP -.B \f[CB]<package\-name>\-<launcher\-name>.plist\f[R] +\f[V]<package-name>-<launcher-name>.plist\f[R] launchd property list file for application launcher registered as a -background service\-type application +background service-type application .RS .PP Default resource is \f[I]launchd.plist.template\f[R] .RE -.SS Resource directory files considered only when building macOS DMG -installer: +.SS Resource directory files considered only when building macOS DMG installer: .TP -.B \f[CB]<package\-name>\-dmg\-setup.scpt\f[R] +\f[V]<package-name>-dmg-setup.scpt\f[R] Setup AppleScript script .RS .PP Default resource is \f[I]DMGsetup.scpt\f[R] .RE .TP -.B \f[CB]<package\-name>\-license.plist\f[R] +\f[V]<package-name>-license.plist\f[R] License property list file .RS .PP Default resource is \f[I]lic_template.plist\f[R] .RE .TP -.B \f[CB]<package\-name>\-background.tiff\f[R] +\f[V]<package-name>-background.tiff\f[R] Background image .RS .PP Default resource is \f[I]background_dmg.tiff\f[R] .RE .TP -.B \f[CB]<package\-name>\-volume.icns\f[R] +\f[V]<package-name>-volume.icns\f[R] Volume icon .RS .PP diff --git a/src/jdk.jshell/share/man/jshell.1 b/src/jdk.jshell/share/man/jshell.1 index 64cc2454215bb..c9763f3ea44f7 100644 --- a/src/jdk.jshell/share/man/jshell.1 +++ b/src/jdk.jshell/share/man/jshell.1 @@ -19,58 +19,65 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\"t -.\" Automatically generated by Pandoc 2.3.1 +'\" t +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JSHELL" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JSHELL" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jshell \- interactively evaluate declarations, statements, and -expressions of the Java programming language in a read\-eval\-print loop +jshell - interactively evaluate declarations, statements, and +expressions of the Java programming language in a read-eval-print loop (REPL) .SH SYNOPSIS .PP -\f[CB]jshell\f[R] [\f[I]options\f[R]] [\f[I]load\-files\f[R]] +\f[V]jshell\f[R] [\f[I]options\f[R]] [\f[I]load-files\f[R]] .TP -.B \f[I]options\f[R] -Command\-line options, separated by spaces. +\f[I]options\f[R] +Command-line options, separated by spaces. See \f[B]Options for jshell\f[R]. -.RS -.RE .TP -.B \f[I]load\-files\f[R] +\f[I]load-files\f[R] One or more scripts to run when the tool is started. Scripts can contain any valid code snippets or JShell commands. .RS .PP The script can be a local file or one of following predefined scripts: .TP -.B \f[CB]DEFAULT\f[R] +\f[V]DEFAULT\f[R] Loads the default entries, which are commonly used as imports. -.RS -.RE .TP -.B \f[CB]JAVASE\f[R] +\f[V]JAVASE\f[R] Imports all Java SE packages. -.RS -.RE .TP -.B \f[CB]PRINTING\f[R] -Defines \f[CB]print\f[R], \f[CB]println\f[R], and \f[CB]printf\f[R] as -\f[CB]jshell\f[R] methods for use within the tool. -.RS -.RE +\f[V]PRINTING\f[R] +Defines \f[V]print\f[R], \f[V]println\f[R], and \f[V]printf\f[R] as +\f[V]jshell\f[R] methods for use within the tool. .PP For more than one script, use a space to separate the names. Scripts are run in the order in which they\[aq]re entered on the command line. -Command\-line scripts are run after startup scripts. -To run a script after JShell is started, use the \f[CB]/open\f[R] command. +Command-line scripts are run after startup scripts. +To run a script after JShell is started, use the \f[V]/open\f[R] +command. .PP To accept input from standard input and suppress the interactive I/O, -enter a hyphen (\-) for \f[I]load\-files\f[R]. -This option enables the use of the \f[CB]jshell\f[R] tool in pipe chains. +enter a hyphen (-) for \f[I]load-files\f[R]. +This option enables the use of the \f[V]jshell\f[R] tool in pipe chains. .RE .SH DESCRIPTION .PP @@ -90,7 +97,7 @@ Errors are described regardless of the feedback mode. Start with the verbose mode to get the most feedback while learning the tool. .PP -Command\-line options are available for configuring the initial +Command-line options are available for configuring the initial environment when JShell is started. Within JShell, commands are available for modifying the environment as needed. @@ -102,153 +109,112 @@ variations and make corrections. To keep snippets for later use, save them to a file. .SH OPTIONS FOR JSHELL .TP -.B \f[CB]\-\-add\-exports\f[R] \f[I]module\f[R]/\f[I]package\f[R] +\f[V]--add-exports\f[R] \f[I]module\f[R]/\f[I]package\f[R] Specifies a package to be considered as exported from its defining module. -.RS -.RE .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...] +\f[V]--add-modules\f[R] \f[I]module\f[R][\f[V],\f[R]\f[I]module\f[R]...] Specifies the root modules to resolve in addition to the initial module. -.RS -.RE .TP -.B \f[CB]\-C\f[R]\f[I]flag\f[R] +\f[V]-C\f[R]\f[I]flag\f[R] Provides a flag to pass to the compiler. To pass more than one flag, provide an instance of this option for each flag or flag argument needed. -.RS -.RE .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R] Specifies the directories and archives that are searched to locate class files. -This option overrides the path in the \f[CB]CLASSPATH\f[R] environment +This option overrides the path in the \f[V]CLASSPATH\f[R] environment variable. If the environment variable isn\[aq]t set and this option isn\[aq]t used, then the current directory is searched. For Linux and macOS, use a colon (:) to separate items in the path. For Windows, use a semicolon (;) to separate items. -.RS -.RE .TP -.B \f[CB]\-\-enable\-preview\f[R] +\f[V]--enable-preview\f[R] Allows code to depend on the preview features of this release. -.RS -.RE .TP -.B \f[CB]\-\-execution\f[R] \f[I]specification\f[R] -Specifies an alternate execution engine, where \f[I]specification\f[R] is -an ExecutionControl spec. +\f[V]--execution\f[R] \f[I]specification\f[R] +Specifies an alternate execution engine, where \f[I]specification\f[R] +is an ExecutionControl spec. See the documentation of the package jdk.jshell.spi for the syntax of the spec. -.RS -.RE .TP -.B \f[CB]\-\-feedback\f[R] \f[I]mode\f[R] +\f[V]--feedback\f[R] \f[I]mode\f[R] Sets the initial level of feedback provided in response to what\[aq]s entered. The initial level can be overridden within a session by using the -\f[CB]/set\ feedback\f[R] \f[I]mode\f[R] command. -The default is \f[CB]normal\f[R]. +\f[V]/set feedback\f[R] \f[I]mode\f[R] command. +The default is \f[V]normal\f[R]. .RS .PP The following values are valid for \f[I]mode\f[R]: .TP -.B \f[CB]verbose\f[R] +\f[V]verbose\f[R] Provides detailed feedback for entries. Additional information about the action performed is displayed after the result of the action. The next prompt is separated from the feedback by a blank line. -.RS -.RE .TP -.B \f[CB]normal\f[R] +\f[V]normal\f[R] Provides an average amount of feedback. The next prompt is separated from the feedback by a blank line. -.RS -.RE .TP -.B \f[CB]concise\f[R] +\f[V]concise\f[R] Provides minimal feedback. The next prompt immediately follows the code snippet or feedback. -.RS -.RE .TP -.B \f[CB]silent\f[R] +\f[V]silent\f[R] Provides no feedback. The next prompt immediately follows the code snippet. -.RS -.RE .TP -.B \f[I]custom\f[R] +\f[I]custom\f[R] Provides custom feedback based on how the mode is defined. Custom feedback modes are created within JShell by using the -\f[CB]/set\ mode\f[R] command. -.RS -.RE +\f[V]/set mode\f[R] command. .RE .TP -.B \f[CB]\-\-help\f[R] or \f[CB]\-h\f[R] or \f[CB]\-?\f[R] +\f[V]--help\f[R] or \f[V]-h\f[R] or \f[V]-?\f[R] Prints a summary of standard options and exits the tool. -.RS -.RE .TP -.B \f[CB]\-\-help\-extra\f[R] or \f[CB]\-X\f[R] +\f[V]--help-extra\f[R] or \f[V]-X\f[R] Prints a summary of nonstandard options and exits the tool. Nonstandard options are subject to change without notice. -.RS -.RE .TP -.B \f[CB]\-J\f[R]\f[I]flag\f[R] +\f[V]-J\f[R]\f[I]flag\f[R] Provides a flag to pass to the runtime system. To pass more than one flag, provide an instance of this option for each flag or flag argument needed. -.RS -.RE .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R] +\f[V]--module-path\f[R] \f[I]modulepath\f[R] Specifies where to find application modules. For Linux and macOS, use a colon (:) to separate items in the path. For Windows, use a semicolon (;) to separate items. -.RS -.RE .TP -.B \f[CB]\-\-no\-startup\f[R] +\f[V]--no-startup\f[R] Prevents startup scripts from running when JShell starts. Use this option to run only the scripts entered on the command line when JShell is started, or to start JShell without any preloaded information if no scripts are entered. -This option can\[aq]t be used if the \f[CB]\-\-startup\f[R] option is -used. -.RS -.RE +This option can\[aq]t be used if the \f[V]--startup\f[R] option is used. .TP -.B \f[CB]\-q\f[R] -Sets the feedback mode to \f[CB]concise\f[R], which is the same as -entering \f[CB]\-\-feedback\ concise\f[R]. -.RS -.RE +\f[V]-q\f[R] +Sets the feedback mode to \f[V]concise\f[R], which is the same as +entering \f[V]--feedback concise\f[R]. .TP -.B \f[CB]\-R\f[R]\f[I]flag\f[R] +\f[V]-R\f[R]\f[I]flag\f[R] Provides a flag to pass to the remote runtime system. To pass more than one flag, provide an instance of this option for each flag or flag argument to pass. -.RS -.RE .TP -.B \f[CB]\-s\f[R] -Sets the feedback mode to \f[CB]silent\f[R], which is the same as entering -\f[CB]\-\-feedback\ silent\f[R]. -.RS -.RE +\f[V]-s\f[R] +Sets the feedback mode to \f[V]silent\f[R], which is the same as +entering \f[V]--feedback silent\f[R]. .TP -.B \f[CB]\-\-show\-version\f[R] +\f[V]--show-version\f[R] Prints version information and enters the tool. -.RS -.RE .TP -.B \f[CB]\-\-startup\f[R] \f[I]file\f[R] +\f[V]--startup\f[R] \f[I]file\f[R] Overrides the default startup script for this session. The script can contain any valid code snippets or commands. .RS @@ -256,99 +222,81 @@ The script can contain any valid code snippets or commands. The script can be a local file or one of the following predefined scripts: .TP -.B \f[CB]DEFAULT\f[R] +\f[V]DEFAULT\f[R] Loads the default entries, which are commonly used as imports. -.RS -.RE .TP -.B \f[CB]JAVASE\f[R] +\f[V]JAVASE\f[R] Imports all Java SE packages. -.RS -.RE .TP -.B \f[CB]PRINTING\f[R] -Defines \f[CB]print\f[R], \f[CB]println\f[R], and \f[CB]printf\f[R] as -\f[CB]jshell\f[R] methods for use within the tool. -.RS -.RE +\f[V]PRINTING\f[R] +Defines \f[V]print\f[R], \f[V]println\f[R], and \f[V]printf\f[R] as +\f[V]jshell\f[R] methods for use within the tool. .PP For more than one script, provide a separate instance of this option for each script. Startup scripts are run when JShell is first started and when the -session is restarted with the \f[CB]/reset\f[R], \f[CB]/reload\f[R], or -\f[CB]/env\f[R] command. +session is restarted with the \f[V]/reset\f[R], \f[V]/reload\f[R], or +\f[V]/env\f[R] command. Startup scripts are run in the order in which they\[aq]re entered on the command line. .PP -This option can\[aq]t be used if the \f[CB]\-\-no\-startup\f[R] option is +This option can\[aq]t be used if the \f[V]--no-startup\f[R] option is used. .RE .TP -.B \f[CB]\-v\f[R] -Sets the feedback mode to \f[CB]verbose\f[R], which is the same as -entering \f[CB]\-\-feedback\ verbose\f[R]. -.RS -.RE +\f[V]-v\f[R] +Sets the feedback mode to \f[V]verbose\f[R], which is the same as +entering \f[V]--feedback verbose\f[R]. .TP -.B \f[CB]\-\-version\f[R] +\f[V]--version\f[R] Prints version information and exits the tool. -.RS -.RE .SH JSHELL COMMANDS .PP -Within the \f[CB]jshell\f[R] tool, commands are used to modify the +Within the \f[V]jshell\f[R] tool, commands are used to modify the environment and manage code snippets. .TP -.B \f[CB]/drop\f[R] {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +\f[V]/drop\f[R] {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Drops snippets identified by name, ID, or ID range, making them inactive. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -Use the \f[CB]/list\f[R] command to see the IDs of code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of code snippets. .TP -.B \f[CB]/edit\f[R] [\f[I]option\f[R]] +\f[V]/edit\f[R] [\f[I]option\f[R]] Opens an editor. If no option is entered, then the editor opens with the active snippets. .RS .PP The following options are valid: .TP -.B {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Opens the editor with the snippets identified by name, ID, or ID range. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -Use the \f[CB]/list\f[R] command to see the IDs of code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of code snippets. .TP -.B \f[CB]\-all\f[R] +\f[V]-all\f[R] Opens the editor with all snippets, including startup snippets and snippets that failed, were overwritten, or were dropped. -.RS -.RE .TP -.B \f[CB]\-start\f[R] +\f[V]-start\f[R] Opens the editor with startup snippets that were evaluated when JShell was started. -.RS -.RE .PP To exit edit mode, close the editor window, or respond to the prompt -provided if the \f[CB]\-wait\f[R] option was used when the editor was set. +provided if the \f[V]-wait\f[R] option was used when the editor was set. .PP -Use the \f[CB]/set\ editor\f[R] command to specify the editor to use. +Use the \f[V]/set editor\f[R] command to specify the editor to use. If no editor is set, then the following environment variables are -checked in order: \f[CB]JSHELLEDITOR\f[R], \f[CB]VISUAL\f[R], and -\f[CB]EDITOR\f[R]. +checked in order: \f[V]JSHELLEDITOR\f[R], \f[V]VISUAL\f[R], and +\f[V]EDITOR\f[R]. If no editor is set in JShell and none of the editor environment variables is set, then a simple default editor is used. .RE .TP -.B \f[CB]/env\f[R] [\f[I]options\f[R]] +\f[V]/env\f[R] [\f[I]options\f[R]] Displays the environment settings, or updates the environment settings and restarts the session. If no option is entered, then the current environment settings are @@ -364,66 +312,54 @@ Resets the execution state. Runs the startup scripts. .IP \[bu] 2 Silently replays the history in the order entered. -The history includes all valid snippets or \f[CB]/drop\f[R] commands -entered at the \f[CB]jshell\f[R] prompt, in scripts entered on the command -line, or scripts entered with the \f[CB]/open\f[R] command. +The history includes all valid snippets or \f[V]/drop\f[R] commands +entered at the \f[V]jshell\f[R] prompt, in scripts entered on the +command line, or scripts entered with the \f[V]/open\f[R] command. .PP Environment settings entered on the command line or provided with a -previous \f[CB]/reset\f[R], \f[CB]/env\f[R], or \f[CB]/reload\f[R] command are -maintained unless an \f[I]option\f[R] is entered that overwrites the +previous \f[V]/reset\f[R], \f[V]/env\f[R], or \f[V]/reload\f[R] command +are maintained unless an \f[I]option\f[R] is entered that overwrites the setting. .PP The following options are valid: .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...] +\f[V]--add-modules\f[R] \f[I]module\f[R][\f[V],\f[R]\f[I]module\f[R]...] Specifies the root modules to resolve in addition to the initial module. -.RS -.RE .TP -.B \f[CB]\-\-add\-exports\f[R] \f[I]source\-module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R][\f[CB],\f[R]\f[I]target\-module\f[R]]* -Adds an export of \f[I]package\f[R] from \f[I]source\-module\f[R] to -\f[I]target\-module\f[R]. -.RS -.RE +\f[V]--add-exports\f[R] \f[I]source-module\f[R]\f[V]/\f[R]\f[I]package\f[R]\f[V]=\f[R]\f[I]target-module\f[R][\f[V],\f[R]\f[I]target-module\f[R]]* +Adds an export of \f[I]package\f[R] from \f[I]source-module\f[R] to +\f[I]target-module\f[R]. .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R] Specifies the directories and archives that are searched to locate class files. -This option overrides the path in the \f[CB]CLASSPATH\f[R] environment +This option overrides the path in the \f[V]CLASSPATH\f[R] environment variable. If the environment variable isn\[aq]t set and this option isn\[aq]t used, then the current directory is searched. -For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the +For Linux and macOS, use a colon (\f[V]:\f[R]) to separate items in the path. -For Windows, use a semicolon (\f[CB];\f[R]) to separate items. -.RS -.RE +For Windows, use a semicolon (\f[V];\f[R]) to separate items. .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R] +\f[V]--module-path\f[R] \f[I]modulepath\f[R] Specifies where to find application modules. -For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the +For Linux and macOS, use a colon (\f[V]:\f[R]) to separate items in the path. -For Windows, use a semicolon (\f[CB];\f[R]) to separate items. -.RS -.RE +For Windows, use a semicolon (\f[V];\f[R]) to separate items. .RE .TP -.B \f[CB]/exit\f[R] [\f[I]integer\-expression\-snippet\f[R]] +\f[V]/exit\f[R] [\f[I]integer-expression-snippet\f[R]] Exits the tool. If no snippet is entered, the exit status is zero. If a snippet is entered and the result of the snippet is an integer, the result is used as the exit status. If an error occurs, or the result of the snippet is not an integer, an error is displayed and the tool remains active. -.RS -.RE .TP -.B \f[CB]/history\f[R] +\f[V]/history\f[R] Displays what was entered in this session. -.RS -.RE .TP -.B \f[CB]/help\f[R] [\f[I]command\f[R]|\f[I]subject\f[R]] +\f[V]/help\f[R] [\f[I]command\f[R]|\f[I]subject\f[R]] Displays information about commands and subjects. If no options are entered, then a summary of information for all commands and a list of available subjects are displayed. @@ -435,32 +371,24 @@ displayed. .PP The following values for \f[I]subject\f[R] are valid: .TP -.B \f[CB]context\f[R] +\f[V]context\f[R] Describes the options that are available for configuring the environment. -.RS -.RE .TP -.B \f[CB]intro\f[R] +\f[V]intro\f[R] Provides an introduction to the tool. -.RS -.RE .TP -.B \f[CB]shortcuts\f[R] +\f[V]shortcuts\f[R] Describes keystrokes for completing commands and snippets. See \f[B]Input Shortcuts\f[R]. -.RS -.RE .RE .TP -.B \f[CB]/imports\f[R] +\f[V]/imports\f[R] Displays the current active imports, including those from the startup scripts and scripts that were entered on the command line when JShell was started. -.RS -.RE .TP -.B \f[CB]/list\f[R] [\f[I]option\f[R]] +\f[V]/list\f[R] [\f[I]option\f[R]] Displays a list of snippets and their IDs. If no option is entered, then all active snippets are displayed, but startup snippets aren\[aq]t. @@ -468,29 +396,23 @@ startup snippets aren\[aq]t. .PP The following options are valid: .TP -.B {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Displays the snippets identified by name, ID, or ID range. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -.RS -.RE .TP -.B \f[CB]\-all\f[R] +\f[V]-all\f[R] Displays all snippets, including startup snippets and snippets that failed, were overwritten, or were dropped. -IDs that begin with \f[CB]s\f[R] are startup snippets. -IDs that begin with \f[CB]e\f[R] are snippets that failed. -.RS -.RE +IDs that begin with \f[V]s\f[R] are startup snippets. +IDs that begin with \f[V]e\f[R] are snippets that failed. .TP -.B \f[CB]\-start\f[R] +\f[V]-start\f[R] Displays startup snippets that were evaluated when JShell was started. -.RS -.RE .RE .TP -.B \f[CB]/methods\f[R] [\f[I]option\f[R]] +\f[V]/methods\f[R] [\f[I]option\f[R]] Displays information about the methods that were entered. If no option is entered, then the name, parameter types, and return type of all active methods are displayed. @@ -498,52 +420,40 @@ of all active methods are displayed. .PP The following options are valid: .TP -.B {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Displays information for methods identified by name, ID, or ID range. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -Use the \f[CB]/list\f[R] command to see the IDs of code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of code snippets. .TP -.B \f[CB]\-all\f[R] +\f[V]-all\f[R] Displays information for all methods, including those added when JShell was started, and methods that failed, were overwritten, or were dropped. -.RS -.RE .TP -.B \f[CB]\-start\f[R] +\f[V]-start\f[R] Displays information for startup methods that were added when JShell was started. -.RS -.RE .RE .TP -.B \f[CB]/open\f[R] \f[I]file\f[R] +\f[V]/open\f[R] \f[I]file\f[R] Opens the script specified and reads the snippets into the tool. The script can be a local file or one of the following predefined scripts: .RS .TP -.B \f[CB]DEFAULT\f[R] +\f[V]DEFAULT\f[R] Loads the default entries, which are commonly used as imports. -.RS -.RE .TP -.B \f[CB]JAVASE\f[R] +\f[V]JAVASE\f[R] Imports all Java SE packages. -.RS -.RE .TP -.B \f[CB]PRINTING\f[R] -Defines \f[CB]print\f[R], \f[CB]println\f[R], and \f[CB]printf\f[R] as -\f[CB]jshell\f[R] methods for use within the tool. -.RS -.RE +\f[V]PRINTING\f[R] +Defines \f[V]print\f[R], \f[V]println\f[R], and \f[V]printf\f[R] as +\f[V]jshell\f[R] methods for use within the tool. .RE .TP -.B \f[CB]/reload\f[R] [\f[I]options\f[R]] +\f[V]/reload\f[R] [\f[I]options\f[R]] Restarts the session as follows: .RS .IP \[bu] 2 @@ -554,66 +464,54 @@ Resets the execution state. Runs the startup scripts. .IP \[bu] 2 Replays the history in the order entered. -The history includes all valid snippets or \f[CB]/drop\f[R] commands -entered at the \f[CB]jshell\f[R] prompt, in scripts entered on the command -line, or scripts entered with the \f[CB]/open\f[R] command. +The history includes all valid snippets or \f[V]/drop\f[R] commands +entered at the \f[V]jshell\f[R] prompt, in scripts entered on the +command line, or scripts entered with the \f[V]/open\f[R] command. .PP Environment settings entered on the command line or provided with a -previous \f[CB]/reset\f[R], \f[CB]/env\f[R], or \f[CB]/reload\f[R] command are -maintained unless an \f[I]option\f[R] is entered that overwrites the +previous \f[V]/reset\f[R], \f[V]/env\f[R], or \f[V]/reload\f[R] command +are maintained unless an \f[I]option\f[R] is entered that overwrites the setting. .PP The following options are valid: .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...] +\f[V]--add-modules\f[R] \f[I]module\f[R][\f[V],\f[R]\f[I]module\f[R]...] Specifies the root modules to resolve in addition to the initial module. -.RS -.RE .TP -.B \f[CB]\-\-add\-exports\f[R] \f[I]source\-module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R][\f[CB],\f[R]\f[I]target\-module\f[R]]* -Adds an export of \f[I]package\f[R] from \f[I]source\-module\f[R] to -\f[I]target\-module\f[R]. -.RS -.RE +\f[V]--add-exports\f[R] \f[I]source-module\f[R]\f[V]/\f[R]\f[I]package\f[R]\f[V]=\f[R]\f[I]target-module\f[R][\f[V],\f[R]\f[I]target-module\f[R]]* +Adds an export of \f[I]package\f[R] from \f[I]source-module\f[R] to +\f[I]target-module\f[R]. .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R] Specifies the directories and archives that are searched to locate class files. -This option overrides the path in the \f[CB]CLASSPATH\f[R] environment +This option overrides the path in the \f[V]CLASSPATH\f[R] environment variable. If the environment variable isn\[aq]t set and this option isn\[aq]t used, then the current directory is searched. -For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the +For Linux and macOS, use a colon (\f[V]:\f[R]) to separate items in the path. -For Windows, use a semicolon (\f[CB];\f[R]) to separate items. -.RS -.RE +For Windows, use a semicolon (\f[V];\f[R]) to separate items. .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R] +\f[V]--module-path\f[R] \f[I]modulepath\f[R] Specifies where to find application modules. -For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the +For Linux and macOS, use a colon (\f[V]:\f[R]) to separate items in the path. -For Windows, use a semicolon (\f[CB];\f[R]) to separate items. -.RS -.RE +For Windows, use a semicolon (\f[V];\f[R]) to separate items. .TP -.B \f[CB]\-quiet\f[R] +\f[V]-quiet\f[R] Replays the valid history without displaying it. Errors are displayed. -.RS -.RE .TP -.B \f[CB]\-restore\f[R] +\f[V]-restore\f[R] Resets the environment to the state at the start of the previous run of -the tool or to the last time a \f[CB]/reset\f[R], \f[CB]/reload\f[R], or -\f[CB]/env\f[R] command was executed in the previous run. +the tool or to the last time a \f[V]/reset\f[R], \f[V]/reload\f[R], or +\f[V]/env\f[R] command was executed in the previous run. The valid history since that point is replayed. Use this option to restore a previous JShell session. -.RS -.RE .RE .TP -.B \f[CB]/reset\f[R] [\f[I]options\f[R]] +\f[V]/reset\f[R] [\f[I]options\f[R]] Discards all entered snippets and restarts the session as follows: .RS .IP \[bu] 2 @@ -627,81 +525,65 @@ History is not replayed. All code that was entered is lost. .PP Environment settings entered on the command line or provided with a -previous \f[CB]/reset\f[R], \f[CB]/env\f[R], or \f[CB]/reload\f[R] command are -maintained unless an \f[I]option\f[R] is entered that overwrites the +previous \f[V]/reset\f[R], \f[V]/env\f[R], or \f[V]/reload\f[R] command +are maintained unless an \f[I]option\f[R] is entered that overwrites the setting. .PP The following options are valid: .TP -.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...] +\f[V]--add-modules\f[R] \f[I]module\f[R][\f[V],\f[R]\f[I]module\f[R]...] Specifies the root modules to resolve in addition to the initial module. -.RS -.RE .TP -.B \f[CB]\-\-add\-exports\f[R] \f[I]source\-module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R][\f[CB],\f[R]\f[I]target\-module\f[R]]* -Adds an export of \f[I]package\f[R] from \f[I]source\-module\f[R] to -\f[I]target\-module\f[R]. -.RS -.RE +\f[V]--add-exports\f[R] \f[I]source-module\f[R]\f[V]/\f[R]\f[I]package\f[R]\f[V]=\f[R]\f[I]target-module\f[R][\f[V],\f[R]\f[I]target-module\f[R]]* +Adds an export of \f[I]package\f[R] from \f[I]source-module\f[R] to +\f[I]target-module\f[R]. .TP -.B \f[CB]\-\-class\-path\f[R] \f[I]path\f[R] +\f[V]--class-path\f[R] \f[I]path\f[R] Specifies the directories and archives that are searched to locate class files. -This option overrides the path in the \f[CB]CLASSPATH\f[R] environment +This option overrides the path in the \f[V]CLASSPATH\f[R] environment variable. If the environment variable isn\[aq]t set and this option isn\[aq]t used, then the current directory is searched. -For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the +For Linux and macOS, use a colon (\f[V]:\f[R]) to separate items in the path. -For Windows, use a semicolon (\f[CB];\f[R]) to separate items. -.RS -.RE +For Windows, use a semicolon (\f[V];\f[R]) to separate items. .TP -.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R] +\f[V]--module-path\f[R] \f[I]modulepath\f[R] Specifies where to find application modules. -For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the +For Linux and macOS, use a colon (\f[V]:\f[R]) to separate items in the path. -For Windows, use a semicolon (\f[CB];\f[R]) to separate items. -.RS -.RE +For Windows, use a semicolon (\f[V];\f[R]) to separate items. .RE .TP -.B \f[CB]/save\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +\f[V]/save\f[R] [\f[I]options\f[R]] \f[I]file\f[R] Saves snippets and commands to the file specified. If no options are entered, then active snippets are saved. .RS .PP The following options are valid: .TP -.B {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Saves the snippets and commands identified by name, ID, or ID range. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -Use the \f[CB]/list\f[R] command to see the IDs of the code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of the code snippets. .TP -.B \f[CB]\-all\f[R] +\f[V]-all\f[R] Saves all snippets, including startup snippets and snippets that were overwritten or failed. -.RS -.RE .TP -.B \f[CB]\-history\f[R] +\f[V]-history\f[R] Saves the sequential history of all commands and snippets entered in the current session. -.RS -.RE .TP -.B \f[CB]\-start\f[R] +\f[V]-start\f[R] Saves the current startup settings. If no startup scripts were provided, then an empty file is saved. -.RS -.RE .RE .TP -.B \f[CB]/set\f[R] [\f[I]setting\f[R]] +\f[V]/set\f[R] [\f[I]setting\f[R]] Sets configuration information, including the external editor, startup settings, and feedback mode. This command is also used to create a custom feedback mode with @@ -710,11 +592,11 @@ If no setting is entered, then the current setting for the editor, startup settings, and feedback mode are displayed. .RS .PP -The following values are valid for \f[CB]setting\f[R]: +The following values are valid for \f[V]setting\f[R]: .TP -.B \f[CB]editor\f[R] [\f[I]options\f[R]] [\f[I]command\f[R]] +\f[V]editor\f[R] [\f[I]options\f[R]] [\f[I]command\f[R]] Sets the command used to start an external editor when the -\f[CB]/edit\f[R] command is entered. +\f[V]/edit\f[R] command is entered. The command can include command arguments separated by spaces. If no command or options are entered, then the current setting is displayed. @@ -722,19 +604,17 @@ displayed. .PP The following options are valid: .TP -.B \f[CB]\-default\f[R] +\f[V]-default\f[R] Sets the editor to the default editor provided with JShell. This option can\[aq]t be used if a command for starting an editor is entered. -.RS -.RE .TP -.B \f[CB]\-delete\f[R] +\f[V]-delete\f[R] Sets the editor to the one in effect when the session started. -If used with the \f[CB]\-retain\f[R] option, then the retained editor +If used with the \f[V]-retain\f[R] option, then the retained editor setting is deleted and the editor is set to the first of the following -environment variables found: \f[CB]JSHELLEDITOR\f[R], \f[CB]VISUAL\f[R], or -\f[CB]EDITOR\f[R]. +environment variables found: \f[V]JSHELLEDITOR\f[R], \f[V]VISUAL\f[R], +or \f[V]EDITOR\f[R]. If none of the editor environment variables are set, then this option sets the editor to the default editor. .RS @@ -743,35 +623,31 @@ This option can\[aq]t be used if a command for starting an editor is entered. .RE .TP -.B \f[CB]\-retain\f[R] +\f[V]-retain\f[R] Saves the editor setting across sessions. If no other option or a command is entered, then the current setting is saved. -.RS -.RE .TP -.B \f[CB]\-wait\f[R] +\f[V]-wait\f[R] Prompts the user to indicate when editing is complete. Otherwise control returns to JShell when the editor exits. Use this option if the editor being used exits immediately, for example, when an edit window already exists. This option is valid only when a command for starting an editor is entered. -.RS -.RE .RE .TP -.B \f[CB]feedback\f[R] [\f[I]mode\f[R]] +\f[V]feedback\f[R] [\f[I]mode\f[R]] Sets the feedback mode used to respond to input. If no mode is entered, then the current mode is displayed. .RS .PP -The following modes are valid: \f[CB]concise\f[R], \f[CB]normal\f[R], -\f[CB]silent\f[R], \f[CB]verbose\f[R], and any custom mode created with the -\f[CB]/set\ mode\f[R] command. +The following modes are valid: \f[V]concise\f[R], \f[V]normal\f[R], +\f[V]silent\f[R], \f[V]verbose\f[R], and any custom mode created with +the \f[V]/set mode\f[R] command. .RE .TP -.B \f[CB]format\f[R] \f[I]mode\f[R] \f[I]field\f[R] \f[CB]"\f[R]\f[I]format\-string\f[R]\f[CB]"\f[R] \f[I]selector\f[R] +\f[V]format\f[R] \f[I]mode\f[R] \f[I]field\f[R] \f[V]\[dq]\f[R]\f[I]format-string\f[R]\f[V]\[dq]\f[R] \f[I]selector\f[R] Sets the format of the feedback provided in response to input. If no mode is entered, then the current formats for all fields for all feedback modes are displayed. @@ -783,39 +659,31 @@ field are displayed. .PP To define a format, the following arguments are required: .TP -.B \f[I]mode\f[R] +\f[I]mode\f[R] Specifies a feedback mode to which the response format is applied. -Only custom modes created with the \f[CB]/set\ mode\f[R] command can be +Only custom modes created with the \f[V]/set mode\f[R] command can be modified. -.RS -.RE .TP -.B \f[I]field\f[R] -Specifies a context\-specific field to which the response format is +\f[I]field\f[R] +Specifies a context-specific field to which the response format is applied. The fields are described in the online help, which is accessed from -JShell using the \f[CB]/help\ /set\ format\f[R] command. -.RS -.RE +JShell using the \f[V]/help /set format\f[R] command. .TP -.B \f[CB]"\f[R]\f[I]format\-string\f[R]\f[CB]"\f[R] +\f[V]\[dq]\f[R]\f[I]format-string\f[R]\f[V]\[dq]\f[R] Specifies the string to use as the response format for the specified field and selector. The structure of the format string is described in the online help, -which is accessed from JShell using the \f[CB]/help\ /set\ format\f[R] +which is accessed from JShell using the \f[V]/help /set format\f[R] command. -.RS -.RE .TP -.B \f[I]selector\f[R] +\f[I]selector\f[R] Specifies the context in which the response format is applied. The selectors are described in the online help, which is accessed from -JShell using the \f[CB]/help\ /set\ format\f[R] command. -.RS -.RE +JShell using the \f[V]/help /set format\f[R] command. .RE .TP -.B \f[CB]mode\f[R] [\f[I]mode\-name\f[R]] [\f[I]existing\-mode\f[R]] [\f[I]options\f[R]] +\f[V]mode\f[R] [\f[I]mode-name\f[R]] [\f[I]existing-mode\f[R]] [\f[I]options\f[R]] Creates a custom feedback mode with the mode name provided. If no mode name is entered, then the settings for all modes are displayed, which includes the mode, prompt, format, and truncation @@ -826,39 +694,33 @@ existing mode are copied to the mode being created. .PP The following options are valid: .TP -.B \f[CB]\-command\f[R]|\f[CB]\-quiet\f[R] +\f[V]-command\f[R]|\f[V]-quiet\f[R] Specifies the level of feedback displayed for commands when using the mode. This option is required when creating a feedback mode. -Use \f[CB]\-command\f[R] to show information and verification feedback for +Use \f[V]-command\f[R] to show information and verification feedback for commands. -Use \f[CB]\-quiet\f[R] to show only essential feedback for commands, such +Use \f[V]-quiet\f[R] to show only essential feedback for commands, such as error messages. -.RS -.RE .TP -.B \f[CB]\-delete\f[R] +\f[V]-delete\f[R] Deletes the named feedback mode for this session. The name of the mode to delete is required. -To permanently delete a retained mode, use the \f[CB]\-retain\f[R] option +To permanently delete a retained mode, use the \f[V]-retain\f[R] option with this option. Predefined modes can\[aq]t be deleted. -.RS -.RE .TP -.B \f[CB]\-retain\f[R] +\f[V]-retain\f[R] Saves the named feedback mode across sessions. The name of the mode to retain is required. -.RS -.RE .PP -Configure the new feedback mode using the \f[CB]/set\ prompt\f[R], -\f[CB]/set\ format\f[R], and \f[CB]/set\ truncation\f[R] commands. +Configure the new feedback mode using the \f[V]/set prompt\f[R], +\f[V]/set format\f[R], and \f[V]/set truncation\f[R] commands. .PP -To start using the new mode, use the \f[CB]/set\ feedback\f[R] command. +To start using the new mode, use the \f[V]/set feedback\f[R] command. .RE .TP -.B \f[CB]prompt\f[R] \f[I]mode\f[R] \f[CB]"\f[R]\f[I]prompt\-string\f[R]\f[CB]"\f[R] \f[CB]"\f[R]\f[I]continuation\-prompt\-string\f[R]\f[CB]"\f[R] +\f[V]prompt\f[R] \f[I]mode\f[R] \f[V]\[dq]\f[R]\f[I]prompt-string\f[R]\f[V]\[dq]\f[R] \f[V]\[dq]\f[R]\f[I]continuation-prompt-string\f[R]\f[V]\[dq]\f[R] Sets the prompts for input within JShell. If no mode is entered, then the current prompts for all feedback modes are displayed. @@ -868,28 +730,23 @@ displayed. .PP To define a prompt, the following arguments are required: .TP -.B \f[I]mode\f[R] +\f[I]mode\f[R] Specifies the feedback mode to which the prompts are applied. -Only custom modes created with the \f[CB]/set\ mode\f[R] command can be +Only custom modes created with the \f[V]/set mode\f[R] command can be modified. -.RS -.RE .TP -.B \f[CB]"\f[R]\f[I]prompt\-string\f[R]\f[CB]"\f[R] +\f[V]\[dq]\f[R]\f[I]prompt-string\f[R]\f[V]\[dq]\f[R] Specifies the string to use as the prompt for the first line of input. -.RS -.RE .TP -.B \f[CB]"\f[R]\f[I]continuation\-prompt\-string\f[R]\f[CB]"\f[R] +\f[V]\[dq]\f[R]\f[I]continuation-prompt-string\f[R]\f[V]\[dq]\f[R] Specifies the string to use as the prompt for the additional input lines needed to complete a snippet. -.RS -.RE .RE .TP -.B \f[CB]start\f[R] [\f[CB]\-retain\f[R]] [\f[I]file\f[R] [\f[I]file\f[R]...]|\f[I]option\f[R]] +\f[V]start\f[R] [\f[V]-retain\f[R]] [\f[I]file\f[R] [\f[I]file\f[R]...]|\f[I]option\f[R]] Sets the names of the startup scripts used when the next -\f[CB]/reset\f[R], \f[CB]/reload\f[R], or \f[CB]/env\f[R] command is entered. +\f[V]/reset\f[R], \f[V]/reload\f[R], or \f[V]/env\f[R] command is +entered. If more than one script is entered, then the scripts are run in the order entered. If no scripts or options are entered, then the current startup settings @@ -899,39 +756,29 @@ are displayed. The scripts can be local files or one of the following predefined scripts: .TP -.B \f[CB]DEFAULT\f[R] +\f[V]DEFAULT\f[R] Loads the default entries, which are commonly used as imports. -.RS -.RE .TP -.B \f[CB]JAVASE\f[R] +\f[V]JAVASE\f[R] Imports all Java SE packages. -.RS -.RE .TP -.B \f[CB]PRINTING\f[R] -Defines \f[CB]print\f[R], \f[CB]println\f[R], and \f[CB]printf\f[R] as -\f[CB]jshell\f[R] methods for use within the tool. -.RS -.RE +\f[V]PRINTING\f[R] +Defines \f[V]print\f[R], \f[V]println\f[R], and \f[V]printf\f[R] as +\f[V]jshell\f[R] methods for use within the tool. .PP The following options are valid: .TP -.B \f[CB]\-default\f[R] +\f[V]-default\f[R] Sets the startup settings to the default settings. -.RS -.RE .TP -.B \f[CB]\-none\f[R] +\f[V]-none\f[R] Specifies that no startup settings are used. -.RS -.RE .PP -Use the \f[CB]\-retain\f[R] option to save the start setting across +Use the \f[V]-retain\f[R] option to save the start setting across sessions. .RE .TP -.B \f[CB]truncation\f[R] \f[I]mode\f[R] \f[I]length\f[R] \f[I]selector\f[R] +\f[V]truncation\f[R] \f[I]mode\f[R] \f[I]length\f[R] \f[I]selector\f[R] Sets the maximum length of a displayed value. If no mode is entered, then the current truncation values for all feedback modes are displayed. @@ -941,29 +788,23 @@ mode are displayed. .PP To define truncation values, the following arguments are required: .TP -.B \f[I]mode\f[R] +\f[I]mode\f[R] Specifies the feedback mode to which the truncation value is applied. -Only custom modes created with the \f[CB]/set\ mode\f[R] command can be +Only custom modes created with the \f[V]/set mode\f[R] command can be modified. -.RS -.RE .TP -.B \f[I]length\f[R] +\f[I]length\f[R] Specifies the unsigned integer to use as the maximum length for the specified selector. -.RS -.RE .TP -.B \f[I]selector\f[R] +\f[I]selector\f[R] Specifies the context in which the truncation value is applied. The selectors are described in the online help, which is accessed from -JShell using the \f[CB]/help\ /set\ truncation\f[R] command. -.RS -.RE +JShell using the \f[V]/help /set truncation\f[R] command. .RE .RE .TP -.B \f[CB]/types\f[R] [\f[I]option\f[R]] +\f[V]/types\f[R] [\f[I]option\f[R]] Displays classes, interfaces, and enums that were entered. If no option is entered, then all current active classes, interfaces, and enums are displayed. @@ -971,31 +812,25 @@ and enums are displayed. .PP The following options are valid: .TP -.B {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Displays information for classes, interfaces, and enums identified by name, ID, or ID range. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -Use the \f[CB]/list\f[R] command to see the IDs of the code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of the code snippets. .TP -.B \f[CB]\-all\f[R] +\f[V]-all\f[R] Displays information for all classes, interfaces, and enums, including those added when JShell was started, and classes, interfaces, and enums that failed, were overwritten, or were dropped. -.RS -.RE .TP -.B \f[CB]\-start\f[R] +\f[V]-start\f[R] Displays information for startup classes, interfaces, and enums that were added when JShell was started. -.RS -.RE .RE .TP -.B \f[CB]/vars\f[R] [\f[I]option\f[R]] +\f[V]/vars\f[R] [\f[I]option\f[R]] Displays the name, type, and value of variables that were entered. If no option is entered, then all current active variables are displayed. @@ -1003,63 +838,49 @@ displayed. .PP The following options are valid: .TP -.B {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Displays information for variables identified by name, ID, or ID range. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. -Use the \f[CB]/list\f[R] command to see the IDs of the code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of the code snippets. .TP -.B \f[CB]\-all\f[R] +\f[V]-all\f[R] Displays information for all variables, including those added when JShell was started, and variables that failed, were overwritten, or were dropped. -.RS -.RE .TP -.B \f[CB]\-start\f[R] +\f[V]-start\f[R] Displays information for startup variables that were added when JShell was started. -.RS -.RE .RE .TP -.B \f[CB]/?\f[R] -Same as the \f[CB]/help\f[R] command. -.RS -.RE +\f[V]/?\f[R] +Same as the \f[V]/help\f[R] command. .TP -.B \f[CB]/!\f[R] +\f[V]/!\f[R] Reruns the last snippet. -.RS -.RE .TP -.B \f[CB]/\f[R]{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CB]\-\f[R]\f[I]endID\f[R]}...] +\f[V]/\f[R]{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[V]-\f[R]\f[I]endID\f[R]}...] Reruns the snippets identified by ID, range of IDs, or name. For a range of IDs, provide the starting ID and ending ID separated with a hyphen. To provide a list, separate the items in the list with a space. The first item in the list must be an ID or ID range. -Use the \f[CB]/list\f[R] command to see the IDs of the code snippets. -.RS -.RE +Use the \f[V]/list\f[R] command to see the IDs of the code snippets. .TP -.B \f[CB]/\-\f[R]\f[I]n\f[R] -Reruns the \-\f[I]n\f[R]th previous snippet. -For example, if 15 code snippets were entered, then \f[CB]/\-4\f[R] runs +\f[V]/-\f[R]\f[I]n\f[R] +Reruns the -\f[I]n\f[R]th previous snippet. +For example, if 15 code snippets were entered, then \f[V]/-4\f[R] runs the 11th snippet. Commands aren\[aq]t included in the count. -.RS -.RE .SH INPUT SHORTCUTS .PP The following shortcuts are available for entering commands and snippets in JShell. .SS Tab completion .TP -.B \f[B]<tab>\f[R] +\f[B]<tab>\f[R] When entering snippets, commands, subcommands, command arguments, or command options, use the Tab key to automatically complete the item. If the item can\[aq]t be determined from what was entered, then possible @@ -1076,40 +897,35 @@ Continue pressing the Tab key for a description of any additional signatures. .RE .TP -.B \f[B]Shift+<Tab> V\f[R] +\f[B]Shift+<Tab> V\f[R] After entering a complete expression, use this key sequence to convert the expression to a variable declaration of a type determined by the type of the expression. -.RS -.RE .TP -.B \f[B]Shift+<Tab> M\f[R] +\f[B]Shift+<Tab> M\f[R] After entering a complete expression or statement, use this key sequence to convert the expression or statement to a method declaration. If an expression is entered, the return type is based on the type of the expression. -.RS -.RE .TP -.B \f[B]Shift+<Tab> I\f[R] +\f[B]Shift+<Tab> I\f[R] When an identifier is entered that can\[aq]t be resolved, use this key sequence to show possible imports that resolve the identifier based on the content of the specified class path. -.RS -.RE .SS Command abbreviations .PP An abbreviation of a command is accepted if the abbreviation uniquely identifies a command. -For example, \f[CB]/l\f[R] is recognized as the \f[CB]/list\f[R] command. -However, \f[CB]/s\f[R] isn\[aq]t a valid abbreviation because it can\[aq]t -be determined if the \f[CB]/set\f[R] or \f[CB]/save\f[R] command is meant. -Use \f[CB]/se\f[R] for the \f[CB]/set\f[R] command or \f[CB]/sa\f[R] for the -\f[CB]/save\f[R] command. +For example, \f[V]/l\f[R] is recognized as the \f[V]/list\f[R] command. +However, \f[V]/s\f[R] isn\[aq]t a valid abbreviation because it +can\[aq]t be determined if the \f[V]/set\f[R] or \f[V]/save\f[R] command +is meant. +Use \f[V]/se\f[R] for the \f[V]/set\f[R] command or \f[V]/sa\f[R] for +the \f[V]/save\f[R] command. .PP Abbreviations are also accepted for subcommands, command arguments, and command options. -For example, use \f[CB]/m\ \-a\f[R] to display all methods. +For example, use \f[V]/m -a\f[R] to display all methods. .SS History navigation .PP A history of what was entered is maintained across sessions. @@ -1219,51 +1035,51 @@ T} .SH EXAMPLE OF STARTING AND STOPPING A JSHELL SESSION .PP JShell is provided with the JDK. -To start a session, enter \f[CB]jshell\f[R] on the command line. +To start a session, enter \f[V]jshell\f[R] on the command line. A welcome message is printed, and a prompt for entering commands and snippets is provided. .IP .nf \f[CB] -%\ jshell -|\ \ Welcome\ to\ JShell\ \-\-\ Version\ 9 -|\ \ For\ an\ introduction\ type:\ /help\ intro +% jshell +| Welcome to JShell -- Version 9 +| For an introduction type: /help intro jshell> \f[R] .fi .PP To see which snippets were automatically loaded when JShell started, use -the \f[CB]/list\ \-start\f[R] command. +the \f[V]/list -start\f[R] command. The default startup snippets are import statements for common packages. The ID for each snippet begins with the letter \f[I]s\f[R], which indicates it\[aq]s a startup snippet. .IP .nf \f[CB] -jshell>\ /list\ \-start +jshell> /list -start -\ \ s1\ :\ import\ java.io.*; -\ \ s2\ :\ import\ java.math.*; -\ \ s3\ :\ import\ java.net.*; -\ \ s4\ :\ import\ java.nio.file.*; -\ \ s5\ :\ import\ java.util.*; -\ \ s6\ :\ import\ java.util.concurrent.*; -\ \ s7\ :\ import\ java.util.function.*; -\ \ s8\ :\ import\ java.util.prefs.*; -\ \ s9\ :\ import\ java.util.regex.*; -\ s10\ :\ import\ java.util.stream.*; + s1 : import java.io.*; + s2 : import java.math.*; + s3 : import java.net.*; + s4 : import java.nio.file.*; + s5 : import java.util.*; + s6 : import java.util.concurrent.*; + s7 : import java.util.function.*; + s8 : import java.util.prefs.*; + s9 : import java.util.regex.*; + s10 : import java.util.stream.*; jshell> \f[R] .fi .PP -To end the session, use the \f[CB]/exit\f[R] command. +To end the session, use the \f[V]/exit\f[R] command. .IP .nf \f[CB] -jshell>\ /exit -|\ \ Goodbye +jshell> /exit +| Goodbye % \f[R] @@ -1282,19 +1098,19 @@ because no variable was provided. .IP .nf \f[CB] -jshell>\ int\ a=4 -a\ ==>\ 4 +jshell> int a=4 +a ==> 4 -jshell>\ int\ b=8 -b\ ==>\ 8 +jshell> int b=8 +b ==> 8 -jshell>\ int\ square(int\ i1)\ { -\ \ \ ...>\ return\ i1\ *\ i1; -\ \ \ ...>\ } -|\ \ created\ method\ square(int) +jshell> int square(int i1) { + ...> return i1 * i1; + ...> } +| created method square(int) -jshell>\ square(b) -$5\ ==>\ 64 +jshell> square(b) +$5 ==> 64 \f[R] .fi .SH EXAMPLE OF CHANGING SNIPPETS @@ -1306,64 +1122,64 @@ The following examples shows a method being defined and the method run: .IP .nf \f[CB] -jshell>\ String\ grade(int\ testScore)\ { -\ \ \ ...>\ \ \ \ \ if\ (testScore\ >=\ 90)\ { -\ \ \ ...>\ \ \ \ \ \ \ \ \ return\ "Pass"; -\ \ \ ...>\ \ \ \ \ } -\ \ \ ...>\ \ \ \ \ return\ "Fail"; -\ \ \ ...>\ } -|\ \ created\ method\ grade(int) +jshell> String grade(int testScore) { + ...> if (testScore >= 90) { + ...> return \[dq]Pass\[dq]; + ...> } + ...> return \[dq]Fail\[dq]; + ...> } +| created method grade(int) -jshell>\ grade(88) -$3\ ==>\ "Fail" +jshell> grade(88) +$3 ==> \[dq]Fail\[dq] \f[R] .fi .PP -To change the method \f[CB]grade\f[R] to allow more students to pass, +To change the method \f[V]grade\f[R] to allow more students to pass, enter the method definition again and change the pass score to -\f[CB]80\f[R]. +\f[V]80\f[R]. Use the up arrow key to retrieve the previous entries to avoid having to -reenter them and make the change in the \f[CB]if\f[R] statement. +reenter them and make the change in the \f[V]if\f[R] statement. The following example shows the new definition and reruns the method to show the new result: .IP .nf \f[CB] -jshell>\ String\ grade(int\ testScore)\ { -\ \ \ ...>\ \ \ \ \ if\ (testScore\ >=\ 80)\ { -\ \ \ ...>\ \ \ \ \ \ \ \ \ return\ "Pass"; -\ \ \ ...>\ \ \ \ \ } -\ \ \ ...>\ \ \ \ \ return\ "Fail"; -\ \ \ ...>\ } -|\ \ modified\ method\ grade(int) +jshell> String grade(int testScore) { + ...> if (testScore >= 80) { + ...> return \[dq]Pass\[dq]; + ...> } + ...> return \[dq]Fail\[dq]; + ...> } +| modified method grade(int) -jshell>\ grade(88) -$5\ ==>\ "Pass" +jshell> grade(88) +$5 ==> \[dq]Pass\[dq] \f[R] .fi .PP For snippets that are more than a few lines long, or to make more than a -few changes, use the \f[CB]/edit\f[R] command to open the snippet in an +few changes, use the \f[V]/edit\f[R] command to open the snippet in an editor. After the changes are complete, close the edit window to return control to the JShell session. The following example shows the command and the feedback provided when the edit window is closed. -The \f[CB]/list\f[R] command is used to show that the pass score was -changed to \f[CB]85\f[R]. +The \f[V]/list\f[R] command is used to show that the pass score was +changed to \f[V]85\f[R]. .IP .nf \f[CB] -jshell>\ /edit\ grade -|\ \ modified\ method\ grade(int) -jshell>\ /list\ grade +jshell> /edit grade +| modified method grade(int) +jshell> /list grade -\ \ \ 6\ :\ String\ grade(int\ testScore)\ { -\ \ \ \ \ \ \ \ \ \ \ if\ (testScore\ >=\ 85)\ { -\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ "Pass"; -\ \ \ \ \ \ \ \ \ \ \ } -\ \ \ \ \ \ \ \ \ \ \ return\ "Fail"; -\ \ \ \ \ \ \ } + 6 : String grade(int testScore) { + if (testScore >= 85) { + return \[dq]Pass\[dq]; + } + return \[dq]Fail\[dq]; + } \f[R] .fi .SH EXAMPLE OF CREATING A CUSTOM FEEDBACK MODE @@ -1374,19 +1190,19 @@ maximum length of a displayed value. Predefined feedback modes are provided. Commands for creating custom feedback modes are also provided. .PP -Use the \f[CB]/set\ mode\f[R] command to create a new feedback mode. -In the following example, the new mode \f[CB]mymode\f[R], is based on the -predefined feedback mode, \f[CB]normal\f[R], and verifying command +Use the \f[V]/set mode\f[R] command to create a new feedback mode. +In the following example, the new mode \f[V]mymode\f[R], is based on the +predefined feedback mode, \f[V]normal\f[R], and verifying command feedback is displayed: .IP .nf \f[CB] -jshell>\ /set\ mode\ mymode\ normal\ \-command -|\ \ Created\ new\ feedback\ mode:\ mymode +jshell> /set mode mymode normal -command +| Created new feedback mode: mymode \f[R] .fi .PP -Because the new mode is based on the \f[CB]normal\f[R] mode, the prompts +Because the new mode is based on the \f[V]normal\f[R] mode, the prompts are the same. The following example shows how to see what prompts are used and then changes the prompts to custom strings. @@ -1396,10 +1212,10 @@ multiline snippets. .IP .nf \f[CB] -jshell>\ /set\ prompt\ mymode -|\ \ /set\ prompt\ mymode\ "\\njshell>\ "\ "\ \ \ ...>\ " +jshell> /set prompt mymode +| /set prompt mymode \[dq]\[rs]njshell> \[dq] \[dq] ...> \[dq] -jshell>\ /set\ prompt\ mymode\ "\\nprompt$\ "\ "\ \ \ continue$\ " +jshell> /set prompt mymode \[dq]\[rs]nprompt$ \[dq] \[dq] continue$ \[dq] \f[R] .fi .PP @@ -1411,39 +1227,39 @@ truncation value of 500 for variable value expressions: .IP .nf \f[CB] -jshell>\ /set\ truncation\ mymode\ 72 +jshell> /set truncation mymode 72 -jshell>\ /set\ truncation\ mymode\ 500\ varvalue +jshell> /set truncation mymode 500 varvalue \f[R] .fi .PP The feedback displayed after snippets are entered is controlled by the format setting and is based on the type of snippet entered and the action taken for that snippet. -In the predefined mode \f[CB]normal\f[R], the string \f[CB]created\f[R] is +In the predefined mode \f[V]normal\f[R], the string \f[V]created\f[R] is displayed when a method is created. The following example shows how to change that string to -\f[CB]defined\f[R]: +\f[V]defined\f[R]: .IP .nf \f[CB] -jshell>\ /set\ format\ mymode\ action\ "defined"\ added\-primary +jshell> /set format mymode action \[dq]defined\[dq] added-primary \f[R] .fi .PP -Use the \f[CB]/set\ feedback\f[R] command to start using the feedback mode +Use the \f[V]/set feedback\f[R] command to start using the feedback mode that was just created. The following example shows the custom mode in use: .IP .nf \f[CB] -jshell>\ /set\ feedback\ mymode -|\ \ Feedback\ mode:\ mymode +jshell> /set feedback mymode +| Feedback mode: mymode -prompt$\ int\ square\ (int\ num1){ -\ \ \ continue$\ return\ num1*num1; -\ \ \ continue$\ } -|\ \ defined\ method\ square(int) +prompt$ int square (int num1){ + continue$ return num1*num1; + continue$ } +| defined method square(int) prompt$ \f[R] diff --git a/src/jdk.jstatd/share/man/jstatd.1 b/src/jdk.jstatd/share/man/jstatd.1 index 9bf20b25ce0a4..fa3021db742e9 100644 --- a/src/jdk.jstatd/share/man/jstatd.1 +++ b/src/jdk.jstatd/share/man/jstatd.1 @@ -19,138 +19,141 @@ .\" or visit www.oracle.com if you need additional information or have any .\" questions. .\" -.\" Automatically generated by Pandoc 2.3.1 +.\" Automatically generated by Pandoc 2.19.2 .\" -.TH "JSTATD" "1" "2023" "JDK 20\-ea" "JDK Commands" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[R]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "JSTATD" "1" "2023" "JDK 20-ea" "JDK Commands" .hy .SH NAME .PP -jstatd \- monitor the creation and termination of instrumented Java +jstatd - monitor the creation and termination of instrumented Java HotSpot VMs .SH SYNOPSIS .PP \f[B]Note:\f[R] This command is experimental and unsupported. .PP -\f[CB]jstatd\f[R] [\f[I]options\f[R]] +\f[V]jstatd\f[R] [\f[I]options\f[R]] .TP -.B \f[I]options\f[R] -This represents the \f[CB]jstatd\f[R] command\-line options. +\f[I]options\f[R] +This represents the \f[V]jstatd\f[R] command-line options. See \f[B]Options for the jstatd Command\f[R]. -.RS -.RE .SH DESCRIPTION .PP -The \f[CB]jstatd\f[R] command is an RMI server application that monitors +The \f[V]jstatd\f[R] command is an RMI server application that monitors for the creation and termination of instrumented Java HotSpot VMs and -provides an interface to enable remote monitoring tools, \f[CB]jstat\f[R] -and \f[CB]jps\f[R], to attach to JVMs that are running on the local host +provides an interface to enable remote monitoring tools, \f[V]jstat\f[R] +and \f[V]jps\f[R], to attach to JVMs that are running on the local host and collect information about the JVM process. .PP -The \f[CB]jstatd\f[R] server requires an RMI registry on the local host. -The \f[CB]jstatd\f[R] server attempts to attach to the RMI registry on the -default port, or on the port you specify with the \f[CB]\-p\f[R] -\f[CB]port\f[R] option. +The \f[V]jstatd\f[R] server requires an RMI registry on the local host. +The \f[V]jstatd\f[R] server attempts to attach to the RMI registry on +the default port, or on the port you specify with the \f[V]-p\f[R] +\f[V]port\f[R] option. If an RMI registry is not found, then one is created within the -\f[CB]jstatd\f[R] application that\[aq]s bound to the port that\[aq]s -indicated by the \f[CB]\-p\f[R] \f[CB]port\f[R] option or to the default RMI -registry port when the \f[CB]\-p\f[R] \f[CB]port\f[R] option is omitted. +\f[V]jstatd\f[R] application that\[aq]s bound to the port that\[aq]s +indicated by the \f[V]-p\f[R] \f[V]port\f[R] option or to the default +RMI registry port when the \f[V]-p\f[R] \f[V]port\f[R] option is +omitted. You can stop the creation of an internal RMI registry by specifying the -\f[CB]\-nr\f[R] option. +\f[V]-nr\f[R] option. .SH OPTIONS FOR THE JSTATD COMMAND .TP -.B \f[CB]\-nr\f[R] +\f[V]-nr\f[R] This option does not attempt to create an internal RMI registry within -the \f[CB]jstatd\f[R] process when an existing RMI registry isn\[aq]t +the \f[V]jstatd\f[R] process when an existing RMI registry isn\[aq]t found. -.RS -.RE .TP -.B \f[CB]\-p\f[R] \f[I]port\f[R] +\f[V]-p\f[R] \f[I]port\f[R] This option sets the port number where the RMI registry is expected to -be found, or when not found, created if the \f[CB]\-nr\f[R] option +be found, or when not found, created if the \f[V]-nr\f[R] option isn\[aq]t specified. -.RS -.RE .TP -.B \f[CB]\-r\f[R] \f[I]rmiport\f[R] +\f[V]-r\f[R] \f[I]rmiport\f[R] This option sets the port number to which the RMI connector is bound. If not specified a random available port is used. -.RS -.RE .TP -.B \f[CB]\-n\f[R] \f[I]rminame\f[R] +\f[V]-n\f[R] \f[I]rminame\f[R] This option sets the name to which the remote RMI object is bound in the RMI registry. -The default name is \f[CB]JStatRemoteHost\f[R]. -If multiple \f[CB]jstatd\f[R] servers are started on the same host, then +The default name is \f[V]JStatRemoteHost\f[R]. +If multiple \f[V]jstatd\f[R] servers are started on the same host, then the name of the exported RMI object for each server can be made unique by specifying this option. However, doing so requires that the unique server name be included in -the monitoring client\[aq]s \f[CB]hostid\f[R] and \f[CB]vmid\f[R] strings. -.RS -.RE +the monitoring client\[aq]s \f[V]hostid\f[R] and \f[V]vmid\f[R] strings. .TP -.B \f[CB]\-J\f[R]\f[I]option\f[R] -This option passes a Java \f[CB]option\f[R] to the JVM, where the option +\f[V]-J\f[R]\f[I]option\f[R] +This option passes a Java \f[V]option\f[R] to the JVM, where the option is one of those described on the reference page for the Java application launcher. -For example, \f[CB]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB. See \f[B]java\f[R]. -.RS -.RE .SH SECURITY .PP -The \f[CB]jstatd\f[R] server can monitor only JVMs for which it has the +The \f[V]jstatd\f[R] server can monitor only JVMs for which it has the appropriate native access permissions. -Therefore, the \f[CB]jstatd\f[R] process must be running with the same +Therefore, the \f[V]jstatd\f[R] process must be running with the same user credentials as the target JVMs. Some user credentials, such as the root user in Linux and OS X operating systems, have permission to access the instrumentation exported by any JVM on the system. -A \f[CB]jstatd\f[R] process running with such credentials can monitor any +A \f[V]jstatd\f[R] process running with such credentials can monitor any JVM on the system, but introduces additional security concerns. .PP -The \f[CB]jstatd\f[R] server doesn\[aq]t provide any authentication of +The \f[V]jstatd\f[R] server doesn\[aq]t provide any authentication of remote clients. -Therefore, running a \f[CB]jstatd\f[R] server process exposes the -instrumentation export by all JVMs for which the \f[CB]jstatd\f[R] process -has access permissions to any user on the network. +Therefore, running a \f[V]jstatd\f[R] server process exposes the +instrumentation export by all JVMs for which the \f[V]jstatd\f[R] +process has access permissions to any user on the network. This exposure might be undesirable in your environment, and therefore, local security policies should be considered before you start the -\f[CB]jstatd\f[R] process, particularly in production environments or on +\f[V]jstatd\f[R] process, particularly in production environments or on networks that aren\[aq]t secure. .PP -For security purposes, the \f[CB]jstatd\f[R] server uses an RMI +For security purposes, the \f[V]jstatd\f[R] server uses an RMI ObjectInputFilter to allow only essential classes to be deserialized. .PP If your security concerns can\[aq]t be addressed, then the safest action -is to not run the \f[CB]jstatd\f[R] server and use the \f[CB]jstat\f[R] and -\f[CB]jps\f[R] tools locally. -However, when using \f[CB]jps\f[R] to get a list of instrumented JVMs, the -list will not include any JVMs running in docker containers. +is to not run the \f[V]jstatd\f[R] server and use the \f[V]jstat\f[R] +and \f[V]jps\f[R] tools locally. +However, when using \f[V]jps\f[R] to get a list of instrumented JVMs, +the list will not include any JVMs running in docker containers. .SH REMOTE INTERFACE .PP -The interface exported by the \f[CB]jstatd\f[R] process is proprietary and -guaranteed to change. +The interface exported by the \f[V]jstatd\f[R] process is proprietary +and guaranteed to change. Users and developers are discouraged from writing to this interface. .SH EXAMPLES .PP -The following are examples of the \f[CB]jstatd\f[R] command. -The \f[CB]jstatd\f[R] scripts automatically start the server in the +The following are examples of the \f[V]jstatd\f[R] command. +The \f[V]jstatd\f[R] scripts automatically start the server in the background. .SH INTERNAL RMI REGISTRY .PP -This example shows how to start a \f[CB]jstatd\f[R] session with an +This example shows how to start a \f[V]jstatd\f[R] session with an internal RMI registry. This example assumes that no other server is bound to the default RMI -registry port (port \f[CB]1099\f[R]). +registry port (port \f[V]1099\f[R]). .RS .PP -\f[CB]jstatd\f[R] +\f[V]jstatd\f[R] .RE .SH EXTERNAL RMI REGISTRY .PP -This example starts a \f[CB]jstatd\f[R] session with an external RMI +This example starts a \f[V]jstatd\f[R] session with an external RMI registry. .IP .nf @@ -160,55 +163,55 @@ jstatd \f[R] .fi .PP -This example starts a \f[CB]jstatd\f[R] session with an external RMI -registry server on port \f[CB]2020\f[R]. +This example starts a \f[V]jstatd\f[R] session with an external RMI +registry server on port \f[V]2020\f[R]. .IP .nf \f[CB] -jrmiregistry\ 2020& -jstatd\ \-p\ 2020 +jrmiregistry 2020& +jstatd -p 2020 \f[R] .fi .PP -This example starts a \f[CB]jstatd\f[R] session with an external RMI -registry server on port \f[CB]2020\f[R] and JMX connector bound to port -\f[CB]2021\f[R]. +This example starts a \f[V]jstatd\f[R] session with an external RMI +registry server on port \f[V]2020\f[R] and JMX connector bound to port +\f[V]2021\f[R]. .IP .nf \f[CB] -jrmiregistry\ 2020& -jstatd\ \-p\ 2020\ \-r\ 2021 +jrmiregistry 2020& +jstatd -p 2020 -r 2021 \f[R] .fi .PP -This example starts a \f[CB]jstatd\f[R] session with an external RMI +This example starts a \f[V]jstatd\f[R] session with an external RMI registry on port 2020 that\[aq]s bound to -\f[CB]AlternateJstatdServerName\f[R]. +\f[V]AlternateJstatdServerName\f[R]. .IP .nf \f[CB] -rmiregistry\ 2020& -jstatd\ \-p\ 2020\ \-n\ AlternateJstatdServerName +rmiregistry 2020& +jstatd -p 2020 -n AlternateJstatdServerName \f[R] .fi -.SH STOP THE CREATION OF AN IN\-PROCESS RMI REGISTRY +.SH STOP THE CREATION OF AN IN-PROCESS RMI REGISTRY .PP -This example starts a \f[CB]jstatd\f[R] session that doesn\[aq]t create an -RMI registry when one isn\[aq]t found. +This example starts a \f[V]jstatd\f[R] session that doesn\[aq]t create +an RMI registry when one isn\[aq]t found. This example assumes an RMI registry is already running. If an RMI registry isn\[aq]t running, then an error message is displayed. .RS .PP -\f[CB]jstatd\ \-nr\f[R] +\f[V]jstatd -nr\f[R] .RE .SH ENABLE RMI LOGGING .PP -This example starts a \f[CB]jstatd\f[R] session with RMI logging +This example starts a \f[V]jstatd\f[R] session with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities. .RS .PP -\f[CB]jstatd\ \-J\-Djava.rmi.server.logCalls=true\f[R] +\f[V]jstatd -J-Djava.rmi.server.logCalls=true\f[R] .RE diff --git a/test/langtools/jdk/javadoc/tool/CheckManPageOptions.java b/test/langtools/jdk/javadoc/tool/CheckManPageOptions.java index 2d32d8aba8031..2e2d0d0f84d6d 100644 --- a/test/langtools/jdk/javadoc/tool/CheckManPageOptions.java +++ b/test/langtools/jdk/javadoc/tool/CheckManPageOptions.java @@ -71,6 +71,11 @@ public static void main(String... args) throws Exception { void run(String... args) throws Exception { var file = args.length == 0 ? findDefaultFile() : Path.of(args[0]); out.println("File: " + file); + out.println(Files.readAllLines(file).stream() + .filter(l -> l.contains("Automatically generated by Pandoc")) + .findFirst() + .map(l -> l.substring(l.indexOf("Auto"))) + .orElse("version string not found")); out.println(); var manPageOptions = getManPageOptions(file); @@ -222,31 +227,34 @@ List<String> parseNRoff(String page) { // In the troff man page, options are defined in one of two forms: // 1. options delegated to javac appear in pairs of lines of the form // .IP \[bu] 2 - // \f[CB]\-.... - // 2. options implemented by the tool or doclet appear in lines of the form - // .B \f[CB]\-... + // \f[V]-.... + // 2. options implemented by the tool or doclet appear in pairs of lines of the form + // .TP + // \f[V]-... - Pattern p1 = Pattern.compile("\\R" + Pattern.quote(".IP \\[bu] 2") + "\\R" + Pattern.quote("\\f[CB]\\-") + ".*"); - Pattern p2 = Pattern.compile("\\R" + Pattern.quote(".B \\f[CB]\\-") + ".*"); + Pattern p1 = Pattern.compile("\\R" + Pattern.quote(".IP \\[bu] 2") + "\\R" + Pattern.quote("\\f[V]-") + ".*"); + Pattern p2 = Pattern.compile("\\R" + Pattern.quote(".TP") + "\\R" + Pattern.quote("\\f[V]-") + ".*"); Pattern outer = Pattern.compile("(" + p1.pattern() + "|" + p2.pattern() + ")"); Matcher outerMatcher = outer.matcher(page); // In the defining areas, option names are represented as follows: - // \f[CB]OPTION\f[R] or \f[CB]OPTION: + // \f[V]OPTION\f[R] or \f[V]OPTION: // where OPTION is the shortest string not containing whitespace or colon, // and in which all '-' characters are escaped with a single backslash. - Pattern inner = Pattern.compile("\\s\\\\f\\[CB](\\\\-[^ :]+?)(:|\\\\f\\[R])"); + Pattern inner = Pattern.compile("\\s\\\\f\\[V](-[^ :]+?)(:|\\\\f\\[R])"); while (outerMatcher.find()) { String lines = outerMatcher.group(); - out.println("found:" + lines + "\n"); + out.println("found:" + lines); Matcher innerMatcher = inner.matcher(lines); while (innerMatcher.find()) { - String option = innerMatcher.group(1).replace("\\-", "-"); + String option = innerMatcher.group(1); + out.println(" found option:" + option); list.add(option); } + out.println(); } return list;