diff --git a/src/linux/doc/man/appletviewer.1 b/src/linux/doc/man/appletviewer.1 index 6f31c4565e2736dba7a6915413d3acf1171cd01a..887abbd66e37a7e26b7a9f262672162778af1d99 100644 --- a/src/linux/doc/man/appletviewer.1 +++ b/src/linux/doc/man/appletviewer.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1995, 2011, 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,43 +19,33 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH appletviewer 1 "02 Jun 2010" +.TH appletviewer 1 "10 May 2011" .LP .SH "Name" appletviewer \- The Java Applet Viewer. -.LP -.RS 3 - .LP .LP The \f3appletviewer\fP command allows you to run applets outside of a web browser. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .LP \f4appletviewer\fP \f2[\fP \f2options\fP \f2] \fP\f2urls\fP ... .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3appletviewer\fP command connects to the documents or resources designated by \f2urls\fP and displays each applet referenced by the documents in its own window. Note: if the documents referred to by \f2urls\fP do not reference any applets with the \f2OBJECT\fP, \f2EMBED\fP, or \f2APPLET\fP tag, then \f3appletviewer\fP does nothing. For details on the HTML tags that \f3appletviewer\fP supports, see .na \f2AppletViewer Tags\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/appletviewertags.html. +http://download.oracle.com/javase/7/docs/technotes/tools/appletviewertags.html. .LP .LP \f3Note:\fP The \f3appletviewer\fP requires encoded URLs according to the escaping mechanism defined in RFC2396. Only encoded URLs are supported. However, file names must be unencoded, as specified in RFC2396. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 diff --git a/src/linux/doc/man/apt.1 b/src/linux/doc/man/apt.1 index 5a7c8b3c9f0edc383b515fe35f1e7883c2377064..2d77108a5d4f9799b8efd3a45b1283b1e8ae0c08 100644 --- a/src/linux/doc/man/apt.1 +++ b/src/linux/doc/man/apt.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH apt 1 "02 Jun 2010" +.TH apt 1 "10 May 2011" .LP .SH "NAME" @@ -50,21 +50,17 @@ One or more files that list source files or other options .SH "DESCRIPTION" .LP .LP -The tool \f2apt\fP, annotation processing tool, includes a set of new reflective APIs and supporting infrastructure to process program annotations. The \f2apt\fP reflective APIs provide a build\-time, source\-based, read\-only view of program structure. These reflective APIs are designed to cleanly model the Java(TM) programming language's type system after the addition of generics. First, \f2apt\fP runs annotation processors that can produce new source code and other files. Next, \f2apt\fP can cause compilation of both original and generated source files, easing development. The reflective APIs and other APIs used to interact with the tool are subpackages of \f2com.sun.mirror\fP. +\f3Note\fP: The \f2apt\fP tool and its associated API contained in the package \f2com.sun.mirror\fP have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the \f2javac(1)\fP tool and the APIs contained in the packages \f2javax.annotation.processing\fP and \f2javax.lang.model\fP to process annotations. +.LP +.LP +The tool \f2apt\fP, annotation processing tool, includes reflective APIs and supporting infrastructure to process program annotations. The \f2apt\fP reflective APIs provide a build\-time, source\-based, read\-only view of program structure. These reflective APIs are designed to cleanly model the Java(TM) programming language's type system after the addition of generics. First, \f2apt\fP runs annotation processors that can produce new source code and other files. Next, \f2apt\fP can cause compilation of both original and generated source files, easing development. The reflective APIs and other APIs used to interact with the tool are subpackages of \f2com.sun.mirror\fP. .LP .LP A fuller discussion of how the tool operates as well as instructions for developing with \f2apt\fP are in .na \f4Getting Started with \fP\f4apt\fP. @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/apt/GettingStarted.html -.LP -.RS 3 -.TP 3 -Note: -\f2The functionality of \fP\f2apt\fP has been subsumed by the annotation\-processing infrastructure that is now part of the \f2javac(1)\fP tool and standardized for use by all Java compilers. This new infrastructure relies on the language model and annotation\-processing APIs that are now part of the Java Platform. It is recommended that new annotation processor development be based on the new APIs and the \f2javac\fP tool. -.RE - +http://download.oracle.com/javase/7/docs/technotes/guides/apt/GettingStarted.html .LP .SH "OPTIONS" .LP @@ -90,6 +86,12 @@ Specify where to find annotation processor factories; if this option is used, th .TP 3 \-factory classname Name of annotation processor factory to use; bypasses default discovery process +.TP 3 +\-version +Print version information. +.TP 3 +\-X +Display information about non\-standard options. .RE .LP @@ -109,10 +111,35 @@ Specify where to find user class files and annotation processor factories. If \f .LP Consult the javac(1) man page for information on \f2javac\fP options. .LP +.SS +Non\-Standard Options +.LP +.RS 3 +.TP 3 +\-XListAnnotationTypes +List found annotation types. +.TP 3 +\-XListDeclarations +List specified and included declarations. +.TP 3 +\-XPrintAptRounds +Print information about initial and recursive \f2apt\fP rounds. +.TP 3 +\-XPrintFactoryInfo +Print information about which annotations a factory is asked to process. +.TP 3 +\-XclassesAsDecls +Treat both class and source files as declarations to process. +.RE + +.LP +.LP +\f3Note\fP: Because these options are non\-standard, they are subject to change without notice. +.LP .SH "NOTES" .LP .LP -The functionality of \f2apt\fP has been subsumed by the standard annotation\-processing infrastructure now offered by \f2javac\fP. Support for \f2apt\fP and its associated APIs may be discontinued in some future JDK release. +The \f2apt\fP tool and its associated API contained in the package \f2com.sun.mirror\fP have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the \f2javac(1)\fP tool and the APIs contained in the packages \f2javax.annotation.processing\fP and \f2javax.lang.model\fP to process annotations. .LP .SH "SEE ALSO" .LP diff --git a/src/linux/doc/man/extcheck.1 b/src/linux/doc/man/extcheck.1 index 3b1a03ee3fe059336cfbd77ac448b8c94b884f57..9dfe6472adf0949ab564865dd7a4dddd172164a0 100644 --- a/src/linux/doc/man/extcheck.1 +++ b/src/linux/doc/man/extcheck.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH extcheck 1 "02 Jun 2010" +.TH extcheck 1 "10 May 2011" .LP .SH "Name" extcheck \- A utility to detect jar conflicts -.LP -.RS 3 - .LP .LP \f3extcheck\fP detects version conflicts between a target jar file and currently installed extension jar files. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,8 +40,6 @@ extcheck [ \-verbose ] targetfile.jar .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3extcheck\fP utility checks a specified Jar file for title and version conflicts with any extensions installed in the Java(TM) SDK. Before installing an extension, you can use this utility to see if the same or a more recent version of the extension is already installed. @@ -62,8 +54,6 @@ If no conflict is detected, the return code is \f20\fP. If the manifest of any jar file in the extensions directory has the same \f2Specification\-title\fP and the same or a newer \f2Specification\-version\fP number, a non\-zero error code is returned. A non\-zero error code is also returned if \f2targetfile.jar\fP does not have the \f2Specification\-title\fP or \f2Specification\-version\fP attributes in its manifest. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -76,8 +66,6 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "SEE ALSO" -.LP - .LP .LP jar(1) diff --git a/src/linux/doc/man/idlj.1 b/src/linux/doc/man/idlj.1 index 4b6ab0ccb0919bc6f97a6e8d5b5660e8a3def88f..2ed5652bc63abea77775104efdf54c892518be3b 100644 --- a/src/linux/doc/man/idlj.1 +++ b/src/linux/doc/man/idlj.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,20 +19,14 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH idlj 1 "02 Jun 2010" +.TH idlj 1 "10 May 2011" .LP .SH "Name" idlj \- The IDL\-to\-Java Compiler .LP -.RS 3 - -.LP -\f3idlj\fP generates Java bindings from a given IDL file. -.RE +\f3idlj\fP generates Java bindings from a given IDL file. .SH "Synopsis" -.LP - .LP .nf \f3 @@ -48,28 +42,62 @@ where \f2idl\-file\fP is the name of a file containing Interface Definition Lang .LP .SH "Description" .LP - .LP The IDL\-to\-Java Compiler generates the Java bindings for a given IDL file.\ For binding details, see the .na \f2OMG IDL to Java Language Language Mapping Specification\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/mapping/jidlMapping.html. Some previous releases of the IDL\-to\-Java compiler were named \f2idltojava\fP. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/mapping/jidlMapping.html. Some previous releases of the IDL\-to\-Java compiler were named \f2idltojava\fP. +.LP .SS Emitting Client and Server Bindings .LP -.RS 3 +.LP +To generate Java bindings for an IDL file named My.idl: +.LP +.nf +\f3 +.fl +idlj My.idl +.fl +\fP +.fi .LP -To generate Java bindings for an IDL file named My.idl: \f2idlj My.idl\fP .LP -This generates the client\-side bindings and is equivalent to: \f2idlj \fP\f4\-fclient\fP\f2 My.idl\fP +This generates the client\-side bindings and is equivalent to: .LP -The client\-side bindings do not include the server\-side skeleton. If you want to generate the server\-side bindings for the interfaces: \f2idlj \fP\f4\-fserver\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-fclient\fP My.idl +.fl +.fi + .LP -Server\-side bindings include the client\-side bindings plus the skeleton, all of which are \f2POA\fP (that is, Inheritance Model) classes. If you want to generate both client and server\-side bindings, use one of the following (equivalent) commands: \f2idlj \fP\f4\-fclient \-fserver\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-fall\fP\f2 My.idl\fP +.LP +The client\-side bindings do not include the server\-side skeleton. If you want to generate the server\-side bindings for the interfaces: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-fserver\fP My.idl +.fl +.fi + +.LP +.LP +Server\-side bindings include the client\-side bindings plus the skeleton, all of which are \f2POA\fP (that is, Inheritance Model) classes. If you want to generate both client and server\-side bindings, use one of the following (equivalent) commands: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-fclient \-fserver\fP My.idl +.fl +idlj \f3\-fall\fP My.idl +.fl +.fi + .LP .LP There are two possible server\-side models: the Inheritance Model and the Tie Delegation Model. @@ -82,31 +110,47 @@ The default server\-side model is the \f2Portable Servant Inheritance Model\fP. .na \f2org.omg.PortableServer.Servant\fP @ .fi -http://java.sun.com/javase/6/docs/api/org/omg/PortableServer/Servant.html and implements the \f2InvokeHandler\fP interface and the operations interface associated with the IDL interface the skeleton implements. +http://download.oracle.com/javase/7/docs/api/org/omg/PortableServer/Servant.html and implements the \f2InvokeHandler\fP interface and the operations interface associated with the IDL interface the skeleton implements. .LP .LP The \f2PortableServer\fP module for the .na \f2Portable Object Adapter (POA)\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/POA.html defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. .LP .LP Another option for the Inheritance Model is to use the \f2\-oldImplBase\fP flag in order to generate server\-side bindings that are compatible with versions of the Java programming language prior to J2SE 1.4. Note that using the \f2\-oldImplBase\fP flag is non\-standard: these APIs are being deprecated. You would use this flag ONLY for compatibility with existing servers written in J2SE 1.3. In that case, you would need to modify an existing MAKEFILE to add the \f2\-oldImplBase\fP flag to the \f2idlj\fP compiler, otherwise POA\-based server\-side mappings will be generated. To generate server\-side bindings that are backwards compatible: .LP -\f2idlj \fP\f4\-fclient \-fserver\fP\f2 \fP\f4\-oldImplBase\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-fall\fP\f2 \fP\f4\-oldImplBase\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-fclient \-fserver\fP \f3\-oldImplBase\fP My.idl +.fl +idlj \f3\-fall\fP \f3\-oldImplBase\fP My.idl +.fl +.fi + +.LP +.LP +Given an interface \f2My\fP defined in \f2My.idl\fP, the file \f2_MyImplBase.java\fP is generated. You must provide the implementation for \f2My\fP and it must inherit from \f2_MyImplBase\fP. .LP -Given an interface \f2My\fP defined in \f2My.idl\fP, the file \f2_MyImplBase.java\fP is generated. You must provide the implementation for \f2My\fP and it must inherit from \f2_MyImplBase\fP. .LP The other server\-side model is called the Tie Model. This is a delegation model. Because it is not possible to generate ties and skeletons at the same time, they must be generated separately. The following commands generate the bindings for the Tie Model: .LP -\f2idlj \fP\f4\-fall\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-fallTIE\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-fall\fP My.idl +.fl +idlj \f3\-fallTIE\fP My.idl +.fl +.fi + +.LP +.LP +For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. The constructor to \f2MyPOATie\fP takes a \f2delegate\fP. In this example, using the default POA model, the constructor also needs a \f2poa\fP. You must provide the implementation for \f2delegate\fP, but it does not have to inherit from any other class, only the interface \f2MyOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2MyPOATie\fP. For instance: .LP -For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. The constructor to \f2MyPOATie\fP takes a \f2delegate\fP. In this example, using the default POA model, the constructor also needs a \f2poa\fP. You must provide the implementation for \f2delegate\fP, but it does not have to inherit from any other class, only the interface \f2MyOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2MyPOATie\fP. For instance: .nf \f3 .fl @@ -144,13 +188,21 @@ For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. Th .fi .LP -You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method. +.LP +You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method. +.LP .LP To generate server\-side, Tie model bindings that are compatible with versions of the IDL to Java language mapping in versions prior to J2SE 1.4. .LP -\f2idlj \fP\f4\-oldImplBase\fP\f2 \fP\f4\-fall\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-oldImplBase\fP\f2 \fP\f4\-fallTIE\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-oldImplBase\fP \f3\-fall\fP My.idl +.fl +idlj \f3\-oldImplBase\fP \f3\-fallTIE\fP My.idl +.fl +.fi + .LP .LP For the interface \f2My\fP, this will generate \f2My_Tie.java\fP. The constructor to \f2My_Tie\fP takes a \f2impl\fP. You must provide the implementation for \f2impl\fP, but it does not have to inherit from any other class, only the interface \f2HelloOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2My_Tie\fP. For instance: @@ -184,201 +236,383 @@ For the interface \f2My\fP, this will generate \f2My_Tie.java\fP. The constructo .fi .LP -.RE .SS Specifying Alternate Locations for Emitted Files .LP -.RS 3 - .LP -If you want to direct the emitted files to a directory other than the current directory, invoke the compiler as: -.RS 3 +If you want to direct the emitted files to a directory other than the current directory, invoke the compiler as: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-td /altdir\fP My.idl +.fl +.fi .LP -\f2idlj \fP\f4\-td /altdir\fP\f2 My.idl\fP -.RE +.LP For the interface \f2My\fP, the bindings will be emitted to \f2/altdir/My.java\fP, etc., instead of \f2./My.java\fP. -.RE +.LP .SS Specifying Alternate Locations for Include Files .LP -.RS 3 +.LP +If \f2My.idl\fP included another idl file, \f2MyOther.idl\fP, the compiler assumes that \f2MyOther.idl\fP resides in the local directory. If it resides in \f2/includes\fP, for example, then you would invoke the compiler with the following command: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-i /includes\fP My.idl +.fl +.fi .LP -If \f2My.idl\fP included another idl file, \f2MyOther.idl\fP, the compiler assumes that \f2MyOther.idl\fP resides in the local directory. If it resides in \f2/includes\fP, for example, then you would invoke the compiler with the following command: \f2idlj \fP\f4\-i /includes\fP\f2 My.idl\fP .LP -If \f2My.idl\fP also included \f2Another.idl\fP that resided in \f2/moreIncludes\fP, for example, then you would invoke the compiler with the following command: \f2idlj \fP\f4\-i /includes \-i /moreIncludes\fP\f2 My.idl\fP +If \f2My.idl\fP also included \f2Another.idl\fP that resided in \f2/moreIncludes\fP, for example, then you would invoke the compiler with the following command: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-i /includes \-i /moreIncludes\fP My.idl +.fl +.fi + +.LP +.LP +Since this form of include can become irritatingly long, another means of indicating to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named \f2idl.config\fP in a directory that is listed in your CLASSPATH. Inside of \f2idl.config\fP, provide a line with the following form: +.LP +.nf +\f3 +.fl +includes=/includes;/moreIncludes +.fl +\fP +.fi + .LP -Since this form of include can become irritatingly long, another means of indicating to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named \f2idl.config\fP in a directory that is listed in your CLASSPATH. Inside of \f2idl.config\fP, provide a line with the following form: \f2includes=/includes;/moreIncludes\fP .LP The compiler will find this file and read in the includes list. Note that in this example the separator character between the two directories is a semicolon (;). This separator character is platform dependent. On the Windows platform, use a semicolon, on the Unix platform, use a colon, etc. For more information on \f2includes\fP, see the .na \f2Setting the Classpath\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#general. -.RE +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general. +.LP .SS Emitting Bindings for Include Files .LP -.RS 3 +.LP +By default, only those interfaces, structs, etc, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files: +.LP .LP -By default, only those interfaces, structs, etc, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files: \f4My.idl\fP .LP -\f2#include \fP -.br -\f2interface My\fP -.br -\f2{\fP -.br -\f2};\fP -.br -\f4MyOther.idl\fP +\f4My.idl\fP .LP -\f2interface MyOther\fP -.br -\f2{\fP -.br -\f2};\fP\ +.nf +\f3 +.fl +#include +.fl +interface My +.fl +{ +.fl +}; +.fl +\fP +.fi + .LP -The following command will only generate the java bindings for \f2My\fP: \f2idlj My.idl\fP + .LP -To generate all of the types in \f2My.idl\fP and all of the types in the files that \f2My.idl\fP includes (in this example, \f2MyOther.idl\fP), use the following command: \f2idlj \fP\f4\-emitAll\fP\f2 My.idl\fP .LP -There is a caveat to the default rule. \f2#include\fP statements which appear at global scope are treated as described. These \f2#include\fP statements can be thought of as import statements. \f2#include\fP statements which appear within some enclosing scope are treated as true \f2#include\fP statements, meaning that the code within the included file is treated as if it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example: \f4My.idl\fP +\f4MyOther.idl\fP .LP -\f2#include \fP -.br -\f2interface My\fP -.br -\f2{\fP -.br -\f2\ #include \fP -.br -\f2};\ \fP \f4MyOther.idl\fP +.nf +\f3 +.fl +interface MyOther +.fl +{ +.fl +}; +.fl +\fP +.fi + .LP -\f2interface MyOther\fP -.br -\f2{\fP -.br -\f2};\ \fP \f4Embedded.idl\fP + .LP -\f2enum E {one, two, three};\fP\ .LP -Running the following command: \f2idlj My.idl\fP +The following command will only generate the java bindings for \f2My\fP: +.LP +.nf +\f3 +.fl +idlj My.idl +.fl +\fP +.fi + +.LP +.LP +To generate all of the types in \f2My.idl\fP and all of the types in the files that \f2My.idl\fP includes (in this example, \f2MyOther.idl\fP), use the following command: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-emitAll\fP My.idl +.fl +.fi + .LP -will generate the following list of Java files: \f2./MyHolder.java\fP -.br -\f2./MyHelper.java\fP -.br -\f2./_MyStub.java\fP -.br -\f2./MyPackage\fP -.br -\f2./MyPackage/EHolder.java\fP -.br -\f2./MyPackage/EHelper.java\fP -.br -\f2./MyPackage/E.java\fP -.br -\f2./My.java\fP .LP -Notice that \f2MyOther.java\fP was not generated because it is defined in an import\-like \f2#include\fP. But \f2E.java\fP \f2was\fP generated because it was defined in a true \f2#include\fP. Also notice that since \f2Embedded.idl\fP was included within the scope of the interface \f2My\fP, it appears within the scope of \f2My\fP (that is,in \f2MyPackage\fP). +There is a caveat to the default rule. \f2#include\fP statements which appear at global scope are treated as described. These \f2#include\fP statements can be thought of as import statements. \f2#include\fP statements which appear within some enclosing scope are treated as true \f2#include\fP statements, meaning that the code within the included file is treated as if it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example: +.LP + +.LP +.LP +\f4My.idl\fP +.LP +.nf +\f3 +.fl +#include +.fl +interface My +.fl +{ +.fl + #include +.fl +}; +.fl +\fP +.fi + +.LP + +.LP +.LP +\f4MyOther.idl\fP +.LP +.nf +\f3 +.fl +interface MyOther +.fl +{ +.fl +}; +.fl +\fP +.fi + +.LP + +.LP +.LP +\f4Embedded.idl\fP +.LP +.nf +\f3 +.fl +enum E {one, two, three}; +.fl +\fP +.fi + +.LP + +.LP +.LP +Running the following command: +.LP +.nf +\f3 +.fl +idlj My.idl +.fl +\fP +.fi + +.LP +.LP +will generate the following list of Java files: +.LP +.nf +\f3 +.fl +./MyHolder.java +.fl +./MyHelper.java +.fl +./_MyStub.java +.fl +./MyPackage +.fl +./MyPackage/EHolder.java +.fl +./MyPackage/EHelper.java +.fl +./MyPackage/E.java +.fl +./My.java +.fl +\fP +.fi + +.LP +.LP +Notice that \f2MyOther.java\fP was not generated because it is defined in an import\-like \f2#include\fP. But \f2E.java\fP \f2was\fP generated because it was defined in a true \f2#include\fP. Also notice that since \f2Embedded.idl\fP was included within the scope of the interface \f2My\fP, it appears within the scope of \f2My\fP (that is,in \f2MyPackage\fP). +.LP .LP If the \f2\-emitAll\fP flag had been used in the previous example, then all types in all included files would be emitted. .LP -.RE .SS Inserting Package Prefixes .LP -.RS 3 +.LP +Suppose that you work for a company named ABC that has constructed the following IDL file: +.LP .LP -Suppose that you work for a company named ABC that has constructed the following IDL file: -.br -\f4Widgets.idl\fP .LP -\f2module Widgets\fP -.br -\f2{\fP -.br -\f2\ interface W1 {...};\fP -.br -\f2\ interface W2 {...};\fP -.br -\f2};\fP\ +\f4Widgets.idl\fP .LP -Running this file through the IDL\-to\-Java compiler will place the Java bindings for \f2W1\fP and \f2W2\fP within the package \f2Widgets\fP. But there is an industry convention that states that a company's packages should reside within a package named \f2com.\fP. The \f2Widgets\fP package is not good enough. To follow convention, it should be \f2com.abc.Widgets\fP. To place this package prefix onto the \f2Widgets\fP module, execute the following: \f2idlj \fP\f4\-pkgPrefix Widgets com.abc\fP\f2 Widgets.idl\fP +.nf +\f3 +.fl +module Widgets +.fl +{ +.fl + interface W1 {...}; +.fl + interface W2 {...}; +.fl +}; +.fl +\fP +.fi + +.LP + +.LP +.LP +Running this file through the IDL\-to\-Java compiler will place the Java bindings for \f2W1\fP and \f2W2\fP within the package \f2Widgets\fP. But there is an industry convention that states that a company's packages should reside within a package named \f2com.\fP. The \f2Widgets\fP package is not good enough. To follow convention, it should be \f2com.abc.Widgets\fP. To place this package prefix onto the \f2Widgets\fP module, execute the following: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-pkgPrefix Widgets com.abc\fP Widgets.idl +.fl +.fi + +.LP +.LP +If you have an IDL file which includes \f2Widgets.idl\fP, the \f2\-pkgPrefix\fP flag must appear in that command also. If it does not, then your IDL file will be looking for a \f2Widgets\fP package rather than a \f2com.abc.Widgets\fP package. .LP -If you have an IDL file which includes \f2Widgets.idl\fP, the \f2\-pkgPrefix\fP flag must appear in that command also. If it does not, then your IDL file will be looking for a \f2Widgets\fP package rather than a \f2com.abc.Widgets\fP package. .LP If you have a number of these packages that require prefixes, it might be easier to place them into the \f2idl.config\fP file described above. Each package prefix line should be of the form: .LP -\f2PkgPrefix.=\fP +.nf +\f3 +.fl +PkgPrefix.= +.fl +\fP +.fi + .LP -So the line for the above example would be: \f2PkgPrefix.Widgets=com.abc\fP +So the line for the above example would be: +.nf +\f3 +.fl +PkgPrefix.Widgets=com.abc +.fl +\fP +.fi + .LP .LP The use of this option does not affect the Repository ID. .LP -.RE .SS Defining Symbols Before Compilation .LP -.RS 3 +.LP +You may need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command +.LP +.nf +\f3 +.fl +idlj \fP\f3\-d\fP MYDEF My.idl +.fl +.fi .LP -You may need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command \f2idlj \fP\f4\-d\fP\f2 MYDEF My.idl\fP .LP is the equivalent of putting the line \f2#define MYDEF\fP inside \f2My.idl\fP. -.RE +.LP .SS Preserving Pre\-Existing Bindings .LP -.RS 3 +.LP +If the Java binding files already exist, the \f2\-keep\fP flag will keep the compiler from overwriting them. The default is to generate all files without considering if they already exist. If you've customized those files (which you should not do unless you are very comfortable with their contents), then the \f2\-keep\fP option is very useful. The command +.LP +.nf +\f3 +.fl +idlj \fP\f3\-keep\fP My.idl +.fl +.fi .LP -If the Java binding files already exist, the \f2\-keep\fP flag will keep the compiler from overwriting them. The default is to generate all files without considering if they already exist. If you've customized those files (which you should not do unless you are very comfortable with their contents), then the \f2\-keep\fP option is very useful. The command \f2idlj \fP\f4\-keep\fP\f2 My.idl\fP .LP -emit all client\-side bindings that do not already exist. -.RE +emits all client\-side bindings that do not already exist. +.LP .SS Viewing Progress of Compilation .LP -.RS 3 +.LP +The IDL\-to\-Java compiler will generate status messages as it progresses through its phases of execution. Use the \f2\-v\fP option to activate this "verbose" mode: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-v\fP My.idl +.fl +.fi .LP -The IDL\-to\-Java compiler will generate status messages as it progresses through its phases of execution. Use the \f2\-v\fP option to activate this "verbose" mode: \f2idlj \fP\f4\-v\fP\f2 My.idl\fP .LP By default the compiler does not operate in verbose mode. -.RE +.LP .SS Displaying Version Information -.LP -.RS 3 - .LP .LP To display the build version of the IDL\-to\-Java compiler, specify the \f2\-version\fP option on the command\-line: .LP -.LP -\f2idlj \-version\fP +.nf +\f3 +.fl +idlj \-version +.fl +\fP +.fi + .LP .LP Version information also appears within the bindings generated by the compiler. Any additional options appearing on the command\-line are ignored. .LP -.RE .SH "Options" -.LP - .LP .RS 3 .TP 3 \-d symbol This is equivalent to the following line in an IDL file: -.RS 3 - -.LP .nf \f3 .fl @@ -386,7 +620,6 @@ This is equivalent to the following line in an IDL file: .fl \fP .fi -.RE .TP 3 \-emitAll Emit all types, including those found in \f2#include\fP files. @@ -410,8 +643,9 @@ Generates skeletons compatible with pre\-1.4 JDK ORBs. By default, the POA Inher Wherever \f2type\fP is encountered at file scope, prefix the generated Java package name with \f2prefix\fP for all files generated for that type. The \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module. .TP 3 \-pkgTranslate type package -Whenever the module name \f2type\fP is encountered in an identifier, replace it in the identifier with \f2package\fP for all files in the generated Java package. Note that \f2pkgPrefix\fP changes are made first. \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module, and must match the full package name exactly. -.LP +Whenever the module name \f2type\fP is encountered in an identifier, replace it in the identifier with \f2package\fP for all files in the generated Java package. Note that \f2pkgPrefix\fP changes are made first. \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module, and must match the full package name exactly. +.br +.br If more than one translation matches an identifier, the longest match is chosen. For example, if the arguments include: .nf \f3 @@ -420,7 +654,6 @@ If more than one translation matches an identifier, the longest match is chosen. .fl \fP .fi -.LP The following translations would occur: .nf \f3 @@ -435,7 +668,6 @@ foo.baz.bar => buzz.fizz.bar .fl \fP .fi -.LP The following package names cannot be translated: .RS 3 .TP 2 @@ -445,8 +677,7 @@ o o \f2org.omg\fP or any subpackages of \f2org.omg\fP .RE -.LP -Any attempt to translate these packages will result in uncompilable code, and the use of these packages as the first argument after \f2\-pkgTranslate\fP will be treated as an error. +Any attempt to translate these packages will result in uncompilable code, and the use of these packages as the first argument after \f2\-pkgTranslate\fP will be treated as an error. .TP 3 \-skeletonName xxx%yyy Use \f2xxx%yyy\fP as the pattern for naming the skeleton. The defaults are: @@ -481,10 +712,10 @@ Display version information and terminate. .RE .LP -See the Description section for more option information. -.SH "Restrictions:" .LP - +See the Description section for more option information. +.LP +.SH "Restrictions:" .LP .RS 3 .TP 2 @@ -497,8 +728,6 @@ The \f2fixed\fP IDL type is not supported. .LP .SH "Known Problems:" -.LP - .LP .RS 3 .TP 2 diff --git a/src/linux/doc/man/jar.1 b/src/linux/doc/man/jar.1 index acf3ba727e1550e5d7235b17b9562bbe997cf9ff..cd59f0aa1d3b41179901288c4e4cb4ba931252d9 100644 --- a/src/linux/doc/man/jar.1 +++ b/src/linux/doc/man/jar.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,16 +19,14 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jar 1 "02 Jun 2010" +.TH jar 1 "10 May 2011" .LP .SH "Name" jar\-The Java Archive Tool .LP -\f3jar\fP combines multiple files into a single JAR archive file. +\f3jar\fP combines multiple files into a single JAR archive file. .SH "SYNOPSIS" -.LP - .LP .RS 3 .TP 3 @@ -51,9 +49,6 @@ Add index to jar file .LP .LP where: -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -80,10 +75,7 @@ Option to be passed into the Java runtime environment. (There must be no space b .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP The \f3jar\fP tool combines multiple files into a single JAR archive file. \f3jar\fP is a general\-purpose archiving and compression tool, based on ZIP and the .na @@ -92,9 +84,6 @@ The \f3jar\fP tool combines multiple files into a single JAR archive file. \f3ja http://www.gzip.org/zlib/ compression format. However, \f3jar\fP was designed mainly package java applets or applications into a single archive. When the components of an applet or application (files, images and sounds) are combined into a single archive, they can be downloaded by a java agent (like a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. \f3jar\fP also compresses files and so further improves download time. In addition, it allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. The syntax for the jar tool is almost identical to the syntax for the \f2tar\fP command. A \f3jar\fP archive can be used as a class path entry, whether or not it is compressed. .LP Typical usage to combine files into a jar file is: -.LP -.RS 3 - .LP .nf \f3 @@ -103,19 +92,15 @@ Typical usage to combine files into a jar file is: .fl \fP .fi -.RE .LP In this example, all the class files in the current directory are placed into the file named \f2myFile.jar\fP. The jar tool automatically generates a manifest file entry named \f2META\-INF/MANIFEST.MF\fP. It is always the first entry in the jar file. The manifest file declares meta\-information about the archive, and stores that data as \f2name\ :\ value\fP pairs. Refer to the .na \f2JAR file specification\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest for details explaining how the jar tool stores meta\-information in the manifest file. +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR%20Manifest for details explaining how the jar tool stores meta\-information in the manifest file. .LP If a jar file should include \f2name\ :\ value\fP pairs contained in an existing manifest file, specify that file using the \f2\-m\fP option: -.LP -.RS 3 - .LP .nf \f3 @@ -124,7 +109,6 @@ If a jar file should include \f2name\ :\ value\fP pairs contained in an existing .fl \fP .fi -.RE .LP An existing manifest file must end with a new line character.\ \f3jar\fP does not parse the last line of a manifest file if it does not end with a new line character. @@ -135,9 +119,6 @@ An existing manifest file must end with a new line character.\ \f3jar\fP does n .LP \f3Note:\ \fP A jar command that specifies \f2cfm\fP on the command line instead of \f2cmf\fP (the order of the m and \-f options are reversed), the \f3jar\fP command line must specify the name of the jar archive first, followed by the name of the manifest file: -.RS 3 - -.LP .nf \f3 .fl @@ -145,15 +126,11 @@ An existing manifest file must end with a new line character.\ \f3jar\fP does n .fl \fP .fi -.RE .LP The manifest is in a text format inspired by RFC822 ASCII format, so it is easy to view and process manifest\-file contents. .LP To extract the files from a jar file, use \f2x\fP: -.LP -.RS 3 - .LP .nf \f3 @@ -162,14 +139,10 @@ To extract the files from a jar file, use \f2x\fP: .fl \fP .fi -.RE .LP .LP To extract individual files from a jar file, supply their filenames: -.LP -.RS 3 - .LP .nf \f3 @@ -178,7 +151,6 @@ To extract individual files from a jar file, supply their filenames: .fl \fP .fi -.RE .LP .LP @@ -186,10 +158,7 @@ Beginning with version 1.3 of the JDK, the \f2jar\fP utility supports .na \f2JarIndex\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index, which allows application class loaders to load classes more efficiently from jar files. If an application or applet is bundled into multiple jar files,\ only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running \f2jar\fP with the \f2\-i\fPoption. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the \f2Class\-Path\fP attribute of the main jar file's manifest. -.LP -.RS 3 - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Index, which allows application class loaders to load classes more efficiently from jar files. If an application or applet is bundled into multiple jar files,\ only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running \f2jar\fP with the \f2\-i\fPoption. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the \f2Class\-Path\fP attribute of the main jar file's manifest. .LP .nf \f3 @@ -198,7 +167,6 @@ http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index, whi .fl \fP .fi -.RE .LP .LP @@ -209,9 +177,6 @@ The application class loader uses the information stored in this file for effici .br .br To copy directories, first compress files in \f2dir1\fP to \f2stdout\fP, then extract from \f2stdin\fP to \f2dir2\fP (omitting the \f2\-f\fP option from both \f2jar\fP commands): -.LP -.RS 3 - .LP .nf \f3 @@ -220,7 +185,6 @@ To copy directories, first compress files in \f2dir1\fP to \f2stdout\fP, then ex .fl \fP .fi -.RE .LP .LP @@ -228,11 +192,9 @@ To review command samples which use \f2jar\fP to opeate on jar files and jar fil .na \f2Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar. +http://download.oracle.com/javase/tutorial/deployment/jar. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -241,9 +203,6 @@ Creates a new archive file named \f2jarfile\fP (if \f2f\fP is specified) or to s .TP 3 u Updates an existing file \f2jarfile\fP (when \f2f\fP is specified) by adding to it files and directories specified by \f2inputfiles\fP. For example: -.RS 3 - -.LP .nf \f3 .fl @@ -251,11 +210,7 @@ jar uf foo.jar foo.class .fl \fP .fi -.RE would add the file \f2foo.class\fP to the existing jar file \f2foo.jar\fP. The \f2\-u\fP option can also update the manifest entry, as given by this example: -.RS 3 - -.LP .nf \f3 .fl @@ -263,7 +218,6 @@ jar umf manifest foo.jar .fl \fP .fi -.RE updates the \f2foo.jar\fP manifest with the \f2name : value\fP pairs in \f2manifest\fP. .TP 3 x @@ -274,9 +228,6 @@ Lists the table of contents from \f2jarfile\fP (if \f2f\fP is specified) or stan .TP 3 i Generate index information for the specified \f2jarfile\fP and its dependent jar files. For example: -.RS 3 - -.LP .nf \f3 .fl @@ -284,9 +235,8 @@ jar i foo.jar .fl \fP .fi -.RE .LP -would generate an \f2INDEX.LIST\fP file in \f2foo.jar\fP which contains location information for each package in \f2foo.jar\fP and all the jar files specified in the \f2Class\-Path\fP attribute of \f2foo.jar\fP. See the index example. +would generate an \f2INDEX.LIST\fP file in \f2foo.jar\fP which contains location information for each package in \f2foo.jar\fP and all the jar files specified in the \f2Class\-Path\fP attribute of \f2foo.jar\fP. See the index example. .TP 3 f Specifies the file \f2jarfile\fP to be created (\f2c\fP), updated (\f2u\fP), extracted (\f2x\fP), indexed (\f2i\fP), or viewed (\f2t\fP). The \f2\-f\fP option and filename \f2jarfile\fP are a pair \-\- if present, they must both appear. Omitting \f2f\fP and \f2jarfile\fP accepts a jar file name from \f2stdin\fP(for x and t) or sends jar file to \f2stdout\fP (for c and u). @@ -301,12 +251,10 @@ M Do not create a manifest file entry (for c and u), or delete a manifest file entry if one exists (for u). .TP 3 m -Includes \f2name : value\fP attribute pairs from the specified manifest file \f2manifest\fP in the file at \f2META\-INF/MANIFEST.MF\fP. \f2jar\fP adds a \f2name\ :\ value\fP pair unless an entry already exists with the same name, in which case \f2jar\fP updates its value. -.LP +Includes \f2name : value\fP attribute pairs from the specified manifest file \f2manifest\fP in the file at \f2META\-INF/MANIFEST.MF\fP. \f2jar\fP adds a \f2name\ :\ value\fP pair unless an entry already exists with the same name, in which case \f2jar\fP updates its value. +.br +.br On the command line, the letters \f3m\fP and \f3f\fP must appear in the same order that \f2manifest\fP and \f2jarfile\fP appear. Example use: -.RS 3 - -.LP .nf \f3 .fl @@ -314,22 +262,18 @@ jar cmf myManifestFile myFile.jar *.class .fl \fP .fi -.RE You can add special\-purpose \f2name\ :\ value\fP attribute pairs to the manifest that aren't contained in the default manifest. For example, you can add attributes specifying vendor information, version information, package sealing, or to make JAR\-bundled applications executable. See the .na \f2JAR Files\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar/ trail in the Java Tutorial for examples of using the \f4\-m\fP option. -.LP +http://download.oracle.com/javase/tutorial/deployment/jar/ trail in the Java Tutorial for examples of using the \f4\-m\fP option. .TP 3 e Sets \f2entrypoint\fP as the application entry point for stand\-alone applications bundled into executable jar file. The use of this option creates or overrides the \f2Main\-Class\fP attribute value in the manifest file. This option can be used during creation of jar file or while updating the jar file. This option specifies the application entry point without editing or creating the manifest file. .br .br +.br For example, this command creates \f2Main.jar\fP where the \f2Main\-Class\fP attribute value in the manifest is set to \f2Main\fP: -.RS 3 - -.LP .nf \f3 .fl @@ -337,12 +281,7 @@ jar cfe Main.jar Main Main.class .fl \fP .fi -.RE -.LP The java runtime can directly invoke this application by running the following command: -.RS 3 - -.LP .nf \f3 .fl @@ -350,11 +289,7 @@ java \-jar Main.jar .fl \fP .fi -.RE If the entrypoint class name is in a package it may use either a dot (".") or slash ("/") character as the delimiter. For example, if \f2Main.class\fP is in a package called \f2foo\fP the entry point can be specified in the following ways: -.RS 3 - -.LP .nf \f3 .fl @@ -362,11 +297,7 @@ jar \-cfe Main.jar foo/Main foo/Main.class .fl \fP .fi -.RE or -.RS 3 - -.LP .nf \f3 .fl @@ -374,18 +305,13 @@ jar \-cfe Main.jar foo.Main foo/Main.class .fl \fP .fi -.RE -\f3Note:\ \fP specifying both \f2\-m\fP and \f2\-e\fP options together when the given manifest also contains the \f2Main\-Class\fP attribute results in an ambigous \f2Main.class\fP specification, leading to an error and the jar creation or update operation is aborted. -.LP +\f3Note:\ \fP specifying both \f2\-m\fP and \f2\-e\fP options together when the given manifest also contains the \f2Main\-Class\fP attribute results in an ambigous \f2Main.class\fP specification, leading to an error and the jar creation or update operation is aborted. .TP 3 -\-C \ dir +\-C\ dir Temporarily changes directories (\f2cd\fP\ \f2dir\fP) during execution of the \f2jar\fP command while processing the following \f2inputfiles\fP argument. Its operation is intended to be similar to the \f2\-C\fP option of the UNIX \f2tar\fP utility. .br .br For example, this command changes to the \f2classes\fP directory and adds the \f2bar.class\fP from that directory to \f2foo.jar\fP: -.RS 3 - -.LP .nf \f3 .fl @@ -393,11 +319,7 @@ jar uf foo.jar \-C classes bar.class .fl \fP .fi -.RE This command changes to the \f2classes\fP directory and adds to \f2foo.jar\fP all files within the \f2classes\fP directory (without creating a classes directory in the jar file), then changes back to the original directory before changing to the \f2bin\fP directory to add \f2xyz.class\fP to \f2foo.jar\fP. -.RS 3 - -.LP .nf \f3 .fl @@ -405,11 +327,7 @@ jar uf foo.jar \-C classes . \-C bin xyz.class .fl \fP .fi -.RE If \f2classes\fP holds files \f2bar1\fP and \f2bar2\fP, then here's what the jar file will contain using \f2jar tf foo.jar\fP: -.RS 3 - -.LP .nf \f3 .fl @@ -425,7 +343,6 @@ xyz.class .fl \fP .fi -.RE .LP .TP 3 \-Joption @@ -434,8 +351,6 @@ Pass \f2option\fP to the Java runtime environment, where \f2option\fP is one of .LP .SH "COMMAND LINE ARGUMENT FILES" -.LP - .LP To shorten or simplify the jar command line, you can specify one or more files that themselves contain arguments to the \f2jar\fP command (except \f2\-J\fP options). This enables you to create jar commands of any length, overcoming command line limits imposed by the operating system. .LP @@ -446,9 +361,6 @@ When executing \f2jar\fP, pass in the path and name of each argument file with t .br .br The example below, \f2classes.list\fP holds the names of files output by a \f2find\fP command: -.LP -.RS 3 - .LP .nf \f3 @@ -456,14 +368,10 @@ The example below, \f2classes.list\fP holds the names of files output by a \f2fi % find \fP\f3.\fP \-name '*.class' \-print > classes.list .fl .fi -.RE .LP .LP You can then execute the \f2jar\fP command on \f2Classes.list\fP by passing it to \f2jar\fP using argfile syntax: -.LP -.RS 3 - .LP .nf \f3 @@ -472,13 +380,9 @@ You can then execute the \f2jar\fP command on \f2Classes.list\fP by passing it t .fl \fP .fi -.RE .LP An argument file can specify a path, but any filenames inside the argument file that have relative paths are relative to the current working directory, not to the path passed in. Here is an example: -.RS 3 - -.LP .nf \f3 .fl @@ -486,20 +390,14 @@ An argument file can specify a path, but any filenames inside the argument file .fl \fP .fi -.RE .LP .LP .LP .SH "EXAMPLES" -.LP - .LP To add all the files in a particular directory to an archive (overwriting contents if the archive already exists). Enumerating verbosely (with the \f2\-v\fP option) will tell you more information about the files in the archive, such as their size and last modified date. -.RS 3 - -.LP .nf \f3 .fl @@ -535,13 +433,9 @@ adding: spacemusic.au(in = 3079) (out= 73)(deflated 97%) .fl \fP .fi -.RE .LP If you already have separate subdirectories for images, audio files and classes, you can combine them into a single jar file: -.RS 3 - -.LP .nf \f3 .fl @@ -585,13 +479,9 @@ audio/ bundle.jar classes/ images/ .fl \fP .fi -.RE .LP To see the entry names in the jarfile, use the \f2t\fP option: -.RS 3 - -.LP .nf \f3 .fl @@ -619,7 +509,6 @@ images/at_work.gif .fl \fP .fi -.RE .LP .LP @@ -629,9 +518,6 @@ To add an index file to the jar file for speeding up class loading, use the \f2i Example: .br -.LP -.RS 3 - .LP If you split the inter\-dependent classes for a stock trade application into three jar files: \f2main.jar\fP, \f2buy.jar\fP, and \f2sell.jar\fP. .br @@ -660,38 +546,34 @@ then you can use the \f2\-i\fP option to speed up the class loading time for you .fi .LP -An \f2INDEX.LIST\fP file is inserted to the \f2META\-INF\fP directory. This enables the application class loader to download the specified jar files when it is searching for classes or resources. -.RE +An \f2INDEX.LIST\fP file is inserted to the \f2META\-INF\fP directory. This enables the application class loader to download the specified jar files when it is searching for classes or resources. .SH "SEE ALSO" .LP - .LP .na \f2The Jar Overview\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jarGuide.html -.br - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jarGuide.html +.LP .LP .na \f2The Jar File Specification\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html -.br - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html +.LP .LP .na \f2The JarIndex Spec\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index -.br - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Index +.LP .LP .na \f2Jar Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar on the Java Software web site. -.br - +http://download.oracle.com/javase/tutorial/deployment/jar/index.html +.LP +.LP +pack200(1) .LP -pack200(1) + diff --git a/src/linux/doc/man/jarsigner.1 b/src/linux/doc/man/jarsigner.1 index 090edd2938ef3f85f203a9e099c1437c440635fd..d646eae2cde0abde61283cd157bbd00362f9164f 100644 --- a/src/linux/doc/man/jarsigner.1 +++ b/src/linux/doc/man/jarsigner.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jarsigner 1 "02 Jun 2010" +.TH jarsigner 1 "10 May 2011" .LP .SH "Name" jarsigner \- JAR Signing and Verification Tool -.LP -.RS 3 - .LP .LP Generates signatures for Java ARchive (JAR) files, and verifies the signatures of signed JAR files. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -50,8 +44,6 @@ Generates signatures for Java ARchive (JAR) files, and verifies the signatures o The jarsigner \-verify command can take zero or more keystore alias names after the jar filename. When specified, jarsigner will check 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 \-keystore, or the default keystore. .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jarsigner\fP tool is used for two purposes: @@ -108,9 +100,6 @@ The default \f3jarsigner\fP behavior is to \f2sign\fP a JAR (or zip) file. Use t .LP .SS Keystore Aliases -.LP -.RS 3 - .LP .LP All keystore entities are accessed via unique \f2aliases\fP. @@ -121,23 +110,19 @@ When using \f3jarsigner\fP to sign a JAR file, you must specify the alias for th .nf \f3 .fl - jarsigner \-keystore /working/mystore \-storepass myspass + jarsigner \-keystore /working/mystore \-storepass \fP\f4\fP\f3 .fl - \-keypass dukekeypasswd MyJARFile.jar duke + \-keypass \fP\f4\fP\f3 MyJARFile.jar duke .fl \fP .fi .LP .LP -Keystores are protected with a password, so the store password (in this case "myspass") must be specified. You will be prompted for it if you don't specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password (in this case "dukekeypasswd") must be specified, and you will be prompted for it if you don't specify it on the command line and it isn't the same as the store password. +Keystores are protected with a password, so the store password must be specified. You will be prompted for it if you don't specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password must be specified, and you will be prompted for it if you don't specify it on the command line and it isn't the same as the store password. .LP -.RE .SS Keystore Location -.LP -.RS 3 - .LP .LP \f3jarsigner\fP has a \f2\-keystore\fP option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named \f2.keystore\fP in the user's home directory, as determined by the \f2user.home\fP system property. On Solaris systems \f2user.home\fP defaults to the user's home directory. @@ -145,12 +130,8 @@ Keystore Location .LP Note that the input stream from the \f2\-keystore\fP option is passed to the \f2KeyStore.load\fP method. If \f2NONE\fP is specified as the URL, then a null stream is passed to the \f2KeyStore.load\fP method. \f2NONE\fP should be specified if the \f2KeyStore\fP is not file\-based, for example, if it resides on a hardware token device. .LP -.RE .SS Keystore Implementation -.LP -.RS 3 - .LP .LP The \f2KeyStore\fP class provided in the \f2java.security\fP 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 \f2type\fP of keystore. @@ -166,13 +147,13 @@ Keystore implementations are provider\-based. More specifically, the application .na \f2How to Implement a Provider for the Java Cryptography Architecture\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/HowToImplAProvider.html. .LP .LP Applications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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 are not compatible. .LP .LP -\f3keytool\fP works on any file\-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. +\f3keytool\fP works on any file\-based keystore implementation. (It treats the keystore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. .LP .LP For \f3jarsigner\fP and \f3keytool\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Change Keystore" command in the Edit menu. @@ -227,40 +208,35 @@ Note that if you us the PKCS#11 provider package, you should refer to the .na \f2KeyTool and JarSigner\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/p11guide.html#KeyToolJarSigner section of the Java PKCS#11 Reference Guide for details. +http://download.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html#KeyToolJarSigner section of the Java PKCS#11 Reference Guide for details. .LP -.RE .SS Supported Algorithms -.LP -.RS 3 - .LP .LP -By default, \f3jarsigner\fP signs a JAR file using either +By default, \f3jarsigner\fP signs a JAR file using one of the following: .LP .RS 3 .TP 2 o -DSA (Digital Signature Algorithm) with the SHA\-1 digest algorithm, or +DSA (Digital Signature Algorithm) with the SHA1 digest algorithm +.TP 2 +o +RSA algorithm with the SHA256 digest algorithm. .TP 2 o -the RSA algorithm with the SHA\-256 digest algorithm. +EC (Elliptic Curve) cryptography algorithm with the SHA256 with ECDSA (Elliptic Curve Digital Signature Algorithm). .RE .LP .LP -That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm. +That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm. If the signer's keys are EC keys, \f3jarsigner\fP will sign the JAR file using the "SHA256withECDSA" algorithm. .LP .LP These default signature algorithms can be overridden using the \f2\-sigalg\fP option. .LP -.RE .SS The Signed JAR File -.LP -.RS 3 - .LP .LP When \f3jarsigner\fP 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: @@ -271,7 +247,7 @@ o a signature file, with a .SF extension, and .TP 2 o -a signature block file, with a .DSA extension. +a signature block file, with a .DSA, .RSA, or .EC extension. .RE .LP @@ -281,22 +257,19 @@ The base file names for these two files come from the value of the \f2\-sigFile\ .nf \f3 .fl - \-sigFile MKSIGN +\-sigFile MKSIGN .fl \fP .fi .LP .LP -the files are named "MKSIGN.SF" and "MKSIGN.DSA". +The files are named "MKSIGN.SF" and "MKSIGN.DSA". .LP .LP If no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. Legal characters include letters, digits, underscores, and hyphens. .LP \f3The Signature (.SF) File\fP -.LP -.RS 3 - .LP .LP A signature file (the .SF file) looks similar to the manifest file that is always included in a JAR file when \f3jarsigner\fP is used to sign the file. That is, for each source file included in the JAR file, the .SF file has three lines, just as in the manifest file, listing the following: @@ -320,25 +293,14 @@ In the manifest file, the SHA digest value for each source file is the digest (h .LP The signature file also, by default, includes a header containing a hash of the whole manifest file. The presence of the header enables verification optimization, as described in JAR File Verification. .LP -.RE -\f3The Signature Block (.DSA) File\fP -.LP -.RS 3 - -.LP +\f3The Signature Block File\fP .LP -The .SF file is signed and the signature is placed in the .DSA file. The .DSA file also contains, encoded inside it, the certificate or certificate chain from the keystore which authenticates the public key corresponding to the private key used for signing. -.LP -.RE -.RE +The .SF 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 which authenticates the public key corresponding to the private key used for signing. The file has the extension .DSA, .RSA, or .EC depending on the digest algorithm used. .SS Signature Timestamp -.LP -.RS 3 - .LP .LP -\f2jarsigner\fP tool can now generate and store a signature timestamp when signing a JAR file. In addition, \f2jarsigner\fP supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options: +\f2jarsigner\fP tool can generate and store a signature timestamp when signing a JAR file. In addition, \f2jarsigner\fP supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options: .LP .RS 3 .TP 2 @@ -359,12 +321,8 @@ o .LP Each of these options is detailed in the Options section below. .LP -.RE .SS JAR File Verification -.LP -.RS 3 - .LP .LP A successful JAR file verification occurs if the signature(s) are valid, and none of the files that were in the JAR file when the signatures were generated have been changed since then. JAR file verification involves the following steps: @@ -372,18 +330,22 @@ A successful JAR file verification occurs if the signature(s) are valid, and non .RS 3 .TP 3 1. -Verify the signature of the .SF file itself. -.LP -That is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with. +Verify the signature of the .SF file itself. +.br +.br +That is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with. .TP 3 2. -Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest. -.LP -The .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step. -.LP -If that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File). -.LP -One reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the \f2jar\fP tool) after the signature (and thus the .SF file) was generated. When the \f2jar\fP tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non\-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file. +Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest. +.br +.br +The .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step. +.br +.br +If that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File). +.br +.br +One reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the \f2jar\fP tool) after the signature (and thus the .SF file) was generated. When the \f2jar\fP tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non\-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file. .TP 3 3. Read each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest, and then compare the result with the digest for this file in the manifest section. The digests should be the same, or verification fails. @@ -393,12 +355,8 @@ Read each file in the JAR file that has an entry in the .SF file. While reading, .LP If any serious verification failures occur during the verification process, the process is stopped and a security exception is thrown. It is caught and displayed by \f3jarsigner\fP. .LP -.RE .SS Multiple Signatures for a JAR File -.LP -.RS 3 - .LP .LP A JAR file can be signed by multiple people simply by running the \f3jarsigner\fP tool on the file multiple times, specifying the alias for a different person each time, as in: @@ -435,10 +393,7 @@ When a JAR file is signed multiple times, there are multiple .SF and .DSA files .LP Note: It is also possible for a JAR file to have mixed signatures, some generated by the JDK 1.1 \f3javakey\fP tool and others by \f3jarsigner\fP. That is, \f3jarsigner\fP can be used to sign JAR files already previously signed using \f3javakey\fP. .LP -.RE .SH "OPTIONS" -.LP - .LP .LP The various \f3jarsigner\fP options are listed and described below. Note: @@ -462,12 +417,15 @@ The \f2\-keystore\fP, \f2\-storepass\fP, \f2\-keypass\fP, \f2\-sigfile\fP, \f2\- .RS 3 .TP 3 \-keystore url -Specifies the URL that tells the keystore location. This defaults to the file \f2.keystore\fP in the user's home directory, as determined by the "user.home" system property. -.LP -A keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default). -.LP -A keystore is \f2not\fP required when verifying, but if one is specified, or the default exists, and the \f2\-verbose\fP option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore. -.LP +Specifies the URL that tells the keystore location. This defaults to the file \f2.keystore\fP in the user's home directory, as determined by the "user.home" system property. +.br +.br +A keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default). +.br +.br +A keystore is \f2not\fP required when verifying, but if one is specified, or the default exists, and the \f2\-verbose\fP option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore. +.br +.br Note: the \f2\-keystore\fP argument can actually be a file name (and path) specification rather than a URL, in which case it will be treated the same as a "file:" URL. That is, .nf \f3 @@ -494,79 +452,93 @@ o \f2\-storetype PKCS11\fP .RE For example, this command lists the contents of the configured PKCS#11 token: -.RS 3 - -.LP .nf \f3 .fl jarsigner \-keystore NONE \-storetype PKCS11 \-list .fl - -.fl \fP .fi -.RE .TP 3 \-storetype storetype -Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static \f2getDefaultType\fP method in \f2java.security.KeyStore\fP. -.LP -The PIN for a PCKS#11 token can also be specified using the \f2\-storepass\fP option. If none has been specified, keytool and jarsigner will 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 \f2\-protected\fP option must be specified and no password options can be specified. +Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static \f2getDefaultType\fP method in \f2java.security.KeyStore\fP. +.br +.br +The PIN for a PCKS#11 token can also be specified using the \f2\-storepass\fP option. If none has been specified, keytool and jarsigner will 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 \f2\-protected\fP option must be specified and no password options can be specified. .TP 3 -\-storepass password -Specifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for the password. -.LP -Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. +\-storepass[:env | :file] argument +Specifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for the password. +.br +.br +If the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP. Otherwise, the password is retrieved as follows: +.RS 3 +.TP 2 +o +\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP +.TP 2 +o +\f2file\fP: Retrieve the password from the file named \f2argument\fP +.RE +Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. .TP 3 -\-keypass password -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 \f3jarsigner\fP to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it. -.LP -Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. Also, when typing in a password at the password prompt, the password is echoed (displayed exactly as typed), so be careful not to type it in front of anyone. +\-keypass[:env | :file] argument +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 \f3jarsigner\fP to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it. +.br +.br +If the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP. Otherwise, the password is retrieved as follows: +.RS 3 +.TP 2 +o +\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP +.TP 2 +o +\f2file\fP: Retrieve the password from the file named \f2argument\fP +.RE +Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. .TP 3 \-sigfile file -Specifies the base file name to be used for the generated .SF and .DSA files. For example, if \f2file\fP is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META\-INF" directory of the signed JAR file. -.LP -The characters in \f2file\fP must come from the set "a\-zA\-Z0\-9_\-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names. -.LP -If no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. +Specifies the base file name to be used for the generated .SF and .DSA files. For example, if \f2file\fP is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META\-INF" directory of the signed JAR file. +.br +.br +The characters in \f2file\fP must come from the set "a\-zA\-Z0\-9_\-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names. +.br +.br +If no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. .TP 3 \-sigalg algorithm -.RS 3 - -.LP -Specifies the name of the signature algorithm to use to sign the JAR file. -.LP +Specifies the name of the signature algorithm to use to sign the JAR file. +.br +.br See .na \f2Appendix A\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA or SHA256withRSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. -.LP -.RE +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA, SHA256withRSA, or SHA256withECDSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. .TP 3 \-digestalg algorithm -.RS 3 -Specifies the name of the message digest algorithm to use when digesting the entries of a jar file. -.LP +Specifies the name of the message digest algorithm to use when digesting the entries of a jar file. +.br +.br See .na \f2Appendix A\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA\-256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. -.LP -.RE +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. .TP 3 \-signedjar file -Specifies the name to be used for the signed JAR file. -.LP -If no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file. +Specifies the name to be used for the signed JAR file. +.br +.br +If no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file. .TP 3 \-verify -If this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)" -.LP -It is possible to verify JAR files signed using either \f3jarsigner\fP or the JDK 1.1 \f3javakey\fP tool, or both. -.LP -For further information on verification, see JAR File Verification. +If this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)" +.br +.br +It is possible to verify JAR files signed using either \f3jarsigner\fP or the JDK 1.1 \f3javakey\fP tool, or both. +.br +.br +For further information on verification, see JAR File Verification. .TP 3 \-certs If this appears on the command line, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file. This information includes @@ -578,7 +550,6 @@ the name of the type of certificate (stored in the .DSA file) that certifies the o if the certificate is an X.509 certificate (more specifically, an instance of \f2java.security.cert.X509Certificate\fP): the distinguished name of the signer .RE -.LP The keystore is also examined. If no keystore value is specified on the command line, the default keystore file (if any) will be checked. If the public key certificate for a signer matches an entry in the keystore, then the following information will also be displayed: .RS 3 .TP 2 @@ -596,26 +567,25 @@ If this appears on the command line, it indicates "verbose" mode, which causes \ In the past, the .DSA (signature block) file generated when a JAR file was signed used to include a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default doesn't contain a copy of the .SF file anymore. But if \f2\-internalsf\fP appears on the command line, the old behavior is utilized. \f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP .TP 3 \-sectionsonly -If this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does \f2not\fP include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File . -.LP -By default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. -.LP -For further information, see JAR File Verification. -.LP -\f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP +If this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does \f2not\fP include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File . +.br +.br +By default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. +.br +.br +For further information, see JAR File Verification. +.br +.br +\f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP .TP 3 \-protected Either \f2true\fP or \f2false\fP. This value should be specified as \f2true\fP if a password must be given via a protected authentication path such as a dedicated PIN reader. -.RE -.RS 3 .TP 3 -\-provider provider\-class\-name -Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file, \f2java.security\fP. -.LP +\-providerClass provider\-class\-name +Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file, \f2java.security\fP. +.br +.br Used in conjunction with the \f2\-providerArg\fP \f2ConfigFilePath\fP option, keytool and jarsigner will install the provider dynamically (where \f2ConfigFilePath\fP is the path to the token configuration file). Here's an example of a command to list a PKCS#11 keystore when the Sun PKCS#11 provider has not been configured in the security properties file. -.RS 3 - -.LP .nf \f3 .fl @@ -629,19 +599,16 @@ jarsigner \-keystore NONE \-storetype PKCS11 \\ .fl \fP .fi -.RE .TP 3 \-providerName providerName -If more than one provider has been configured in the \f2java.security\fP security properties file, you can use the \f2\-providerName\fP option to target a specific provider instance. The argument to this option is the name of the provider. -.LP +If more than one provider has been configured in the \f2java.security\fP security properties file, you can use the \f2\-providerName\fP option to target a specific provider instance. The argument to this option is the name of the provider. +.br +.br For the Sun PKCS#11 provider, \f2providerName\fP is of the form \f2SunPKCS11\-\fP\f2TokenName\fP, where \f2TokenName\fP is the name suffix that the provider instance has been configured with, as detailed in the .na \f2configuration attributes table\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/p11guide.html#ATTRS. For example, the following command lists the contents of the PKCS#11 keystore provider instance with name suffix \f2SmartCard\fP: -.RS 3 - -.LP +http://download.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html#ATTRS. For example, the following command lists the contents of the PKCS#11 keystore provider instance with name suffix \f2SmartCard\fP: .nf \f3 .fl @@ -653,58 +620,59 @@ jarsigner \-keystore NONE \-storetype PKCS11 \\ .fl \fP .fi -.RE .TP 3 \-Jjavaoption -Passes through the specified \f2javaoption\fP string directly to the Java interpreter. (\f3jarsigner\fP is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type \f2java \-h\fP or \f2java \-X\fP at the command line. -.LP +Passes through the specified \f2javaoption\fP string directly to the Java interpreter. (\f3jarsigner\fP is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type \f2java \-h\fP or \f2java \-X\fP at the command line. .TP 3 \-tsa url -If \f2"\-tsa http://example.tsa.url"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, \f2http://example.tsa.url\fP, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the \f2\-tsacert\fP option. The \f2\-tsa\fP option does not require the TSA's public key certificate to be present in the keystore. -.LP +If \f2"\-tsa http://example.tsa.url"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, \f2http://example.tsa.url\fP, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the \f2\-tsacert\fP option. The \f2\-tsa\fP option does not require the TSA's public key certificate to be present in the keystore. +.br +.br To generate the timestamp, \f2jarsigner\fP communicates with the TSA using the Time\-Stamp Protocol (TSP) defined in .na \f2RFC 3161\fP @ .fi -http://www.ietf.org/rfc/rfc3161.txt. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file. -.LP +http://www.ietf.org/rfc/rfc3161.txt. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file. .TP 3 \-tsacert alias -If \f2"\-tsacert alias"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The \f2alias\fP identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA. -.LP -The TSA's public key certificate must be present in the keystore when using \f2\-tsacert\fP. -.LP +If \f2"\-tsacert alias"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The \f2alias\fP identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA. +.br +.br +The TSA's public key certificate must be present in the keystore when using \f2\-tsacert\fP. .TP 3 \-altsigner class -Specifies that an alternative signing mechanism be used. The fully\-qualified class name identifies a class file that extends the \f2com.sun.jarsigner.ContentSigner abstract class\fP. The path to this class file is defined by the \f2\-altsignerpath\fP option. If the \f2\-altsigner\fP option is used, \f2jarsigner\fP uses the signing mechanism provided by the specified class. Otherwise, \f2jarsigner\fP uses its default signing mechanism. -.LP -For example, to use the signing mechanism provided by a class named \f2com.sun.sun.jarsigner.AuthSigner\fP, use the \f2jarsigner\fP option \f2"\-altsigner com.sun.jarsigner.AuthSigner"\fP -.LP +Specifies that an alternative signing mechanism be used. The fully\-qualified class name identifies a class file that extends the \f2com.sun.jarsigner.ContentSigner abstract class\fP. The path to this class file is defined by the \f2\-altsignerpath\fP option. If the \f2\-altsigner\fP option is used, \f2jarsigner\fP uses the signing mechanism provided by the specified class. Otherwise, \f2jarsigner\fP uses its default signing mechanism. +.br +.br +For example, to use the signing mechanism provided by a class named \f2com.sun.sun.jarsigner.AuthSigner\fP, use the \f2jarsigner\fP option \f2"\-altsigner com.sun.jarsigner.AuthSigner"\fP .TP 3 \-altsignerpath classpathlist -Specifies the path to the class file (the class file name is specified with the \f2\-altsigner\fP option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below. -.LP -An absolute path or a path relative to the current directory may be specified. If \f2classpathlist\fP contains multiple paths or JAR files, they should be separated with a colon (\f2:\fP) on Solaris and a semi\-colon (\f2;\fP) on Windows. This option is not necessary if the class is already in the search path. -.LP +Specifies the path to the class file (the class file name is specified with the \f2\-altsigner\fP option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below. +.br +.br +An absolute path or a path relative to the current directory may be specified. If \f2classpathlist\fP contains multiple paths or JAR files, they should be separated with a colon (\f2:\fP) on Solaris and a semi\-colon (\f2;\fP) on Windows. This option is not necessary if the class is already in the search path. +.br +.br Example of specifying the path to a jar file that contains the class file: -.RS 3 - -.LP -.LP -\f2\-altsignerpath /home/user/lib/authsigner.jar\fP -.LP -.RE -.LP -Note that the JAR file name is included. -.LP +.nf +\f3 +.fl +\-altsignerpath /home/user/lib/authsigner.jar +.fl +\fP +.fi +Note that the JAR file name is included. +.br +.br Example of specifying the path to the jar file that contains the class file: -.RS 3 -.LP -\f2\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/\fP -.LP -.RE -.LP -Note that the JAR file name is omitted. +.nf +\f3 +.fl +\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/ +.fl +\fP +.fi +Note that the JAR file name is omitted. .TP 3 \-strict During the signing or verifying process, some warning messages may be shown. If this option appears on the command line, the exit code of the tool will reflect the warning messages that are found. Read the "WARNINGS" section for details. @@ -712,25 +680,22 @@ During the signing or verifying process, some warning messages may be shown. If \-verbose:sub\-options For the verifying process, the \f2\-verbose\fP option takes sub\-options to determine how much information will be shown. If \f2\-certs\fP is also specified, the default mode (or sub\-option all) displays each entry as it is being processed and following that, the certificate information for each signer of the JAR file. If \f2\-certs\fP and the \f2\-verbose:grouped\fP sub\-option are specified, entries with the same signer info are grouped and displayed together along with their certificate information. If \f2\-certs\fP and the \f2\-verbose:summary\fP sub\-option are specified, then entries with the same signer info are grouped and displayed together along with their certificate information but details about each entry are summarized and displayed as "one entry (and more)". See the examples section for more information. .RE -.SH "EXAMPLES" -.LP +.LP +.SH "EXAMPLES" .LP .SS Signing a JAR File -.LP -.RS 3 - .LP .LP -Suppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory. Suppose the keystore password is "myspass" and the password for \f2jane\fP's private key is "j638klm". You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar": +Suppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory. You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar": .LP .nf \f3 .fl - jarsigner \-keystore /working/mystore \-storepass myspass + jarsigner \-keystore /working/mystore \-storepass \fP\f4\fP\f3 .fl - \-keypass j638klm \-signedjar sbundle.jar bundle.jar jane + \-keypass \fP\f4\fP\f3 \-signedjar sbundle.jar bundle.jar jane .fl \fP .fi @@ -747,7 +712,7 @@ If you want to be prompted for the store password and the private key password, .fl jarsigner \-keystore /working/mystore .fl - \-signedjar sbundle.jar bundle.jar jane + \-signedjar sbundle.jar bundle.jar jane .fl \fP .fi @@ -759,7 +724,7 @@ If the keystore to be used is the default keystore (the one named ".keystore" in .nf \f3 .fl - jarsigner \-signedjar sbundle.jar bundle.jar jane + jarsigner \-signedjar sbundle.jar bundle.jar jane .fl \fP .fi @@ -771,18 +736,14 @@ Finally, if you want the signed JAR file to simply overwrite the input JAR file .nf \f3 .fl - jarsigner bundle.jar jane + jarsigner bundle.jar jane .fl \fP .fi -.RE .LP .SS Verifying a Signed JAR File -.LP -.RS 3 - .LP .LP To verify a signed JAR file, that is, to verify that the signature is valid and the JAR file has not been tampered with, use a command such as the following: @@ -790,7 +751,7 @@ To verify a signed JAR file, that is, to verify that the signature is valid and .nf \f3 .fl - jarsigner \-verify sbundle.jar + jarsigner \-verify sbundle.jar .fl \fP .fi @@ -851,7 +812,7 @@ You can get more information if you use the \f2\-verbose\fP option. A sample use Verification with Certificate Information .LP .LP -If you specify the \f2\-certs\fP option when verifying, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (iff it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example, +If you specify the \f2\-certs\fP option when verifying, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (if and only if it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example, .LP .nf \f3 @@ -961,10 +922,7 @@ When the \f2\-certs\fP option is used, any identity database aliases are shown i .LP Note that the alias "duke" is in brackets to denote that it is an identity database alias, not a keystore alias. .LP -.RE .SH "WARNINGS" -.LP - .LP During the signing/verifying process, jarsigner may display various warnings. These warning codes are defined as follows: .nf @@ -980,25 +938,25 @@ During the signing/verifying process, jarsigner may display various warnings. Th .fl This jar contains entries whose signer certificate has expired. .fl - + .fl notYetValidCert 4 .fl This jar contains entries whose signer certificate is not yet valid. .fl - + .fl chainNotValidated 4 .fl This jar contains entries whose certificate chain cannot be correctly validated. .fl - + .fl badKeyUsage 8 .fl This jar contains entries whose signer certificate's KeyUsage extension doesn't allow code signing. .fl - + .fl badExtendedKeyUsage 8 .fl @@ -1006,33 +964,33 @@ During the signing/verifying process, jarsigner may display various warnings. Th .fl doesn't allow code signing. .fl - + .fl badNetscapeCertType 8 .fl - This jar contains entries whose signer certificate's NetscapeCertType extension + This jar contains entries whose signer certificate's NetscapeCertType extension .fl doesn't allow code signing. .fl - + .fl hasUnsignedEntry 16 .fl This jar contains unsigned entries which have not been integrity\-checked. .fl - + .fl notSignedByAlias 32 .fl This jar contains signed entries which are not signed by the specified alias(es) .fl - + .fl aliasNotInStore 32 .fl This jar contains signed entries that are not signed by alias in this keystore .fl - + .fl \fP .fi @@ -1042,23 +1000,19 @@ During the signing/verifying process, jarsigner may display various warnings. Th When the \f2\-strict\fP option is provided, an OR\-value of warnings detected will be returned as the exit code of the tool. For example, if a certificate used to sign an entry is expired and has a keyUsage extension that does not allow it to sign a file, an exit code 12 (=4+8) will be returned. .LP .LP -\f3Note\fP: Exit codes are reused because only 0\-255 is legal for Unix. In any case, if the signing/verifying process fails, the exit code +\f3Note\fP: Exit codes are reused because only 0\-255 is legal for Unix. In any case, if the signing/verifying process fails, the following exit code will be returned: .LP .nf \f3 .fl -failure 1 +failure 1 .fl \fP .fi .LP -will be returned. .SS Compatibility with JDK 1.1 -.LP -.RS 3 - .LP .LP The \f3keytool\fP and \f3jarsigner\fP tools completely replace the \f3javakey\fP tool provided in JDK 1.1. These new tools provide more features than \f3javakey\fP, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them. @@ -1083,7 +1037,6 @@ o The following table explains how JAR files that were signed in JDK 1.1.x are treated in the Java 2 platform. .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -1390,7 +1343,7 @@ Default privileges granted to all code plus privileges granted in policy file. ( .nr 44 \n(83+(3*\n(38) .nr 84 +\n(44 .nr TW \n(84 -.if t .if \n(TW>\n(.li .tm Table at line 1128 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 1082 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1566,7 +1519,6 @@ Default privileges granted to all code plus privileges granted in policy file. ( .rm g+ .rm h+ .rm i+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-42 .LP @@ -1590,8 +1542,6 @@ Only trusted identities can be imported into Java 2 SDK keystores. .LP .SH "SEE ALSO" -.LP - .LP .RS 3 .TP 2 @@ -1606,13 +1556,12 @@ the .na \f4Security\fP @ .fi -http://java.sun.com/docs/books/tutorial/security/index.html trail of the +http://download.oracle.com/javase/tutorial/security/index.html trail of the .na \f4Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/index.html for examples of the use of the \f3jarsigner\fP tool +http://download.oracle.com/javase/tutorial/index.html for examples of the use of the \f3jarsigner\fP tool .RE .LP -.RE diff --git a/src/linux/doc/man/java.1 b/src/linux/doc/man/java.1 index 1f436ff9ebecccd2f7fe11fae12df09d8440deea..2e885083a8bd77fa1c1307c59e54c9335bae73c4 100644 --- a/src/linux/doc/man/java.1 +++ b/src/linux/doc/man/java.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH java 1 "02 Jun 2010" +.TH java 1 "10 May 2011" .LP .SH "Name" @@ -36,9 +36,6 @@ java \- the Java application launcher .fl .fi -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -56,10 +53,7 @@ Argument passed to the \f3main\fP function. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The \f3java\fP tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's \f3main\fP method. @@ -70,7 +64,7 @@ The method must be declared public and static, it must not return any value, and .nf \f3 .fl - public static void main(String args[]) +public static void main(String args[]) .fl \fP .fi @@ -86,77 +80,80 @@ The Java runtime searches for the startup class, and other classes used, in thre Non\-option arguments after the class name or JAR file name are passed to the \f3main\fP function. .LP .SH "OPTIONS" -.LP - .LP .LP The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the current implementations of the virtual machines support a set of non\-standard options that are subject to change in future releases. .LP .SH "Standard Options" -.LP - .LP .RS 3 .TP 3 \-client -.LP -Select the Java HotSpot Client VM. A 64\-bit capable jdk currently ignores this option and instead uses the Java Hotspot Server VM. -.LP +Select the Java HotSpot Client VM. A 64\-bit capable jdk currently ignores this option and instead uses the Java Hotspot Server VM. +.br +.br For default VM selection, see .na \f2Server\-Class Machine Detection\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/vm/server\-class.html +http://download.oracle.com/javase/7/docs/technotes/guides/vm/server\-class.html .TP 3 \-server -.LP -Select the Java HotSpot Server VM. On a 64\-bit capable jdk only the Java Hotspot Server VM is supported so the \-server option is implicit. -.LP +Select the Java HotSpot Server VM. On a 64\-bit capable jdk only the Java Hotspot Server VM is supported so the \-server option is implicit. +.br +.br For default VM selection, see .na \f2Server\-Class Machine Detection\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/vm/server\-class.html +http://download.oracle.com/javase/7/docs/technotes/guides/vm/server\-class.html .TP 3 \-agentlib:libname[=options] -Load native agent library \f2libname\fP, e.g. -.LP -\-agentlib:hprof -.LP -\-agentlib:jdwp=help -.LP -\-agentlib:hprof=help -.LP +Load native agent library \f2libname\fP, e.g. +.br +.br +\-agentlib:hprof +.br +.br +\-agentlib:jdwp=help +.br +.br +\-agentlib:hprof=help +.br +.br For more information, see .na \f2JVMTI Agent Command Line Options\fP @ .fi -http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#starting. +http://download.oracle.com/javase/7/docs/platform/jvmti/jvmti.html#starting. .TP 3 \-agentpath:pathname[=options] Load a native agent library by full pathname. For more information, see .na \f2JVMTI Agent Command Line Options\fP @ .fi -http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#starting. +http://download.oracle.com/javase/7/docs/platform/jvmti/jvmti.html#starting. .TP 3 \-classpath classpath .TP 3 \-cp classpath -Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (\f3:\fP). Specifying \f3\-classpath\fP or \f3\-cp\fP overrides any setting of the \f3CLASSPATH\fP environment variable. -.LP +Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (\f3:\fP). Specifying \f3\-classpath\fP or \f3\-cp\fP overrides any setting of the \f3CLASSPATH\fP environment variable. +.br +.br If \f3\-classpath\fP and \f3\-cp\fP are not used and \f3CLASSPATH\fP is not set, the user class path consists of the current directory (\f4.\fP). -.LP +.br +.br As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations). .br .br For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. -.LP +.br +.br For more information on class paths, see .na \f2Setting the Class Path\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath. +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath. .TP 3 \-Dproperty=value Set a system property value. @@ -164,19 +161,23 @@ Set a system property value. \-d32 .TP 3 \-d64 -Request that the program to be run in a 32\-bit or 64\-bit environment, respectively. If the requested environment is not installed or is not supported, an error is reported. -.LP -Currently only the Java HotSpot Server VM supports 64\-bit operation, and the "\-server" option is implicit with the use of \-d64. And the "\-client" option is ignored with the use of \-d64. This is subject to change in a future release. -.LP -If neither \f3\-d32\fP nor \f3\-d64\fP is specified, the default is to run in a 32\-bit environment, except for 64\-bit only systems. This is subject to change in a future release. +Request that the program to be run in a 32\-bit or 64\-bit environment, respectively. If the requested environment is not installed or is not supported, an error is reported. +.br +.br +Currently only the Java HotSpot Server VM supports 64\-bit operation, and the "\-server" option is implicit with the use of \-d64. And the "\-client" option is ignored with the use of \-d64. This is subject to change in a future release. +.br +.br +If neither \f3\-d32\fP nor \f3\-d64\fP is specified, the default is to run in a 32\-bit environment, except for 64\-bit only systems. This is subject to change in a future release. .TP 3 \-enableassertions[:"..." | : ] .TP 3 \-ea[:"..." | : ] -Enable assertions. Assertions are disabled by default. -.LP -With no arguments, \f3enableassertions\fP or \f3\-ea\fP enables assertions. With one argument ending in \f2"..."\fP, the switch enables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch enables assertions in the specified class. -.LP +Enable assertions. Assertions are disabled by default. +.br +.br +With no arguments, \f3enableassertions\fP or \f3\-ea\fP enables assertions. With one argument ending in \f2"..."\fP, the switch enables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch enables assertions in the specified class. +.br +.br If a single command line contains multiple instances of these switches, they are processed in order before loading any classes. So, for example, to run a program with assertions enabled only in package \f2com.wombat.fruitbat\fP (and any subpackages), the following command could be used: .nf \f3 @@ -185,26 +186,26 @@ java \-ea:com.wombat.fruitbat...
.fl \fP .fi -.LP -The \f3\-enableassertions\fP and \f3\-ea\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-enablesystemassertions\fP below. +The \f3\-enableassertions\fP and \f3\-ea\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-enablesystemassertions\fP below. .TP 3 \-disableassertions[:"..." | : ] .TP 3 \-da[:"..." | : ] -Disable assertions. This is the default. -.LP -With no arguments, \f3disableassertions\fP or \f3\-da\fP disables assertions. With one argument ending in \f2"..."\fP, the switch disables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch disables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch disables assertions in the specified class. -.LP +Disable assertions. This is the default. +.br +.br +With no arguments, \f3disableassertions\fP or \f3\-da\fP disables assertions. With one argument ending in \f2"..."\fP, the switch disables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch disables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch disables assertions in the specified class. +.br +.br To run a program with assertions enabled in package \f2com.wombat.fruitbat\fP but disabled in class \f2com.wombat.fruitbat.Brickbat\fP, the following command could be used: .nf \f3 .fl -java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat
+java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat \fP\f4
\fP\f3 .fl \fP .fi -.LP -The \f3\-disableassertions\fP and \f3\-da\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-disablesystemassertions\fP below. +The \f3\-disableassertions\fP and \f3\-da\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-disablesystemassertions\fP below. .TP 3 \-enablesystemassertions .TP 3 @@ -215,29 +216,36 @@ Enable asserts in all system classes (sets the \f2default assertion status\fP fo .TP 3 \-dsa Disables asserts in all system classes. -.LP .TP 3 \-jar Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form \f3Main\-Class: \fP\f4classname\fP. Here, \f2classname\fP identifies the class having the \f2public\ static\ void\ main(String[]\ args)\fP method that serves as your application's starting point. See the jar(1) and the Jar trail of the .na \f2Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar for information about working with Jar files and Jar\-file manifests. -.LP -When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. -.LP +http://download.oracle.com/javase/tutorial/deployment/jar for information about working with Jar files and Jar\-file manifests. +.br +.br +When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. +.br +.br Note that JAR files that can be run with the "java \-jar" option can have their execute permissions set so they can be run without using "java \-jar". Refer to .na \f2Java Archive (JAR) Files\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/index.html. +http://download.oracle.com/javase/7/docs/technotes/guides/jar/index.html. .TP 3 \-javaagent:jarpath[=options] Load a Java programming language agent, see .na \f2java.lang.instrument\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/lang/instrument/package\-summary.html. +http://download.oracle.com/javase/7/docs/api/java/lang/instrument/package\-summary.html. +.TP 3 +\-jre\-restrict\-search +Include user\-private JREs in the version search. +.TP 3 +\-no\-jre\-restrict\-search +Exclude user\-private JREs in the version search. .TP 3 \-verbose .TP 3 @@ -254,8 +262,9 @@ Report information about use of native methods and other Java Native Interface a Display version information and exit. .TP 3 \-version:release -Specifies that the version specified by \f2release\fP is required by the class or jar file specified on the command line. If the version of the java command invoked does not meet this specification and an appropriate implementation is found on the system, the appropriate implementation will be used. -.LP +Specifies that the version specified by \f2release\fP is required by the class or jar file specified on the command line. If the version of the java command invoked does not meet this specification and an appropriate implementation is found on the system, the appropriate implementation will be used. +.br +.br \f2release\fP not only can specify an exact version, but can also specify a list of versions called a version string. A version string is an ordered list of version ranges separated by spaces. A version range is either a version\-id, a version\-id followed by a star (*), a version\-id followed by a plus sign (+) , or two version\-ranges combined using an ampersand (&). The star means prefix match, the plus sign means this version or greater, and the ampersand means the logical anding of the two version\-ranges. For example: .nf \f3 @@ -264,11 +273,13 @@ Specifies that the version specified by \f2release\fP is required by the class o .fl \fP .fi -The meaning of the above is that the class or jar file requires either version 1.6.0_13, or a version with 1.6 as a version\-id prefix and that is not less than 1.6.0_10.. The exact syntax and definition of version strings may be found in Appendix A of the Java Network Launching Protocol & API Specification (JSR\-56). -.LP -For jar files, the usual preference is to specify version requirements in the jar file manifest rather than on the command line. -.LP -See the following NOTES section for important policy information on the use of this option. +The meaning of the above is that the class or jar file requires either version 1.6.0_13, or a version with 1.6 as a version\-id prefix and that is not less than 1.6.0_10.. The exact syntax and definition of version strings may be found in Appendix A of the Java Network Launching Protocol & API Specification (JSR\-56). +.br +.br +For jar files, the usual preference is to specify version requirements in the jar file manifest rather than on the command line. +.br +.br +See the following NOTES section for important policy information on the use of this option. .TP 3 \-showversion Display version information and continue. @@ -278,6 +289,9 @@ Display version information and continue. \-help Display usage information and exit. .TP 3 +\-splash:imagepath +Show splash screen with image specified by \f2imagepath\fP. +.TP 3 \-X Display information about non\-standard options and exit. .RE @@ -285,9 +299,6 @@ Display information about non\-standard options and exit. .LP .SS Non\-Standard Options -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -319,18 +330,20 @@ Disable class garbage collection. Use of this option will prevent memory recover Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will reduce the occasional long garbage\-collection pauses during program execution. The incremental garbage collector will at times execute concurrently with the program and during such times will reduce the processor capacity available to the program. .TP 3 \-Xloggc:file -Report on each garbage collection event, as with \-verbose:gc, but log this data to \f2file\fP. In addition to the information \f2\-verbose:gc\fP gives, each reported event will be preceeded by the time (in seconds) since the first garbage\-collection event. -.LP -Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides \f2\-verbose:gc\fP if both are given on the command line. -.LP +Report on each garbage collection event, as with \-verbose:gc, but log this data to \f2file\fP. In addition to the information \f2\-verbose:gc\fP gives, each reported event will be preceeded by the time (in seconds) since the first garbage\-collection event. +.br +.br +Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides \f2\-verbose:gc\fP if both are given on the command line. .TP 3 \-Xmsn -Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics +Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see +.na +\f2HotSpot Ergonomics\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/vm/gc\-ergonomics.html +.br .br Examples: -.RS 3 - -.LP .nf \f3 .fl @@ -340,19 +353,20 @@ Examples: .fl \-Xms6m .fl - + .fl \fP .fi -.RE .TP 3 \-Xmxn -Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics +Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see +.na +\f2HotSpot Ergonomics\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/vm/gc\-ergonomics.html +.br .br Examples: -.RS 3 - -.LP .nf \f3 .fl @@ -362,28 +376,31 @@ Examples: .fl \-Xmx80m .fl - + .fl \fP .fi -.RE On Solaris 7 and Solaris 8 SPARC platforms, the upper limit for this value is approximately 4000m minus overhead amounts. On Solaris 2.6 and x86 platforms, the upper limit is approximately 2000m minus overhead amounts. On Linux platforms, the upper limit is approximately 2000m minus overhead amounts. .TP 3 \-Xprof Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be used in production systems. -.LP .TP 3 \-Xrs -Reduces use of operating\-system signals by the Java virtual machine (JVM). -.LP -In a previous release, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly. -.LP -Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks. -.LP -The JVM uses a similar mechanism to implement the pre\-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps. -.LP -Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. The \f3\-Xrs\fP command\-line option is available to address this issue. When \f3\-Xrs\fP is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed. -.LP +Reduces use of operating\-system signals by the Java virtual machine (JVM). +.br +.br +In a previous release, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly. +.br +.br +Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks. +.br +.br +The JVM uses a similar mechanism to implement the pre\-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps. +.br +.br +Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. The \f3\-Xrs\fP command\-line option is available to address this issue. When \f3\-Xrs\fP is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed. +.br +.br There are two consequences of specifying \f3\-Xrs\fP: .RS 3 .TP 2 @@ -402,12 +419,11 @@ The VM uses \f2SIGUSR1\fP and \f2SIGUSR2\fP by default, which can sometimes conf .RE .LP -.RE .SH "NOTES" .LP - .LP -The \f3\-version:\fP\f2release\fP command line option places no restrictions on the complexity of the release specification. However, only a restricted subset of the possible release specifications represent sound policy and only these are fully supported. These policies are: +The \f3\-version:\fP\f2release\fP command line option places no restrictions on the complexity of the release specification. However, only a restricted subset of the possible release specifications represent sound policy and only these are fully supported. These policies are: +.LP .RS 3 .TP 3 1. @@ -422,8 +438,7 @@ Any version greater than an arbitrarily precise version\-id. For example: .fl \fP .fi -.LP -Would utilize any version greater than 1.6.0_10. This is useful for a case where an interface was introduced (or a bug fixed) in the release specified. +This would utilize any version greater than \f21.6.0_10\fP. This is useful for a case where an interface was introduced (or a bug fixed) in the release specified. .TP 3 3. A version greater than an arbitrarily precise version\-id, bounded by the upper bound of that release family. For example: @@ -448,9 +463,22 @@ Similar to item 2. this is useful when a change was introduced in a release (1.7 .RE .LP -.SH "SEE ALSO" +.SH "EXIT STATUS" +.LP +.LP +The following exit values are generally returned by the launcher, typically when the launcher is called with the wrong arguments, serious errors, or exceptions thrown from the Java Virtual Machine. However, a Java application may choose to return any value using the API call \f2System.exit(exitValue)\fP. .LP +.RS 3 +.TP 2 +o +\f20\fP: Successful completion +.TP 2 +o +\f2>0\fP: An error occurred +.RE +.LP +.SH "SEE ALSO" .LP .RS 3 .TP 2 @@ -470,13 +498,13 @@ o .na \f2The Java Extensions Framework\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/extensions/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/extensions/index.html .TP 2 o .na \f2Security Features\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/index.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/index.html. .TP 2 o .na diff --git a/src/linux/doc/man/javac.1 b/src/linux/doc/man/javac.1 index 7e01a50e98974142393f49a357e45e2a78ec0f2e..3f3b5733f0ad95961c3943ba20545ea97af6de95 100644 --- a/src/linux/doc/man/javac.1 +++ b/src/linux/doc/man/javac.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,31 +19,26 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javac 1 "02 Jun 2010" +.TH javac 1 "10 May 2011" .LP .SH "Name" javac \- Java programming language compiler .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 .fl \fP\f3javac\fP [ options ] [ sourcefiles ] [ classes ] [ @argfiles ] .fl - + .fl .fi .LP .LP Arguments may be in any order. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -61,10 +56,7 @@ One or more files that lists options and source files. The \f2\-J\fP options are .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The \f3javac\fP tool reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. It can also process annotations in Java source files and classes. @@ -95,17 +87,12 @@ You should arrange source files in a directory tree that reflects their package By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with \f3\-d\fP (see Options, below). .LP .SH "OPTIONS" -.LP - .LP .LP The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non\-standard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Non\-standard options begin with \f3\-X\fP. .LP .SS Standard Options -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -113,20 +100,13 @@ Standard Options Options to pass to annotation processors. These are not interpreted by javac directly, but are made available for use by individual processors. \f2key\fP should be one or more identifiers separated by ".". .TP 3 \-cp path or \-classpath path -Specify where to find user class files, and (optionally) annotation processors and source files. This classpath overrides the user class path in the \f3CLASSPATH\fP environment variable. If neither \f3CLASSPATH\fP, \f3\-cp\fP nor \f3\-classpath\fP is specified, the user class path consists of the current directory. See -.na -\f2Setting the Class Path\fP @ -.fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath for more details. -.LP -If the \f3\-sourcepath\fP option is not specified, the user class path is also searched for source files. -.LP -If the \f3\-processorpath\fP option is not specified, the classpath is also searched for annotation processors. -.LP -As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP. +Specify where to find user class files, and (optionally) annotation processors and source files. This class path overrides the user class path in the \f3CLASSPATH\fP environment variable. If neither \f3CLASSPATH\fP, \f3\-cp\fP nor \f3\-classpath\fP is specified, the user class path consists of the current directory. See Setting the Class Path for more details. .br .br -For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. \f3Note:\fP \ Depending of the configuration of your command line environment, you may have to quote the wild card character, for example, \f2javac \-cp "*.jar" MyClass.java\fP. +>If the \f3\-sourcepath\fP option is not specified, the user class path is also searched for source files. +.br +.br +If the \f3\-processorpath\fP option is not specified, the class path is also searched for annotation processors. .TP 3 \-Djava.ext.dirs=directories Override the location of installed extensions. @@ -135,17 +115,28 @@ Override the location of installed extensions. Override the location of endorsed standards path. .TP 3 \-d directory -Set the destination directory for class files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, \f3javac\fP puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-d /home/myclasses\fP and the class is called \f2com.mypackage.MyClass\fP, then the class file is called \f2/home/myclasses/com/mypackage/MyClass.class\fP. -.LP -If \f3\-d\fP is not specified, \f3javac\fP puts each class files in the same directory as the source file from which it was generated. -.LP -\f3Note:\fP \ The directory specified by \f3\-d\fP is not automatically added to your user class path. +Set the destination directory for class files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, \f3javac\fP puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-d /home/myclasses\fP and the class is called \f2com.mypackage.MyClass\fP, then the class file is called \f2/home/myclasses/com/mypackage/MyClass.class\fP. +.br +.br +If \f3\-d\fP is not specified, \f3javac\fP puts each class files in the same directory as the source file from which it was generated. +.br +.br +\f3Note:\fP The directory specified by \f3\-d\fP is not automatically added to your user class path. .TP 3 \-deprecation Show a description of each use or override of a deprecated member or class. Without \f3\-deprecation\fP, \f3javac\fP shows a summary of the source files that use or override deprecated members or classes. \f3\-deprecation\fP is shorthand for \f3\-Xlint:deprecation\fP. .TP 3 \-encoding encoding -Set the source file encoding name, such as \f2EUC\-JP and UTF\-8\fP. If \f3\-encoding\fP is not specified, the platform default converter is used. +Set the source file encoding name, such as \f2EUC\-JP and UTF\-8\fP. If \f3\-encoding\fP is not specified, the platform default converter is used. +.TP 3 +\-endorseddirs directories +Override the location of endorsed standards path. +.TP 3 +\-extdirs directories +Overrides the location of the \f2ext\fP directory. The \f2directories\fP variable is a colon\-separated list of directories. Each JAR archive in the specified directories is searched for class files. All JAR archives found are automatically part of the class path. +.br +.br +If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), this option specifies the directories that contain the extension classes. See Cross\-Compilation Options for more information. .TP 3 \-g Generate all debugging information, including local variables. By default, only line number and source file information is generated. @@ -171,7 +162,13 @@ Local variable debugging information Print a synopsis of standard options. .TP 3 \-implicit:{class,none} -Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use \f3\-implicit:class\fP. To suppress class file generation, use \f3\-implicit:none\fP. If this option is not specified, the default is to automatically generate class files. In this case, the compiler will issue a warning if any such class files are generated when also doing annotation processing. The warning will not be issued if this option is set explicitly. See Searching For Types. +Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use \f3\-implicit:class\fP. To suppress class file generation, use \f3\-implicit:none\fP. If this option is not specified, the default is to automatically generate class files. In this case, the compiler will issue a warning if any such class files are generated when also doing annotation processing. The warning will not be issued if this option is set explicitly. See Searching For Types. +.TP 3 +\-Joption +Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java. +.br +.br +\f3Note:\fP \f3CLASSPATH\fP, \f3\-classpath\fP, \f3\-bootclasspath\fP, and \f3\-extdirs\fP do \f2not\fP specify the classes used to run \f3javac\fP. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the \f3\-J\fP option to pass through options to the underlying \f3java\fP launcher. .TP 3 \-nowarn Disable warning messages. This has the same meaning as \f3\-Xlint:none\fP. @@ -183,7 +180,7 @@ Controls whether annotation processing and/or compilation is done. \f3\-proc:non Names of the annotation processors to run. This bypasses the default discovery process. .TP 3 \-processorpath path -Specify where to find annotation processors; if this option is not used, the classpath will be searched for processors. +Specify where to find annotation processors; if this option is not used, the class path will be searched for processors. .TP 3 \-s dir Specify the directory where to place generated source files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, the compiler puts the source file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-s /home/mysrc\fP and the class is called \f2com.mypackage.MyClass\fP, then the source file will be placed in \f2/home/mysrc/com/mypackage/MyClass.java\fP. @@ -218,27 +215,27 @@ Synonym for 1.7. .RE .TP 3 \-sourcepath sourcepath -Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. -.LP -\f3Note:\fP \ Classes found through the classpath may be subject to automatic recompilation if their sources are also found. See Searching For Types. +Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. +.br +.br +\f3Note:\fP Classes found through the class path may be subject to automatic recompilation if their sources are also found. See Searching For Types. .TP 3 \-verbose Verbose output. This includes information about each class loaded and each source file compiled. .TP 3 \-version -Print version information. +Print version information. +.TP 3 +\-Werror +Terminate compilation if warnings occur. .TP 3 \-X Display information about non\-standard options and exit. .RE .LP -.RE .SS Cross\-Compilation Options -.LP -.RS 3 - .LP .LP By default, classes are compiled against the bootstrap and extension classes of the platform that \f3javac\fP shipped with. But \f3javac\fP also supports \f2cross\-compiling\fP, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use \f3\-bootclasspath\fP and \f3\-extdirs\fP when cross\-compiling; see Cross\-Compilation Example below. @@ -246,13 +243,14 @@ By default, classes are compiled against the bootstrap and extension classes of .RS 3 .TP 3 \-target version -Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are \f31.1\fP \f31.2\fP \f31.3\fP \f31.4\fP \f31.5\fP (also \f35\fP) \f31.6\fP (also \f36\fP) and \f31.7\fP (also \f37\fP). -.LP +Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are \f31.1\fP \f31.2\fP \f31.3\fP \f31.4\fP \f31.5\fP (also \f35\fP) \f31.6\fP (also \f36\fP) and \f31.7\fP (also \f37\fP). +.br +.br The default for \f3\-target\fP depends on the value of \f3\-source\fP: .RS 3 .TP 2 o -If \-source is \f3not specified\fP, the value of \-target is \f31.6\fP +If \-source is \f3not specified\fP, the value of \-target is \f31.7\fP .TP 2 o If \-source is \f31.2\fP, the value of \-target is \f31.4\fP @@ -261,23 +259,16 @@ o If \-source is \f31.3\fP, the value of \-target is \f31.4\fP .TP 2 o -For \f3all other values\fP of \-source, the value of \-target is the value of \f3\-source\fP. +For \f3all other values\fP of \-source, the value of \f3\-target\fP is the value of \f3\-source\fP. .RE .TP 3 \-bootclasspath bootclasspath Cross\-compile against the specified set of boot classes. As with the user class path, boot class path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. -.TP 3 -\-extdirs directories -Cross\-compile against the specified extension directories. \f2Directories\fP is a colon\-separated list of directories. Each JAR archive in the specified directories is searched for class files. .RE .LP -.RE .SS Non\-Standard Options -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -291,31 +282,132 @@ Append to the bootstrap class path. Override location of bootstrap class files. .TP 3 \-Xlint -Enable all recommended warnings. In this release, all available warnings are recommended. +Enable all recommended warnings. In this release, enabling all available warnings is recommended. +.TP 3 +\-Xlint:all +Enable all recommended warnings. In this release, enabling all available warnings is recommended. .TP 3 \-Xlint:none -Disable all warnings not mandated by the Java Language Specification. +Disable all warnings. +.TP 3 +\-Xlint:name +Enable warning \f2name\fP. See the section Warnings That Can Be Enabled or Disabled with \-Xlint Option for a list of warnings you can enable with this option. .TP 3 \-Xlint:\-name -Disable warning \f2name\fP, where \f2name\fP is one of the warning names supported for \f3\-Xlint:\fP\f2name\fP, below. +Disable warning \f2name\fP. See the section Warnings That Can Be Enabled or Disabled with \-Xlint Option for a list of warnings you can disable with this option. .TP 3 -\-Xlint:unchecked -Give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. +\-Xmaxerrs number +Set the maximum number of errors to print. .TP 3 -\-Xlint:path -Warn about nonexistent path (classpath, sourcepath, etc) directories. +\-Xmaxwarns number +Set the maximum number of warnings to print. .TP 3 -\-Xlint:serial -Warn about missing \f2serialVersionUID\fP definitions on serializable classes. +\-Xstdout filename +Send compiler messages to the named file. By default, compiler messages go to \f2System.err\fP. .TP 3 -\-Xlint:finally -Warn about \f2finally\fP clauses that cannot complete normally. +\-Xprefer:{newer,source} +Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If \f2\-Xprefer:newer\fP is used, it reads the newer of the source or class file for a type (default). If the \f2\-Xprefer:source\fP option is used, it reads source file. Use \f2\-Xprefer:source\fP when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f2SOURCE\fP. .TP 3 -\-Xlint:fallthrough -Check \f2switch\fP blocks for fall\-through cases and provide a warning message for any that are found. Fall\-through cases are cases in a \f2switch\fP block, other than the last case in the block, whose code does not include a \f2break\fP statement, allowing code execution to "fall through" from that case to the next case. For example, the code following the \f2case 1\fP label in this \f2switch\fP block does not end with a \f2break\fP statement: -.RS 3 +\-Xpkginfo:{always,legacy,nonempty} +Specify handling of package\-info files +.TP 3 +\-Xprint +Print out textual representation of specified types for debugging purposes; perform neither annotation processing nor compilation. The format of the output may change. +.TP 3 +\-XprintProcessorInfo +Print information about which annotations a processor is asked to process. +.TP 3 +\-XprintRounds +Print information about initial and subsequent annotation processing rounds. +.RE .LP +.SS +Warnings That Can Be Enabled or Disabled with \-Xlint Option +.LP +.LP +Enable warning \f2name\fP with the option \f3\-Xlint:\fP\f2name\fP, where \f2name\fP is one of the following warning names. Similarly, you can disable warning \f2name\fP with the option \f3\-Xlint:\-\fP\f2name\fP: +.LP +.RS 3 +.TP 3 +cast +Warn about unnecessary and redundant casts. For example: +.nf +\f3 +.fl +String s = (String)"Hello!" +.fl +\fP +.fi +.TP 3 +classfile +Warn about issues related to classfile contents. +.TP 3 +deprecation +Warn about use of deprecated items. For example: +.nf +\f3 +.fl + java.util.Date myDate = new java.util.Date(); +.fl + int currentDay = myDate.getDay(); +.fl +\fP +.fi +The method \f2java.util.Date.getDay\fP has been deprecated since JDK 1.1. +.TP 3 +dep\-ann +Warn about items that are documented with an \f2@deprecated\fP Javadoc comment, but do not have a \f2@Deprecated\fP annotation. For example: +.nf +\f3 +.fl + /** +.fl + * @deprecated As of Java SE 7, replaced by {@link #newMethod()} +.fl + */ +.fl + +.fl + public static void deprecatedMethood() { } +.fl + +.fl + public static void newMethod() { } +.fl +\fP +.fi +.TP 3 +divzero +Warn about division by constant integer 0. For example: +.nf +\f3 +.fl + int divideByZero = 42 / 0; +.fl +\fP +.fi +.TP 3 +empty +Warn about empty statements after \f2if\fP statements. For example: +.nf +\f3 +.fl +class E { +.fl + void m() { +.fl + if (true) ; +.fl + } +.fl +} +.fl +\fP +.fi +.TP 3 +fallthrough +Check \f2switch\fP blocks for fall\-through cases and provide a warning message for any that are found. Fall\-through cases are cases in a \f2switch\fP block, other than the last case in the block, whose code does not include a \f2break\fP statement, allowing code execution to "fall through" from that case to the next case. For example, the code following the \f2case 1\fP label in this \f2switch\fP block does not end with a \f2break\fP statement: .nf \f3 .fl @@ -325,64 +417,324 @@ case 1: .fl System.out.println("1"); .fl - // No break; statement here. + // No break statement here. .fl case 2: .fl System.out.println("2"); .fl } -.fl - .fl \fP .fi -.RE If the \f2\-Xlint:fallthrough\fP flag were used when compiling this code, the compiler would emit a warning about "possible fall\-through into case," along with the line number of the case in question. .TP 3 -\-Xmaxerrs number -Set the maximum number of errors to print. +finally +Warn about \f2finally\fP clauses that cannot complete normally. For example: +.nf +\f3 +.fl + public static int m() { +.fl + try { +.fl + throw new NullPointerException(); +.fl + } catch (NullPointerException e) { +.fl + System.err.println("Caught NullPointerException."); +.fl + return 1; +.fl + } finally { +.fl + return 0; +.fl + } +.fl + } +.fl +\fP +.fi +The compiler generates a warning for \f2finally\fP block in this example. When this method is called, it returns a value of \f20\fP, not \f21\fP. A \f2finally\fP block always executes when the \f2try\fP block exits. In this example, if control is transferred to the \f2catch\fP, then the method exits. However, the \f2finally\fP block must be executed, so it is executed, even though control has already been transferred outside the method. .TP 3 -\-Xmaxwarns number -Set the maximum number of warnings to print. +options +Warn about issues relating to the use of command line options. See Cross\-Compilation Example for an example of this kind of warning. .TP 3 -\-Xstdout filename -Send compiler messages to the named file. By default, compiler messages go to \f2System.err\fP. +overrides +Warn about issues regarding method overrides. For example, consider the following two classes: +.nf +\f3 +.fl +public class ClassWithVarargsMethod { +.fl + void varargsMethod(String... s) { } +.fl +} +.fl +\fP +.fi +.nf +\f3 +.fl +public class ClassWithOverridingMethod extends ClassWithVarargsMethod { +.fl + @Override +.fl + void varargsMethod(String[] s) { } +.fl +} +.fl +\fP +.fi +The compiler generates a warning similar to the following: +.br +.br +\f2warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding method is missing '...'\fP +.br +.br +When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. In the method \f2ClassWithVarargsMethod.varargsMethod\fP, the compiler translates the varargs formal parameter \f2String... s\fP to the formal parameter \f2String[] s\fP, an array, which matches the formal parameter of the method \f2ClassWithOverridingMethod.varargsMethod\fP. Consequently, this example compiles. .TP 3 -\-Xprefer:{newer,source} -Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If \f2\-Xprefer:newer\fP is used, it reads the newer of the source or class file for a type (default). If the \f2\-Xprefer:source\fP option is used, it reads source file. Use \f2\-Xprefer:source\fP when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f2SOURCE\fP. +path +Warn about invalid path elements and nonexistent path directories on the command line (with regards to the class path, the source path, and other paths). Such warnings cannot be suppressed with the \f2@SuppressWarnings\fP annotation. For example: +.nf +\f3 +.fl +javac \-Xlint:path \-classpath /nonexistentpath Example.java +.fl +\fP +.fi .TP 3 -\-Xprint -Print out textual representation of specified types for debugging purposes; perform neither annotation processing nor compilation. The format of the output may change. +processing +Warn about issues regarding annotation processing. The compiler generates this warning if you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception. For example, the following is a simple annotation processor: +.br +.br +\f3Source file \fP\f4AnnoProc.java\fP: +.nf +\f3 +.fl +import java.util.*; +.fl +import javax.annotation.processing.*; +.fl +import javax.lang.model.*; +.fl +import javax.lang.model.element.*; +.fl + +.fl +@SupportedAnnotationTypes("NotAnno") +.fl +public class AnnoProc extends AbstractProcessor { +.fl + public boolean process(Set elems, RoundEnvironment renv) { +.fl + return true; +.fl + } +.fl + +.fl + public SourceVersion getSupportedSourceVersion() { +.fl + return SourceVersion.latest(); +.fl + } +.fl +} +.fl +\fP +.fi +\f3Source file \fP\f4AnnosWithoutProcessors.java\fP\f3:\fP +.nf +\f3 +.fl +@interface Anno { } +.fl + +.fl +@Anno +.fl +class AnnosWithoutProcessors { } +.fl +\fP +.fi +The following commands compile the annotation processor \f2AnnoProc\fP, then run this annotation processor against the source file \f2AnnosWithoutProcessors.java\fP: +.nf +\f3 +.fl +% javac AnnoProc.java +.fl +% javac \-cp . \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors.java +.fl +\fP +.fi +When the compiler runs the annotation processor against the source file \f2AnnosWithoutProcessors.java\fP, it generates the following warning: +.br +.br +\f2warning: [processing] No processor claimed any of these annotations: Anno\fP +.br +.br +To resolve this issue, you can rename the annotation defined and used in the class \f2AnnosWithoutProcessors\fP from \f2Anno\fP to \f2NotAnno\fP. .TP 3 -\-XprintProcessorInfo -Print information about which annotations a processor is asked to process. +rawtypes +Warn about unchecked operations on raw types. The following statement generates a \f2rawtypes\fP warning: +.nf +\f3 +.fl +void countElements(List l) { ... } +.fl +\fP +.fi +The following does not generate a \f2rawtypes\fP warning: +.nf +\f3 +.fl +void countElements(List l) { ... } +.fl +\fP +.fi +\f2List\fP is a raw type. However, \f2List\fP is a unbounded wildcard parameterized type. Because \f2List\fP is a parameterized interface, you should always specify its type argument. In this example, the \f2List\fP formal argument is specified with a unbounded wildcard (\f2?\fP) as its formal type parameter, which means that the \f2countElements\fP method can accept any instantiation of the \f2List\fP interface. .TP 3 -\-XprintRounds -Print information about initial and subsequent annotation processing rounds. -.RE +serial +Warn about missing \f2serialVersionUID\fP definitions on serializable classes. For example: +.nf +\f3 +.fl +public class PersistentTime implements Serializable +.fl +{ +.fl + private Date time; +.fl -.LP -.RE -.SS -The \-J Option -.LP -.RS 3 +.fl + public PersistentTime() { +.fl + time = Calendar.getInstance().getTime(); +.fl + } +.fl -.LP -.RS 3 +.fl + public Date getTime() { +.fl + return time; +.fl + } +.fl +} +.fl +\fP +.fi +The compiler generates the following warning: +.br +.br +\f2warning: [serial] serializable class PersistentTime has no definition of serialVersionUID\fP +.br +.br +If a serializable class does not explicitly declare a field named \f2serialVersionUID\fP, then the serialization runtime will calculate a default \f2serialVersionUID\fP value for that class based on various aspects of the class, as described in the Java Object Serialization Specification. However, it is strongly recommended that all serializable classes explicitly declare \f2serialVersionUID\fP values because the default process of computing \f2serialVersionUID\fP vales is highly sensitive to class details that may vary depending on compiler implementations, and can thus result in unexpected \f2InvalidClassExceptions\fP during deserialization. Therefore, to guarantee a consistent \f2serialVersionUID\fP value across different Java compiler implementations, a serializable class must declare an explicit \f2serialVersionUID\fP value. .TP 3 -\-Joption -Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f3\-X\fP, it is not a `standard option' of \f3javac\fP. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java. -.LP -\f3Note:\fP \ \f3CLASSPATH\fP, \f3\-classpath\fP, \f3\-bootclasspath\fP, and \f3\-extdirs\fP do \f2not\fP specify the classes used to run \f3javac\fP. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the \f3\-J\fP option to pass through options to the underlying \f3java\fP launcher. +static +Warn about issues relating to use of statics. For example: +.nf +\f3 +.fl +class XLintStatic { +.fl + static void m1() { } +.fl + void m2() { this.m1(); } +.fl +} +.fl +\fP +.fi +The compiler generates the following warning: +.nf +\f3 +.fl +warning: [static] static method should be qualified by type name, XLintStatic, instead of by an expression +.fl +\fP +.fi +To resolve this issue, you can call the static method \f2m1\fP as follows: +.nf +\f3 +.fl +XLintStatic.m1(); +.fl +\fP +.fi +Alternatively, you can remove the \f2static\fP keyword from the declaration of the method \f2m1\fP. +.TP 3 +try +Warn about issues relating to use of \f2try\fP blocks, including try\-with\-resources statements. For example, a warning is generated for the following statement because the resource \f2ac\fP declared in the \f2try\fP statement is not used: +.nf +\f3 +.fl +try ( AutoCloseable ac = getResource() ) { +.fl + // do nothing +.fl +} +.fl +\fP +.fi +.TP 3 +unchecked +Give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. For example: +.nf +\f3 +.fl + List l = new ArrayList(); +.fl + List ls = l; // unchecked warning +.fl +\fP +.fi +During type erasure, the types \f2ArrayList\fP and \f2List\fP become \f2ArrayList\fP and \f2List\fP, respectively. +.br +.br +The variable \f2ls\fP has the parameterized type \f2List\fP. When the \f2List\fP referenced by \f2l\fP is assigned to \f2ls\fP, the compiler generates an unchecked warning; the compiler is unable to determine at compile time, and moreover knows that the JVM will not be able to determine at runtime, if \f2l\fP refers to a \f2List\fP type; it does not. Consequently, heap pollution occurs. +.br +.br +In detail, a heap pollution situation occurs when the \f2List\fP object \f2l\fP, whose static type is \f2List\fP, is assigned to another \f2List\fP object, \f2ls\fP, that has a different static type, \f2List\fP. However, the compiler still allows this assignment. It must allow this assignment to preserve backwards compatibility with versions of Java SE that do not support generics. Because of type erasure, \f2List\fP and \f2List\fP both become \f2List\fP. Consequently, the compiler allows the assignment of the object \f2l\fP, which has a raw type of \f2List\fP, to the object \f2ls\fP. +.TP 3 +varargs +Warn about unsafe usages of variable arguments (varargs) methods, in particular, those that contain non\-reifiable arguments. For example: +.nf +\f3 +.fl +public class ArrayBuilder { +.fl + public static void addToList (List listArg, T... elements) { +.fl + for (T x : elements) { +.fl + listArg.add(x); +.fl + } +.fl + } +.fl +} +.fl +\fP +.fi +The compiler generates the following warning for the definition of the method \f2ArrayBuilder.addToList\fP: +.nf +\f3 +.fl +warning: [varargs] Possible heap pollution from parameterized vararg type T +.fl +\fP +.fi +When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. In the method \f2ArrayBuilder.addToList\fP, the compiler translates the varargs formal parameter \f2T... elements\fP to the formal parameter \f2T[] elements\fP, an array. However, because of type erasure, the compiler converts the varargs formal parameter to \f2Object[] elements\fP. Consequently, there is a possibility of heap pollution. .RE .LP -.RE .SH "COMMAND LINE ARGUMENT FILES" -.LP - .LP .LP To shorten or simplify the javac command line, you can specify one or more files that themselves contain arguments to the \f2javac\fP command (except \f2\-J\fP options). This enables you to create javac commands of any length on any operating system. @@ -405,9 +757,7 @@ You could use a single argument file named "\f2argfile\fP" to hold all javac arg .nf \f3 .fl - % \fP\f3javac @argfile\fP -.fl - +% \fP\f3javac @argfile\fP .fl .fi @@ -433,7 +783,7 @@ Create a file named "\f2options\fP" containing: .fl \-sourcepath /java/pubs/ws/1.3/src/share/classes .fl - + .fl \fP .fi @@ -451,7 +801,7 @@ Create a file named "\f2classes\fP" containing: .fl MyClass3.java .fl - + .fl \fP .fi @@ -465,7 +815,7 @@ You would then run \f3javac\fP with: .fl % \fP\f3javac @options @classes\fP .fl - + .fl .fi @@ -479,16 +829,12 @@ The argument files can have paths, but any filenames inside the files are relati .nf \f3 .fl - % \fP\f3javac @path1/options @path2/classes\fP -.fl - +% \fP\f3javac @path1/options @path2/classes\fP .fl .fi .LP .SH "ANNOTATION PROCESSING" -.LP - .LP .LP \f3javac\fP provides direct support for annotation processing, superseding the need for the separate annotation processing tool, \f3apt\fP. @@ -500,11 +846,7 @@ The API for annotation processors is defined in the \f2javax.annotation.processi Overview of annotation processing .LP .LP -Unless annotation processing is disabled with the \f3\-proc:none\fP option, the compiler searches for any annotation processors that are available. The search path can be specified with the \f3\-processorpath\fP option; if it is not given, the user class path is used. Processors are located by means of service provider\-configuration files named -.br -\f2\ META\-INF/services/javax.annotation.processing.Processor\fP -.br -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 \f3\-processor\fP option. +Unless annotation processing is disabled with the \f3\-proc:none\fP option, the compiler searches for any annotation processors that are available. The search path can be specified with the \f3\-processorpath\fP option; if it is not given, the user class path is used. Processors are located by means of service provider\-configuration files named \f2META\-INF/services/javax.annotation.processing.Processor\fP 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 \f3\-processor\fP option. .LP .LP After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process. When a match is found, the processor will be invoked. A processor may "claim" the annotations it processes, in which case no further attempt is made to find any processors for those annotations. Once all annotations have been claimed, the compiler does not look for additional processors. @@ -522,8 +864,6 @@ Implicitly loaded source files To compile a set of source files, the compiler may need to implicitly load additional source files. (See Searching For Types). Such files are currently not subject to annotation processing. By default, the compiler will give a warning if annotation processing has occurred and any implicitly loaded source files are compiled. See the \-implicit option for ways to suppress the warning. .LP .SH "SEARCHING FOR TYPES" -.LP - .LP .LP When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler 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 which provide information through inheritance. @@ -532,11 +872,7 @@ When compiling a source file, the compiler often needs information about a type For example, when you subclass \f3java.applet.Applet\fP, you are also using \f3Applet's\fP ancestor classes: \f3java.awt.Panel\fP, \f3java.awt.Container\fP, \f3java.awt.Component\fP, and \f3java.lang.Object\fP. .LP .LP -When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the \f3CLASSPATH\fP environment variable or by using the \f3\-classpath\fP command line option. (For details, see -.na -\f2Setting the Class Path\fP @ -.fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath). +When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the \f3CLASSPATH\fP environment variable or by using the \f3\-classpath\fP command line option. (For details, see Setting the Class Path). .LP .LP If you set the \-sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files. @@ -554,8 +890,6 @@ If a type search finds a source file for a required type, either by itself, or a The compiler may not discover the need for some type information until after annotation processing is complete. If the type information is found in a source file and no \f3\-implicit\fP option is given, the compiler will give 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 \f3\-implicit\fP option to specify whether or not class files should be generated for such source files. .LP .SH "PROGRAMMATIC INTERFACE" -.LP - .LP .LP \f3javac\fP supports the new Java Compiler API defined by the classes and interfaces in the \f2javax.tools\fP package. @@ -572,8 +906,6 @@ To perform a compilation using arguments as you would give on the command line, JavaCompiler javac = ToolProvider.getSystemJavaCompiler(); .fl int rc = javac.run(null, null, null, args); -.fl - .fl \fP .fi @@ -587,12 +919,9 @@ You can use other methods on the \f2javax.tools.JavaCompiler\fP interface to han .LP .SS Old Interface -.LP -.RS 3 - .LP .LP -\f3Note:\fP \ This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above. +\f3Note:\fP This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above. .LP .LP The \f2com.sun.tools.javac.Main\fP class provides two static methods to invoke the compiler from a program: @@ -603,8 +932,6 @@ The \f2com.sun.tools.javac.Main\fP class provides two static methods to invoke t public static int compile(String[] args); .fl public static int compile(String[] args, PrintWriter out); -.fl - .fl \fP .fi @@ -622,20 +949,13 @@ The return value is equivalent to the exit value from \f3javac\fP. .LP Note that all \f3other\fP classes and methods found in a package whose name starts with \f2com.sun.tools.javac\fP (informally known as sub\-packages of \f2com.sun.tools.javac\fP) are strictly internal and subject to change at any time. .LP -.RE .SH "EXAMPLES" .LP .SS Compiling a Simple Program -.LP -.RS 3 - .LP .LP One source file, \f2Hello.java\fP, defines a class called \f3greetings.Hello\fP. The \f2greetings\fP directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with \f3\-d\fP. -.LP -.RS 3 - .LP .nf \f3 @@ -681,25 +1001,15 @@ Hello World Hello Universe .fl Hello Everyone -.fl - .fl .fi -.RE .LP -.RE .SS Compiling Multiple Source Files -.LP -.RS 3 - .LP .LP This example compiles all the source files in the package \f2greetings\fP. -.LP -.RS 3 - .LP .nf \f3 @@ -719,27 +1029,15 @@ Aloha.java GutenTag.java Hello.java Hi.java Aloha.class GutenTag.class Hello.class Hi.class .fl Aloha.java GutenTag.java Hello.java Hi.java -.fl - -.fl - .fl .fi -.RE .LP -.RE .SS Specifying a User Class Path -.LP -.RS 3 - .LP .LP Having changed one of the source files in the previous example, we recompile it: -.LP -.RS 3 - .LP .nf \f3 @@ -749,35 +1047,23 @@ Having changed one of the source files in the previous example, we recompile it: /examples .fl % \f3javac greetings/Hi.java\fP -.fl - .fl .fi -.RE .LP .LP Since \f2greetings.Hi\fP refers to other classes in the \f2greetings\fP package, the compiler needs to find these other classes. The example above works, because our default user class path happens to be the directory containing the package directory. But suppose we want to recompile this file and not worry about which directory we're in? Then we need to add \f2/examples\fP to the user class path. We can do this by setting \f3CLASSPATH\fP, but here we'll use the \f3\-classpath\fP option. -.LP -.RS 3 - .LP .nf \f3 .fl % \fP\f3javac \-classpath /examples /examples/greetings/Hi.java\fP -.fl - .fl .fi -.RE .LP .LP If we change \f2greetings.Hi\fP again, to use a banner utility, that utility also needs to be accessible through the user class path. -.LP -.RS 3 - .LP .nf \f3 @@ -786,41 +1072,25 @@ If we change \f2greetings.Hi\fP again, to use a banner utility, that utility als .fl /examples/greetings/Hi.java\fP .fl - -.fl .fi -.RE .LP .LP To execute a class in \f2greetings\fP, we need access both to \f2greetings\fP and to the classes it uses. -.LP -.RS 3 - .LP .nf \f3 .fl % \fP\f3java \-classpath /examples:/lib/Banners.jar greetings.Hi\fP -.fl - .fl .fi -.RE .LP -.RE .SS Separating Source Files and Class Files -.LP -.RS 3 - .LP .LP It often makes sense to keep source files and class files in separate directories, especially on large projects. We use \f3\-d\fP to indicate the separate class file destination. Since the source files are not in the user class path, we use \f3\-sourcepath\fP to help the compiler find them. -.LP -.RS 3 - .LP .nf \f3 @@ -854,54 +1124,49 @@ farewells/ % \f3ls classes/farewells\fP .fl Base.class GoodBye.class -.fl - -.fl - .fl .fi -.RE .LP .LP -\f3Note:\fP \ The compiler compiled \f2src/farewells/Base.java\fP, even though we didn't specify it on the command line. To trace automatic compiles, use the \f3\-verbose\fP option. +\f3Note:\fP The compiler compiled \f2src/farewells/Base.java\fP, even though we didn't specify it on the command line. To trace automatic compiles, use the \f3\-verbose\fP option. .LP -.RE .SS Cross\-Compilation Example .LP -.RS 3 - .LP -.LP -Here we use \f3javac\fP to compile code that will run on a 1.7 VM. -.LP -.RS 3 - +Here we use \f3javac\fP to compile code that will run on a 1.6 VM. .LP .nf \f3 .fl -% \fP\f3javac \-target 1.7 \-bootclasspath jdk1.7.0/lib/rt.jar \\ +% \fP\f3javac \-source 1.6 \-target 1.6 \-bootclasspath jdk1.6.0/lib/rt.jar \\ .fl \-extdirs "" OldCode.java\fP .fl - -.fl .fi -.RE .LP .LP -The \f3\-target 1.7\fP option ensures that the generated class files will be compatible with 1.7 VMs. By default, \f3javac\fP compiles for JDK 6. -.LP +The \f2\-source 1.6\fP option specifies that version 1.6 (or 6) of the Java programming language be used to compile \f2OldCode.java\fP. The option \f3\-target 1.6\fP option ensures that the generated class files will be compatible with 1.6 VMs. Note that in most cases, the value of the \f3\-target\fP option is the value of the \f3\-source\fP option; in this example, you can omit the \f3\-target\fP option. .LP -The Java Platform JDK's \f3javac\fP would also by default compile against its own bootstrap classes, so we need to tell \f3javac\fP to compile against JDK 1.7 bootstrap classes instead. We do this with \f3\-bootclasspath\fP and \f3\-extdirs\fP. Failing to do this might allow compilation against a Java Platform API that would not be present on a 1.7 VM and would fail at runtime. .LP -.RE -.SH "SEE ALSO" +You must specify the \f3\-bootclasspath\fP option to specify the correct version of the bootstrap classes (the \f2rt.jar\fP library). If not, the compiler generates a warning: .LP +.nf +\f3 +.fl +% \fP\f3javac \-source 1.6 OldCode.java\fP +.fl +warning: [options] bootstrap class path not set in conjunction with \-source 1.6 +.fl +.fi +.LP +.LP +If you do not specify the correct version of bootstrap classes, the compiler will use the old language rules (in this example, it will use version 1.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to non\-existent methods can get included. +.LP +.SH "SEE ALSO" .LP .RS 3 .TP 2 @@ -909,7 +1174,7 @@ o .na \f2The javac Guide\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/javac/index.html .TP 2 o java(1) \- the Java Application Launcher @@ -933,7 +1198,7 @@ o .na \f2The Java Extensions Framework\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/extensions/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/extensions/index.html .RE .LP diff --git a/src/linux/doc/man/javadoc.1 b/src/linux/doc/man/javadoc.1 index 16e6a9a1fbf7af5ea2496b7cdb8adaa80e369bc4..34ac8103628c19737c966dbd54d022e8dac7ab05 100644 --- a/src/linux/doc/man/javadoc.1 +++ b/src/linux/doc/man/javadoc.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,27 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javadoc 1 "02 Jun 2010" +.TH javadoc 1 "10 May 2011" .SH "Name" javadoc \- The Java API Documentation Generator -.RS 3 - -.LP -.LP -Generates HTML pages of API documentation from Java source files. This document contains Javadoc examples for Sun Solaris. .LP -.RE +Generates HTML pages of API documentation from Java source files. This document contains Javadoc examples for Solaris. .SH "SYNOPSIS" .LP -.LP \f4javadoc\fP\f2\ [\ \fP\f2options\fP\f2\ ]\ [\ packagenames\ ]\ [\ sourcefilenames\ ]\ [\ \-subpackages\fP\ \f2pkg1:pkg2:...\fP\f2\ ]\ [\ \fP\f2@argfiles\fP\f2\ ]\fP .LP -.LP Arguments can be in any order. See processing of Source Files for details on how the Javadoc tool determines which "\f2.java\fP" files to process. -.LP -.RS 3 - -.LP .RS 3 .TP 3 options @@ -49,11 +38,7 @@ packagenames A series of names of packages, separated by spaces, such as \f2java.lang\ java.lang.reflect\ java.awt\fP. You must separately specify each package you want to document. Wildcards are not allowed; use \-subpackages for recursion. The Javadoc tool uses \f2\-sourcepath\fP to look for these package names. See Example \- Documenting One or More Packages .TP 3 sourcefilenames -A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The Javadoc tool will process every file whose name ends with ".java", and whose name, when stripped of that suffix, is actually a legal class name (see -.na -\f2Identifiers\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625). Therefore, you can name files with dashes (such as \f2X\-Buffer\fP), or other illegal characters, to prevent them from being documented. This is useful for test files and template files The path that precedes the source file name determines where javadoc will look for the file. (The Javadoc tool does \f2not\fP use \f2\-sourcepath\fP to look for these source file names.) Relative paths are relative to the current directory, so passing in \f2Button.java\fP is identical to \f2./Button.java\fP. A source file name with an absolute path and a wildcard, for example, is \f2/home/src/java/awt/Graphics*.java\fP. See Example\ \-\ Documenting One or More Classes. You can also mix packagenames and sourcefilenames, as in Example\ \-\ Documenting Both Packages and Classes +A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The Javadoc tool will process every file whose name ends with ".java", and whose name, when stripped of that suffix, is actually a legal class name (see the Java Language Specification). Therefore, you can name files with dashes (such as \f2X\-Buffer\fP), or other illegal characters, to prevent them from being documented. This is useful for test files and template files The path that precedes the source file name determines where javadoc will look for the file. (The Javadoc tool does \f2not\fP use \f2\-sourcepath\fP to look for these source file names.) Relative paths are relative to the current directory, so passing in \f2Button.java\fP is identical to \f2./Button.java\fP. A source file name with an absolute path and a wildcard, for example, is \f2/home/src/java/awt/Graphics*.java\fP. See Example\ \-\ Documenting One or More Classes. You can also mix packagenames and sourcefilenames, as in Example\ \-\ Documenting Both Packages and Classes .TP 3 \-subpackages pkg1:pkg2:... Generates documentation from source files in the specified packages and recursively in their subpackages. An alternative to supplying packagenames or sourcefilenames. @@ -61,31 +46,19 @@ Generates documentation from source files in the specified packages and recursiv @argfiles One or more files that contain a list of Javadoc options, packagenames and sourcefilenames in any order. Wildcards (*) and \f2\-J\fP options are not allowed in these files. .RE - -.LP -.RE .SH "DESCRIPTION" .LP -.LP The \f3Javadoc\fP tool parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. You can use it to generate the API (Application Programming Interface) documentation or the implementation documentation for a set of source files. .LP -.LP You can run the Javadoc tool on entire packages, individual source files, or both. When documenting entire packages, you can either use \f2\-subpackages\fP for traversing recursively down from a top\-level directory, or pass in an explicit list of package names. When documenting individual source files, you pass in a list of source (\f2.java\fP) filenames. Examples are given at the end of this document. How Javadoc processes source files is covered next. -.LP .SS Processing of source files .LP -.LP The Javadoc tool processes files that end in "\f2.java\fP" plus other files described under Source Files. If you run the Javadoc tool by explicitly passing in individual source filenames, you can determine exactly which "\f2.java\fP" files are processed. However, that is not how most developers want to work, as it is simpler to pass in package names. The Javadoc tool can be run three ways without explicitly specifying the source filenames. You can (1) pass in package names, (2) use \f2\-subpackages\fP, and (3) use wildcards with source filenames (\f2*.java\fP). In these cases, the Javadoc tool processes a "\f2.java\fP" file only if it fulfills all of the following requirements: -.LP .RS 3 .TP 2 o -Its name, after stripping off the "\f2.java\fP" suffix, is actually a legal class name (see -.na -\f2Identifiers\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625 for legal characters) +Its name, after stripping off the "\f2.java\fP" suffix, is actually a legal class name (see the Java Language Specification for legal characters) .TP 2 o Its directory path relative to the root of the source tree is actually a legal package name (after converting its separators to dots) @@ -93,11 +66,8 @@ Its directory path relative to the root of the source tree is actually a legal p o Its package statement contains the legal package name (specified in the previous bullet) .RE - -.LP .LP \f3Processing of links\fP \- During a run, the Javadoc tool automatically adds cross\-reference links to package, class and member names that are being documented as part of that run. Links appear in several places: -.LP .RS 3 .TP 2 o @@ -124,69 +94,50 @@ Package and class inheritance trees o The index .RE - -.LP .LP You can add hyperlinks to existing text for classes not included on the command line (but generated separately) by way of the \f2\-link\fP and \f2\-linkoffline\fP options. .LP -.LP \f3Other processing details\fP \- The Javadoc tool produces one complete document each time it is run; it cannot do incremental builds \-\- that is, it cannot modify or \f2directly\fP incorporate results from previous runs of the Javadoc tool. However, it can link to results from other runs, as just mentioned. .LP -.LP As implemented, the Javadoc tool requires and relies on the java compiler to do its job. The Javadoc tool calls part of \f2javac\fP to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy, and "use" relationships, then generates the HTML from that. The Javadoc tool also picks up user\-supplied documentation from documentation comments in the source code. .LP -.LP In fact, the Javadoc tool will run on \f2.java\fP source files that are pure stub files with no method bodies. This means you can write documentation comments and run the Javadoc tool in the earliest stages of design while creating the API, before writing the implementation. .LP -.LP -Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the Javadoc tool documents -.na -\f2default constructors\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#36154 (section 8.6.7 of \f2Java Language Specification\fP) that are present in the \f2.class\fP files but not in the source code. -.LP +Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the Javadoc tool documents default constructors (see Java Language Specification) that are present in the \f2.class\fP files but not in the source code. .LP In many cases, the Javadoc tool allows you to generate documentation for source files whose code is incomplete or erroneous. This is a benefit that enables you to generate documentation before all debugging and troubleshooting is done. For example, according to the \f2Java Language Specification\fP, a class that contains an abstract method should itself be declared abstract. The Javadoc tool does not check for this, and would proceed without a warning, whereas the javac compiler stops on this error. The Javadoc tool does do some primitive checking of doc comments. Use the DocCheck doclet to check the doc comments more thoroughly. .LP -.LP When the Javadoc tool builds its internal structure for the documentation, it loads all referenced classes. Because of this, the Javadoc tool must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. For more about this, see .na \f2How Classes Are Found\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path. -.LP +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path. .SS Javadoc Doclets .LP -.LP You can customize the content and format of the Javadoc tool's output by using doclets. The Javadoc tool has a default "built\-in" doclet, called the standard doclet, that generates HTML\-formatted API documentation. You can modify or subclass the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you'd like. Information about doclets and their use is at the following locations: -.LP .RS 3 .TP 2 o .na \f2Javadoc Doclets\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html .TP 2 o The \f2\-doclet\fP command\-line option .RE - -.LP .LP When a custom doclet is not specified with the \f2\-doclet\fP command line option, the Javadoc tool will use the default standard doclet. The javadoc tool has several command line options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command line options. Both sets of options are described below in the options section. -.LP .SS Related Documentation and Doclets -.LP .RS 3 .TP 2 o .na \f2Javadoc Enhancements\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/index.html for details about improvements added in Javadoc. +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html for details about improvements added in Javadoc. .TP 2 o .na @@ -198,7 +149,7 @@ o .na \f2How to Write Doc Comments for Javadoc\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html for more information about Sun conventions for writing documentation comments. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html for more information about Sun conventions for writing documentation comments. .TP 2 o .na @@ -216,22 +167,18 @@ o .na \f2DocCheck Doclet\fP @ .fi -http://java.sun.com/javadoc/doccheck \- Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Sun Doc Check Utilities. +http://www.oracle.com/technetwork/java/javase/documentation/index\-141437.html \- Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Doc Check Utilities. .TP 2 o .na \f2MIF Doclet\fP @ .fi -http://java.sun.com/javadoc/mifdoclet \- Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format. +http://java.sun.com/j2se/javadoc/mifdoclet/ \- Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format. .RE - -.LP .SS Terminology .LP -.LP The terms \f2documentation comment\fP, \f2doc comment\fP, \f2main description\fP, \f2tag\fP, \f2block tag\fP, and \f2in\-line tag\fP are described at Documentation Comments. These other terms have specific meanings within the context of the Javadoc tool: -.LP .RS 3 .TP 3 generated document @@ -259,34 +206,25 @@ The classes and interfaces that are explicitly referred to in the definition (im .na \f21.3\fP @ .fi -http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javadoc.html#referencedclasses.) When the Javadoc tool is run, it should load into memory all of the referenced classes in javadoc's bootclasspath and classpath. (The Javadoc tool prints a "Class not found" warning for referenced classes not found.) The Javadoc tool can derive enough information from the .class files to determine their existence and the fully\-qualified names of their members. +http://download.oracle.com/javase/1.3/docs/tooldocs/solaris/javadoc.html#referencedclasses.) When the Javadoc tool is run, it should load into memory all of the referenced classes in javadoc's bootclasspath and classpath. (The Javadoc tool prints a "Class not found" warning for referenced classes not found.) The Javadoc tool can derive enough information from the .class files to determine their existence and the fully\-qualified names of their members. .LP .TP 3 external referenced classes The referenced classes whose documentation is not being generated during a javadoc run. In other words, these classes are not passed into the Javadoc tool on the command line. Links in the generated documentation to those classes are said to be \f2external references\fP or \f2external links\fP. For example, if you run the Javadoc tool on only the \f2java.awt\fP package, then any class in \f2java.lang\fP, such as \f2Object\fP, is an external referenced class. External referenced classes can be linked to using the \f2\-link\fP and \f2\-linkoffline\fP options. An important property of an external referenced class is that its source comments are normally not available to the Javadoc run. In this case, these comments cannot be inherited. .RE - -.LP .SH "SOURCE FILES" .LP -.LP The Javadoc tool will generate output originating from four different types of "source" files: Java language source files for classes (\f2.java\fP), package comment files, overview comment files, and miscellaneous unprocessed files. This section also covers test files and template files that can also be in the source tree, but which you want to be sure not to document. -.LP .SS Class Source Code Files .LP -.LP Each class or interface and its members can have their own documentation comments, contained in a \f2.java\fP file. For more details about these doc comments, see Documentation Comments. -.LP .SS Package Comment Files .LP -.LP Each package can have its own documentation comment, contained in its own "source" file, that the Javadoc tool will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package. .LP -.LP To create a package comment file, you have a choice of two files to place your comments: -.LP .RS 3 .TP 2 o @@ -295,52 +233,18 @@ o o \f2package.html\fP \- Can contain only package comments and Javadoc tags, no package annotations. .RE - -.LP .LP A package may have a single \f2package.html\fP file or a single \f2package\-info.java\fP file but not both. Place either file in the package directory in the source tree along with your \f2.java\fP files. .LP -.LP \f4package\-info.java\fP \- This file can contain a package comment of the following structure \-\- the comment is placed before the package declaration: .LP -.LP File: \f2java/applet/package\-info.java\fP -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 .nf \f3 .fl /** .fl - * Provides the classes necessary to create an + * Provides the classes necessary to create an .fl * applet and the classes an applet uses .fl @@ -372,105 +276,12 @@ package java.lang.applet; .fl \fP .fi -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 352 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-42 - -.LP .LP Note that while the comment separators \f2/**\fP and \f2/*\fP must be present, the leading asterisks on the intermediate lines can be omitted. .LP -.LP \f4package.html\fP \- This file can contain a package comment of the following structure \-\- the comment is placed in the \f2\fP element: .LP -.LP File: \f2java/applet/package.html\fP -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 .nf \f3 .fl @@ -478,7 +289,7 @@ File: \f2java/applet/package.html\fP .fl .fl -Provides the classes necessary to create an applet and the +Provides the classes necessary to create an applet and the .fl classes an applet uses to communicate with its applet context. .fl @@ -506,77 +317,14 @@ initialize, start, and stop the applet. .fl \fP .fi -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 405 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-40 - -.LP .LP Notice this is just a normal HTML file and does not include a package declaration. The content of the package comment file is written in HTML, like all other comments, with one exception: The documentation comment should not include the comment separators \f2/**\fP and \f2*/\fP or leading asterisks. When writing the comment, you should make the first sentence a summary about the package, and not put a title or any other text between \f2\fP and the first sentence. You can include package tags; as with any documentation comment, all block tags must appear after the main description. If you add a \f2@see\fP tag in a package comment file, it must have a fully\-qualified name. For more details, see the .na \f2example of \fP\f2package.html\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#packagecomments. -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#packagecomments. .LP \f3Processing of package comment file\fP \- When the Javadoc tool runs, it will automatically look for the package comment file; if found, the Javadoc tool does the following: -.LP .RS 3 .TP 2 o @@ -590,35 +338,27 @@ Inserts the processed text at the bottom of the package summary page it generate .na \f2Package Summary\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/applet/package\-summary.html. +http://download.oracle.com/javase/7/docs/api/java/applet/package\-summary.html. .TP 2 o Copies the first sentence of the package comment to the top of the package summary page. It also adds the package name and this first sentence to the list of packages on the overview page, as shown in .na \f2Overview Summary\fP @ .fi -http://java.sun.com/javase/6/docs/api/overview\-summary.html. The end\-of\-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions. +http://download.oracle.com/javase/7/docs/api/overview\-summary.html. The end\-of\-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions. .RE - -.LP .SS Overview Comment File .LP -.LP Each application or set of packages that you are documenting can have its own overview documentation comment, kept in its own "source" file, that the Javadoc tool will merge into the overview page that it generates. You typically include in this comment any documentation that applies to the entire application or set of packages. .LP -.LP To create an overview comment file, you can name the file anything you want, typically \f4overview.html\fP and place it anywhere, typically at the top level of the source tree. For example, if the source files for the \f2java.applet\fP package are contained in \f2/home/user/src/java/applet\fP directory, you could create an overview comment file at \f2/home/user/src/overview.html\fP. .LP -.LP Notice you can have multiple overview comment files for the same set of source files, in case you want to run javadoc multiple times on different sets of packages. For example, you could run javadoc once with \-private for internal documentation and again without that option for public documentation. In this case, you could describe the documentation as public or internal in the first sentence of each overview comment file. .LP -.LP The content of the overview comment file is one big documentation comment, written in HTML, like the package comment file described previously. See that description for details. To re\-iterate, when writing the comment, you should make the first sentence a summary about the application or set of packages, and not put a title or any other text between \f2\fP and the first sentence. You can include overview tags; as with any documentation comment, all tags except in\-line tags, such as \f2{@link}\fP, must appear after the main description. If you add a \f2@see\fP tag, it must have a fully\-qualified name. .LP -.LP When you run the Javadoc tool, you specify the overview comment file name with the \-overview option. The file is then processed similar to that of a package comment file. -.LP .RS 3 .TP 2 o @@ -632,25 +372,19 @@ Inserts the processed text at the bottom of the overview page it generates, as s .na \f2Overview Summary\fP @ .fi -http://java.sun.com/javase/6/docs/api/overview\-summary.html. +http://download.oracle.com/javase/7/docs/api/overview\-summary.html. .TP 2 o Copies the first sentence of the overview comment to the top of the overview summary page. .RE - -.LP .SS Miscellaneous Unprocessed Files .LP -.LP You can also include in your source any miscellaneous files that you want the Javadoc tool to copy to the destination directory. These typically includes graphic files, example Java source (.java) and class (.class) files, and self\-standing HTML files whose content would overwhelm the documentation comment of a normal Java source file. .LP -.LP To include unprocessed files, put them in a directory called \f4doc\-files\fP which can be a subdirectory of any package directory that contains source files. You can have one such subdirectory for each package. You might include images, example code, source files, .class files, applets and HTML files. For example, if you want to include the image of a button \f2button.gif\fP in the \f2java.awt.Button\fP class documentation, you place that file in the \f2/home/user/src/java/awt/doc\-files/\fP directory. Notice the \f2doc\-files\fP directory should not be located at \f2/home/user/src/java/doc\-files\fP because \f2java\fP is not a package \-\- that is, it does not directly contain any source files. .LP -.LP All links to these unprocessed files must be hard\-coded, because the Javadoc tool does not look at the files \-\- it simply copies the directory and all its contents to the destination. For example, the link in the \f2Button.java\fP doc comment might look like: -.LP .nf \f3 .fl @@ -664,23 +398,16 @@ All links to these unprocessed files must be hard\-coded, because the Javadoc to .fl \fP .fi - -.LP .SS Test Files and Template Files .LP -.LP Some developers have indicated they want to store test files and templates files in the source tree near their corresponding source files. That is, they would like to put them in the same directory, or a subdirectory, of those source files. .LP -.LP If you run the Javadoc tool by explicitly passing in individual source filenames, you can deliberately omit test and templates files and prevent them from being processed. However, if you are passing in package names or wildcards, you need to follow certain rules to ensure these test files and templates files are not processed. .LP -.LP Test files differ from template files in that the former are legal, compilable source files, while the latter are not, but may end with ".java". .LP -.LP \f3Test files\fP \- Often developers want to put compilable, runnable test files for a given package in the \f2same\fP directory as the source files for that package. But they want the test files to belong to a package other than the source file package, such as the unnamed package (so the test files have no package statement or a different package statement from the source). In this scenario, when the source is being documented by specifying its package name specified on the command line, the test files will cause warnings or errors. You need to put such test files in a subdirectory. For example, if you want to add test files for source files in \f2com.package1\fP, put them in a subdirectory that would be an invalid package name (because it contains a hyphen): -.LP .nf \f3 .fl @@ -688,29 +415,17 @@ Test files differ from template files in that the former are legal, compilable s .fl \fP .fi - -.LP .LP The test directory will be skipped by the Javadoc tool with no warnings. .LP -.LP If your test files contain doc comments, you can set up a separate run of the Javadoc tool to produce documentation of the test files by passing in their test source filenames with wildcards, such as \f2com/package1/test\-files/*.java\fP. .LP -.LP -\f3Templates for source files\fP \- Template files have names that often end in ".java" and are not compilable. If you have a template for a source file that you want to keep in the source directory, you can name it with a dash (such as \f2Buffer\-Template.java\fP), or any other illegal Java character, to prevent it from being processed. This relies on the fact that the Javadoc tool will only process source files whose name, when stripped of the ".java" suffix, is actually a legal class name (see -.na -\f2Identifiers\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625). -.LP +\f3Templates for source files\fP \- Template files have names that often end in ".java" and are not compilable. If you have a template for a source file that you want to keep in the source directory, you can name it with a dash (such as \f2Buffer\-Template.java\fP), or any other illegal Java character, to prevent it from being processed. This relies on the fact that the Javadoc tool will only process source files whose name, when stripped of the ".java" suffix, is actually a legal class name (see information about Identifiers in the Java Language Specification). .SH "GENERATED FILES" .LP -.LP By default, javadoc uses a standard doclet that generates HTML\-formatted documentation. This doclet generates the following kinds of files (where each HTML "page" corresponds to a separate file). Note that javadoc generates files with two types of names: those named after classes/interfaces, and those that are not (such as \f2package\-summary.html\fP). Files in the latter group contain hyphens to prevent filename conflicts with those in the former group. .LP -.LP \f3Basic Content Pages\fP -.LP .RS 3 .TP 2 o @@ -722,11 +437,8 @@ One \f3package page\fP (\f2package\-summary.html\fP) for each package it is docu o One \f3overview page\fP (\f2overview\-summary.html\fP) for the entire set of packages. This is the front page of the generated document. The Javadoc tool will include any HTML text provided in a file specified with the \f2\-overview\fP option. Note that this file is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) .RE - -.LP .LP \f3Cross\-Reference Pages\fP -.LP .RS 3 .TP 2 o @@ -750,15 +462,12 @@ A \f3serialized form page\fP (\f2serialized\-form.html\fP) for information about o An \f3index\fP (\f2index\-*.html\fP) of all class, interface, constructor, field and method names, alphabetically arranged. This is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A\-Z for English). .RE - -.LP .LP \f3Support Files\fP -.LP .RS 3 .TP 2 o -A \f3help page\fP (\f2help\-doc.html\fP) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using \f2\-helpfile\fP. +A \f3help page\fP (\f2help\-doc.html\fP) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using \f2\-helpfile\fP. .TP 2 o One \f3index.html file\fP which creates the HTML frames for display. This is the file you load to display the front page with frames. This file itself contains no text content. @@ -775,45 +484,14 @@ A \f3style sheet\fP file (\f2stylesheet.css\fP) that controls a limited amount o o A \f3doc\-files\fP directory that holds any image, example, source code or other files that you want copied to the destination directory. These files are not processed by the Javadoc tool in any manner \-\- that is, any javadoc tags in them will be ignored. This directory is not generated unless it exists in the source tree. .RE - -.LP .LP \f3HTML Frames\fP .LP -.LP The Javadoc tool will generate either two or three HTML frames, as shown in the figure below. It creates the minimum necessary number of frames by omitting the list of packages if there is only one package (or no packages). That is, when you pass a single package name or source files (*.java) belonging to a single package as arguments into the javadoc command, it will create only one frame (C) in the left\-hand column \-\- the list of classes. When you pass into javadoc two or more package names, it creates a third frame (P) listing all packages, as well as an overview page (Detail). This overview page has the filename \f2overview\-summary.html\fP. Thus, this file is created only if you pass in two or more package names. You can bypass frames by clicking on the "No Frames" link or entering at overview\-summary.html. .LP -.LP If you are unfamiliar with HTML frames, you should be aware that frames can have \f2focus\fP for printing and scrolling. To give a frame focus, click on it. Then on many browsers the arrow keys and page keys will scroll that frame, and the print menu command will print it. .LP -.nf -\f3 -.fl - \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- -.fl - |C| Detail | |P| Detail | -.fl - | | | | | | -.fl - | | | |\-| | -.fl - | | | |C| | -.fl - | | | | | | -.fl - | | | | | | -.fl - \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- -.fl - javadoc *.java javadoc java.lang java.awt -.fl -\fP -.fi - -.LP -.LP Load one of the following two files as the starting page depending on whether you want HTML frames or not: -.LP .RS 3 .TP 2 o @@ -822,24 +500,14 @@ o o \f2overview\-summary.html\fP (for no frames) .RE - -.LP .LP \f3Generated File Structure\fP .LP -.LP The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage. .LP -.LP For example, the document generated for the class \f2java.applet.Applet\fP class would be located at \f2java/applet/Applet.html\fP. The file structure for the java.applet package follows, given that the destination directory is named \f2apidocs\fP. All files that contain the word "frame" appear in the upper\-left or lower\-left frames, as noted. All other HTML files appear in the right\-hand frame. .LP -.RS 3 - -.LP -.LP NOTE \- Directories are shown in \f3bold\fP. The asterisks (\f2*\fP) indicate the files and directories that are \f2omitted\fP when the arguments to javadoc are source filenames (*.java) rather than package names. Also when arguments are source filenames, \f2package\-list\fP is created but is empty. The doc\-files directory will not be created in the destination unless it exists in the source tree. -.LP -.RE .nf \f3 .fl @@ -922,44 +590,31 @@ NOTE \- Directories are shown in \f3bold\fP. The asterisks (\f2*\fP) indicate th AudioClip.html Page for AudioClip source code .fl .fi - -.LP .SS Generated API Declarations .LP -.LP The Javadoc tool generates a declaration at the start of each class, interface, field, constructor, and method description for that API item. For example, the declaration for the \f2Boolean\fP class is: .LP -.LP \f2public final class Boolean\fP .br \f2extends Object\fP .br \f2implements Serializable\fP .LP -.LP and the declaration for the \f2Boolean.valueOf\fPmethod is: .LP -.LP \f2public static Boolean valueOf(String s)\fP .LP -.LP The Javadoc tool can include the modifiers \f2public\fP, \f2protected\fP, \f2private\fP, \f2abstract\fP, \f2final\fP, \f2static\fP, \f2transient\fP, and \f2volatile\fP, but not \f2synchronized\fP or \f2native\fP. These last two modifiers are considered implementation detail and not part of the API specification. .LP -.LP Rather than relying on the keyword \f2synchronized\fP, APIs should document their concurrency semantics in the comment's main description, as in "a single \f2Enumeration\fP cannot be used by multiple threads concurrently". The document should not describe how to achieve these semantics. As another example, while \f2Hashtable\fP should be thread\-safe, there's no reason to specify that we achieve this by synchronizing all of its exported methods. We should reserve the right to synchronize internally at the bucket level, thus offering higher concurrency. -.LP .SH "DOCUMENTATION COMMENTS" .LP -.LP The original "Documentation Comment Specification" can be found under related documentation. -.LP .SS Commenting the Source Code .LP -.LP You can include \f2documentation comments\fP ("doc comments") in the source code, ahead of declarations for any class, interface, method, constructor, or field. You can also create doc comments for each package and another one for the overview, though their syntax is slightly different. Doc comments are also known informally as "Javadoc comments" (but this term violates its trademark usage). A doc comment consists of the characters between the characters \f2/**\fP that begin the comment and the characters \f2*/\fP that end it. Leading asterisks are allowed on each line and are described further below. The text in a comment can continue onto multiple lines. -.LP .nf \f3 .fl @@ -973,11 +628,8 @@ You can include \f2documentation comments\fP ("doc comments") in the source code .fl \fP .fi - -.LP .LP To save space you can put a comment on one line: -.LP .nf \f3 .fl @@ -985,14 +637,10 @@ To save space you can put a comment on one line: .fl \fP .fi - -.LP .LP \f3Placement of comments\fP \- Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations \-\- see the class example, method example, and field example. Documentation comments placed in the body of a method are ignored. Only one documentation comment per declaration statement is recognized by the Javadoc tool. .LP -.LP A common mistake is to put an \f2import\fP statement between the class comment and the class declaration. Avoid this, as the Javadoc tool will ignore the class comment. -.LP .nf \f3 .fl @@ -1014,11 +662,8 @@ A common mistake is to put an \f2import\fP statement between the class comment a .fl \fP .fi - -.LP .LP \f3A doc comment is composed of a \fP\f4main description\fP\f3 followed by a \fP\f4tag section\fP \- The \f2main description\fP begins after the starting delimiter \f2/**\fP and continues until the tag section. The \f2tag section\fP starts with the first block tag, which is defined by the first \f2@\fP character that begins a line (ignoring leading asterisks, white space, and leading separator \f2/**\fP). It is possible to have a comment with only a tag section and no main description. The main description cannot continue after the tag section begins. The argument to a tag can span multiple lines. There can be any number of tags \-\- some types of tags can be repeated while others cannot. For example, this \f2@see\fP starts the tag section: -.LP .nf \f3 .fl @@ -1032,11 +677,8 @@ A common mistake is to put an \f2import\fP statement between the class comment a .fl \fP .fi - -.LP .LP \f3Block tags and in\-line tags\fP \- A \f2tag\fP is a special keyword within a doc comment that the Javadoc tool can process. There are two kinds of tags: block tags, which appear as \f2@tag\fP (also known as "standalone tags"), and in\-line tags, which appear within curly braces, as \f2{@tag}\fP. To be interpreted, a block tag must appear at the beginning of a line, ignoring leading asterisks, white space, and separator (\f2/**\fP). This means you can use the \f2@\fP character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the \f2@\fP character and not have it be interpreted, use the HTML entity \f2@\fP. Each block tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the doc comment. This associated text can span multiple lines. An in\-line tag is allowed and interpreted anywhere that text is allowed. The following example contains the block tag \f2@deprecated\fP and in\-line tag \f2{@link}\fP. -.LP .nf \f3 .fl @@ -1048,17 +690,12 @@ A common mistake is to put an \f2import\fP statement between the class comment a .fl \fP .fi - -.LP .LP \f3Comments are written in HTML\fP \- The text must be written in HTML, in that they should use HTML entities and can use HTML tags. You can use whichever version of HTML your browser supports; we have written the standard doclet to generate HTML 3.2\-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. (We preface each generated file with "HTML 4.0" because of the frame sets.) .LP -.LP For example, entities for the less\-than (\f2<\fP) and greater\-than (\f2>\fP) symbols should be written \f2<\fP and \f2>\fP. Likewise, the ampersand (\f2&\fP) should be written \f2&\fP. The bold HTML tag \f2\fP is shown in the following example. .LP -.LP Here is a doc comment: -.LP .nf \f3 .fl @@ -1072,20 +709,12 @@ Here is a doc comment: .fl \fP .fi - -.LP .LP \f3Leading asterisks\fP \- When javadoc parses a doc comment, leading asterisk (\f2*\fP) characters on each line are discarded; blanks and tabs preceding the initial asterisk (\f2*\fP) characters are also discarded. Starting with 1.4, if you omit the leading asterisk on a line, the leading white space is no longer removed. This enables you to paste code examples directly into a doc comment inside a \f2
\fP tag, and its indentation will be honored. Spaces are generally interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator \f2/**\fP or \f2
\fP tag).
 .LP
-.LP
 \f3First sentence\fP \- The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first block tag. The Javadoc tool copies this first sentence to the member summary at the top of the HTML page.
 .LP
-.LP
 \f3Declaration with multiple fields\fP \- Java allows declaring multiple fields in a single statement, but this statement can have only one documentation comment, which is copied for all fields. Therefore if you want individual documentation comments for each field, you must declare each field in a separate statement. For example, the following documentation comment doesn't make sense written as a single declaration and would be better handled as two declarations:
-.LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
@@ -1099,51 +728,32 @@ public int x, y;      // Avoid this
 .fl
 \fP
 .fi
-.RE
-
-.LP
 .LP
 The Javadoc tool generates the following documentation from the above code:
-.LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
 public int \fP\f3x\fP
 .fl
 .fi
-
-.LP
 .RS 3
 The horizontal and vertical distances of point (x,y) 
 .RE
-
-.LP
 .nf
 \f3
 .fl
 public int \fP\f3y\fP
 .fl
 .fi
-
-.LP
 .RS 3
 The horizontal and vertical distances of point (x,y) 
 .RE
-
-.LP
-.RE
 .LP
 \f3Use header tags carefully\fP \- When writing documentation comments for members, it's best not to use HTML heading tags such as 

and

, because the Javadoc tool creates an entire structured document and these structural tags might interfere with the formatting of the generated document. However, it is fine to use these headings in class and package comments to provide your own structure. -.LP .SS Automatic Copying of Method Comments .LP -.LP The Javadoc tool has the ability to copy or "inherit" method comments in classes and interfaces under the following two circumstances. Constructors, fields and nested classes do not inherit doc comments. -.LP .RS 3 .TP 2 o @@ -1156,14 +766,10 @@ This behavior contrasts with version 1.3 and earlier, where the presence of any o \f3Explicitly inherit comment with {@inheritDoc} tag\fP \- Insert the inline tag \f2{@inheritDoc}\fP in a method main description or \f2@return\fP, \f2@param\fP or \f2@throws\fP tag comment \-\- the corresponding inherited main description or tag comment is copied into that spot. .RE - -.LP .LP The source file for the inherited method need only be on the path specified by \-sourcepath for the doc comment to actually be available to copy. Neither the class nor its package needs to be passed in on the command line. This contrasts with 1.3.x and earlier releases, where the class had to be a documented class .LP -.LP \f3Inherit from classes and interfaces\fP \- Inheriting of comments occurs in all three possible cases of inheritance from classes and interfaces: -.LP .RS 3 .TP 2 o @@ -1175,17 +781,12 @@ When a method in an interface overrides a method in a superinterface o When a method in a class implements a method in an interface .RE - -.LP .LP In the first two cases, for method overrides, the Javadoc tool generates a subheading "Overrides" in the documentation for the overriding method, with a link to the method it is overriding, whether or not the comment is inherited. .LP -.LP In the third case, when a method in a given class implements a method in an interface, the Javadoc tool generates a subheading "Specified by" in the documentation for the overriding method, with a link to the method it is implementing. This happens whether or not the comment is inherited. .LP -.LP \f3Algorithm for Inheriting Method Comments\fP \- If a method does not have a doc comment, or has an {@inheritDoc} tag, the Javadoc tool searches for an applicable comment using the following algorithm, which is designed to find the most specific applicable doc comment, giving preference to interfaces over superclasses: -.LP .RS 3 .TP 3 1. @@ -1205,16 +806,11 @@ b. If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass. .RE .RE - -.LP .SH "JAVADOC TAGS" .LP -.LP The Javadoc tool parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well\-formatted API from your source code. The tags start with an "at" sign (\f2@\fP) and are case\-sensitive \-\- they must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk) or it is treated as normal text. By convention, tags with the same name are grouped together. For example, put all \f2@see\fP tags together. .LP -.LP Tags come in two types: -.LP .RS 3 .TP 2 o @@ -1223,8 +819,6 @@ o o \f3Inline tags\fP \- Can be placed anywhere in the main description or in the comments for block tags. Inline tags are denoted by curly braces: \f2{@tag}\fP. .RE - -.LP .LP For information about tags we might introduce in future releases, see .na @@ -1232,14 +826,8 @@ For information about tags we might introduce in future releases, see .fi http://java.sun.com/j2se/javadoc/proposed\-tags.html. .LP -.LP The current tags are: .LP -.RS 3 - -.LP -.LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -1350,7 +938,7 @@ The current tags are: .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 1122 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 873 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1448,55 +1036,35 @@ The current tags are: .nr T. 1 .T# 1 .35 -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-42 - -.LP .LP For custom tags, see the \-tag option. -.LP -.RE .RS 3 .TP 3 @author\ name\-text Adds an "Author" entry with the specified \f2name\-text\fP to the generated docs when the \-author option is used. A doc comment may contain multiple \f2@author\fP tags. You can specify one name per \f2@author\fP tag or multiple names per tag. In the former case, the Javadoc tool inserts a comma (\f2,\fP) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, you can use multiple names per line if you want a localized name separator other than comma. +.RE .LP For more details, see Where Tags Can Be Used and .na \f2writing @author tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@author. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@author. .LP -.TP 3 -@deprecated\ deprecated\-text .RS 3 - -.LP -.LP -Note: You can deprecate a program element using the -.na -\f2@Deprecated annotation\fP @ -.fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/deprecation/deprecation.html. -.LP -.RE +.TP 3 +@deprecated\ deprecated\-text Note: You can deprecate a program element using the @Deprecated annotation. .RE -.RS 3 - -.LP .LP Adds a comment indicating that this API should no longer be used (even though it may continue to work). The Javadoc tool moves the \f2deprecated\-text\fP ahead of the main description, placing it in italics and preceding it with a bold warning: "Deprecated". This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field. .LP -.LP The first sentence of \f2deprecated\-text\fP should at least tell the user when the API was deprecated and what to use as a replacement. The Javadoc tool copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a \f2{@link}\fP tag (for Javadoc 1.2 or later) that points to the replacement API: .LP -.LP For more details, see .na \f2writing @deprecated tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@deprecated. -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@deprecated. .RS 3 .TP 2 o @@ -1518,19 +1086,13 @@ For Javadoc 1.2 and later, use a \f2{@link}\fP tag. This creates the link in\-li o For Javadoc 1.1, the standard format is to create a \f2@see\fP tag (which cannot be in\-line) for each \f2@deprecated\fP tag. .RE - -.LP .LP For more about deprecation, see .na \f2The @deprecated tag\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/deprecation/index.html. -.LP -.LP - +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/deprecation/index.html. .LP -.RE .RS 3 .TP 3 {@code\ text} @@ -1700,7 +1262,7 @@ For more details, see .na \f2writing {@link} tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#{@link}. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#{@link}. .LP .TP 3 {@linkplain\ package.class#member\ label} @@ -1716,13 +1278,8 @@ Identical to \f2{@link}\fP, except the link's label is displayed in plain text t .fi .LP This would display as: -.RS 3 - -.LP .LP -Refer to the overridden method. -.LP -.RE +Refer to the overridden method. .LP .TP 3 {@literal\ text} @@ -1799,7 +1356,7 @@ For more details, see .na \f2writing @param tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@param. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@param. .LP .TP 3 @return\ description @@ -1809,7 +1366,7 @@ For more details, see .na \f2writing @return tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@return. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@return. .LP .TP 3 @see\ reference @@ -1834,18 +1391,12 @@ This generates text such as: .RS 3 .RS 3 .RS 3 - -.LP -.RS 3 .RS 3 .TP 3 See Also: "The Java Programming Language" .RE .RE - -.LP -.RE .TP 3 @see label Adds a link as defined by \f2URL\fP#\f2value\fP. The \f2URL\fP#\f2value\fP is a relative or absolute URL. The Javadoc tool distinguishes this from other cases by looking for a less\-than symbol (\f2<\fP) as the first character. For example: @@ -1858,14 +1409,10 @@ Adds a link as defined by \f2URL\fP#\f2value\fP. The \f2URL\fP#\f2value\fP is a .fi This generates a link such as: .RS 3 -.RS 3 .TP 3 See Also: Java Spec .RE - -.LP -.RE .TP 3 @see\ package.class#member\ label Adds a link, with visible text \f2label\fP, that points to the documentation for the specified name in the Java Language that is referenced. The \f2label\fP is optional; if omitted, the name appears instead as the visible text, suitably shortened \-\- see How a name is displayed. Use \-noqualifier to globally remove the package name from this visible text. Use the label when you want the visible text to be different from the auto\-generated visible text. @@ -1885,7 +1432,6 @@ A space is the delimiter between \f2package.class\fP\f2#\fP\f2member\fP and \f2l .RE .LP \f3Example\fP \- In this example, an \f2@see\fP tag (in the \f2Character\fP class) refers to the \f2equals\fP method in the \f2String\fP class. The tag includes both arguments: the name "\f2String#equals(Object)\fP" and the label "\f2equals\fP". -.RS 3 .nf \f3 .fl @@ -1897,11 +1443,7 @@ A space is the delimiter between \f2package.class\fP\f2#\fP\f2member\fP and \f2l .fl \fP .fi -.RE The standard doclet produces HTML something like this: -.RS 3 - -.LP .nf \f3 .fl @@ -1915,26 +1457,18 @@ The standard doclet produces HTML something like this: .fl \fP .fi -.RE Which looks something like this in a browser, where the label is the visible link text: .RS 3 - -.LP -.RS 3 .TP 3 See Also: equals .RE - -.LP -.RE .LP \f3Specifying a name\fP \- This \f2package.class\fP\f2#\fP\f2member\fP name can be either fully\-qualified, such as \f2java.lang.String#toUpperCase()\fP or not, such as \f2String#toUpperCase()\fP or \f2#toUpperCase()\fP. If less than fully\-qualified, the Javadoc tool uses the normal Java compiler search order to find it, further described below in Search order for @see. The name can contain whitespace within parentheses, such as between method arguments. .LP Of course the advantage of providing shorter, "partially\-qualified" names is that they are shorter to type and there is less clutter in the source code. The following table shows the different forms of the name, where \f2Class\fP can be a class or interface, \f2Type\fP can be a class, interface, array, or primitive, and \f2method\fP can be a method or constructor. .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -2079,7 +1613,7 @@ Of course the advantage of providing shorter, "partially\-qualified" names is th .nr 40 \n(79+(0*\n(38) .nr 80 +\n(40 .nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 1665 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 1364 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2165,7 +1699,6 @@ Of course the advantage of providing shorter, "partially\-qualified" names is th .rm b+ .rm c+ .rm d+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-58 .LP The following notes apply to the above table: @@ -2186,7 +1719,7 @@ As stated, the hash character (\f2#\fP), rather than a dot (\f2.\fP) separates a .LP \f3Search order for @see\fP \- the Javadoc tool will process a \f2@see\fP tag that appears in a source file (.java), package file (package.html or package\-info.java) or overview file (overview.html). In the latter two files, you must fully\-qualify the name you supply with \f2@see\fP. In a source file, you can specify a name that is fully\-qualified or partially\-qualified. .LP -When the Javadoc tool encounters a \f2@see\fP tag in a \f2.java\fP file that is \f2not\fP fully qualified, it searches for the specified name in the same order as the Java compiler would (except the Javadoc tool will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in Chapter 6, "Names" of the \f2Java Language Specification\fP, Second Edition. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order: +When the Javadoc tool encounters a \f2@see\fP tag in a \f2.java\fP file that is \f2not\fP fully qualified, it searches for the specified name in the same order as the Java compiler would (except the Javadoc tool will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in the \f2Java Language Specification\fP. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order: .RS 3 .TP 3 1. @@ -2214,7 +1747,6 @@ The Javadoc tool does not necessarily look in subclasses, nor will it look in ot Use \-noqualifier to globally remove the package names. .br .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -2425,7 +1957,7 @@ Use \-noqualifier to globally remove the package names. .nr 42 \n(81+(3*\n(38) .nr 82 +\n(42 .nr TW \n(82 -.if t .if \n(TW>\n(.li .tm Table at line 1741 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 1440 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2561,7 +2093,6 @@ Use \-noqualifier to globally remove the package names. .rm g+ .rm h+ .rm i+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-28 .LP \f3Examples of @see\fP @@ -2598,14 +2129,9 @@ For more details, see .na \f2writing @see tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@see. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@see. .RE .RE -.RS 3 - -.LP -.LP - .LP .RS 3 .TP 3 @@ -2634,11 +2160,11 @@ For more information about how to use these tags, along with an example, see " .na \f2Documenting Serializable Fields and Data for a Class\fP @ .fi -http://java.sun.com/javase/6/docs/platform/serialization/spec/serial\-arch.html," Section 1.6 of the \f2Java Object Serialization Specification\fP. Also see the +http://download.oracle.com/javase/7/docs/platform/serialization/spec/serial\-arch.html," Section 1.6 of the \f2Java Object Serialization Specification\fP. Also see the .na \f2Serialization FAQ\fP @ .fi -http://java.sun.com/products/jdk/serialization/faq/#javadoc_warn_missing, which covers common questions, such as "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the \-private switch?". Also see +http://java.sun.com/javase/technologies/core/basic/serializationFAQ.jsp#javadoc_warn_missing, which covers common questions, such as "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the \-private switch?". Also see .na \f2Sun's criteria\fP @ .fi @@ -2681,7 +2207,7 @@ For more details, see .na \f2writing @throws tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@exception. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@exception. .LP .TP 3 {@value\ package.class#field} @@ -2727,7 +2253,7 @@ These values of these constants are also displayed on the .na \f2Constant Field Values\fP @ .fi -http://java.sun.com/javase/6/docs/api/constant\-values.html page. +http://download.oracle.com/javase/7/docs/api/constant\-values.html page. .LP .TP 3 @version\ version\-text @@ -2739,376 +2265,111 @@ For more details, see .na \f2writing @version tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@version. -.RE - -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@version. .RE .SS Where Tags Can Be Used .LP -.LP The following sections describe where the tags can be used. Note that these tags can be used in all doc comments: \f2@see\fP, \f2@since\fP, \f2@deprecated\fP, \f2{@link}\fP, \f2{@linkplain}\fP, and \f2{@docroot}\fP. -.LP -.RS 3 - -.LP .SS Overview Documentation Tags .LP -.LP Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named \f2overview.html\fP). Like in any other documentation comments, these tags must appear after the main description. .LP -.LP \f3NOTE\fP \- The \f2{@link}\fP tag has a bug in overview documents in version 1.2 \-\- the text appears properly but has no link. The \f2{@docRoot}\fP tag does not currently work in overview documents. .LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@author\fP -.br -\f2@version\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Overview Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 1962 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Overview Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-20 - -.LP -.SS -Package Documentation Tags -.LP +\f3Overview Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@author\fP +.TP 2 +o +\f2@version\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE +.SS +Package Documentation Tags .LP Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named \f2package.html\fP or \f2package\-info.java\fP). The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. .LP +\f3Package Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@serial\fP +.TP 2 +o +\f2@author\fP +.TP 2 +o +\f2@version\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE +.SS +Class and Interface Documentation Tags .LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@serial\fP -.br -\f2@author\fP -.br -\f2@version\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Package Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 1994 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Package Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-22 - -.LP -.SS -Class and Interface Documentation Tags -.LP -.LP -The following are tags that can appear in the documentation comment for a class or interface. The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@deprecated\fP -.br -\f2@serial\fP -.br -\f2@author\fP -.br -\f2@version\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Class/Interface Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 2028 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Class/Interface Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-24 - -.LP -\f3An example of a class comment:\fP +The following are tags that can appear in the documentation comment for a class or interface. The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. .LP +\f3Class/Interface Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@deprecated\fP +.TP 2 +o +\f2@serial\fP +.TP 2 +o +\f2@author\fP +.TP 2 +o +\f2@version\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE +\f3An example of a class comment:\fP .nf \f3 .fl @@ -3146,129 +2407,42 @@ class Window extends BaseWindow { .fl \fP .fi - -.LP .SS Field Documentation Tags .LP +The following are the tags that can appear in .LP -The following are the tags that can appear in the documentation comment for a field. -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@deprecated\fP -.br -\f2@serial\fP -.br -\f2@serialField\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -\f2{@value}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Field Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 2103 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Field Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-24 - -.LP +\f3Field Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@deprecated\fP +.TP 2 +o +\f2@serial\fP +.TP 2 +o +\f2@serialField\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.TP 2 +o +\f2{@value}\fP +.RE \f3An example of a field comment:\fP -.LP .nf \f3 .fl @@ -3286,133 +2460,48 @@ The following are the tags that can appear in the documentation comment for a fi .fl \fP .fi - -.LP .SS Constructor and Method Documentation Tags .LP -.LP The following are the tags that can appear in the documentation comment for a constructor or method, except for \f2@return\fP, which cannot appear in a constructor, and \f2{@inheritDoc}\fP, which has certain restrictions. The \f2@serialData\fP tag can only be used in the doc comment for certain serialization methods. .LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@deprecated\fP -.br -\f2@param\fP -.br -\f2@return\fP -.br -\f2@throws\fP and \f2@exception\fP -.br -\f2@serialData\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@inheritDoc}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Method/Constructor Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 2162 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Method/Constructor Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-28 - -.LP +\f3Method/Constructor Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@deprecated\fP +.TP 2 +o +\f2@param\fP +.TP 2 +o +\f2@return\fP +.TP 2 +o +\f2@throws\fP and \f2@exception\fP +.TP 2 +o +\f2@serialData\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@inheritDoc}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE \f3An example of a method doc comment:\fP -.LP .nf \f3 .fl @@ -3446,24 +2535,12 @@ The following are the tags that can appear in the documentation comment for a co .fl \fP .fi -.RE - -.LP .SH "OPTIONS" .LP - -.LP -.LP The javadoc tool uses doclets to determine its output. The Javadoc tool uses the default standard doclet unless a custom doclet is specified with the \-doclet option. The Javadoc tool provides a set of command\-line options that can be used with any doclet \-\- these options are described below under the sub\-heading Javadoc Options. The standard doclet provides an additional set of command\-line options that are described below under the sub\-heading Options Provided by the Standard Doclet. All option names are case\-insensitive, though their arguments can be case\-sensitive. .LP -.LP The options are: .LP -.RS 3 - -.LP -.LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -3615,6 +2692,8 @@ The options are: .br \-\f2sourcepath\fP .br +\-sourcetab +.br \-splitindex .br \-stylesheetfile @@ -3627,6 +2706,8 @@ The options are: .br \-tagletpath .br +\-top +.br \-title .br \-use @@ -3673,7 +2754,7 @@ The options are: .nr 42 \n(81+(3*\n(38) .nr 82 +\n(42 .nr TW \n(82 -.if t .if \n(TW>\n(.li .tm Table at line 2340 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 2015 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3704,276 +2785,8 @@ The options are: .in +\n(37u .a+ .in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(##u-1v -.nr 37 \n(41u -.in +\n(37u -.b+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(##u-1v -.nr 37 \n(42u -.in +\n(37u -.c+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.rm b+ -.rm c+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-123 - -.LP -.RE -.LP -Options shown in \f2italic\fP are the Javadoc core options, which are provided by the front end of the Javadoc tool and are available to all doclets. The standard doclet itself provides the non\-italic options. -.LP -.SS -Javadoc Options -.LP -.RS 3 -.TP 3 -\-overview \ path/filename -Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by \f2path/filename\fP and place it on the Overview page (\f2overview\-summary.html\fP). The \f2path/filename\fP is relative to the \f2\-sourcepath\fP. -.LP -While you can use any name you want for \f2filename\fP and place it anywhere you want for \f2path\fP, a typical thing to do is to name it \f2overview.html\fP and place it in the source tree at the directory that contains the topmost package directories. In this location, no \f2path\fP is needed when documenting packages, since \f2\-sourcepath\fP will point to this file. For example, if the source tree for the \f2java.lang\fP package is \f2/src/classes/java/lang/\fP, then you could place the overview file at \f2/src/classes/overview.html\fP. See Real World Example. -.LP -For information about the file specified by \f2path/filename\fP, see overview comment file. -.LP -Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) -.LP -The title on the overview page is set by \f2\-doctitle\fP. -.LP -.TP 3 -\-public -Shows only public classes and members. -.LP -.TP 3 -\-protected -Shows only protected and public classes and members. This is the default. -.LP -.TP 3 -\-package -Shows only package, protected, and public classes and members. -.LP -.TP 3 -\-private -Shows all classes and members. -.LP -.TP 3 -\-help -Displays the online help, which lists these javadoc and doclet command line options. -.LP -.TP 3 -\-doclet\ class -Specifies the class file that starts the doclet used in generating the documentation. Use the fully\-qualified name. This doclet defines the content and formats the output. If the \f4\-doclet\fP option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the \f2start(Root)\fP method. The path to this starting class is defined by the \f2\-docletpath\fP option. -.LP -For example, to call the MIF doclet, use: -.nf -\f3 -.fl - \-doclet com.sun.tools.doclets.mif.MIFDoclet -.fl -\fP -.fi -.LP -For full, working examples of running a particular doclet, see the -.na -\f2MIF Doclet documentation\fP @ -.fi -http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. -.LP -.TP 3 -\-docletpath\ classpathlist -Specifies the path to the doclet starting class file (specified with the \f2\-doclet\fP option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If \f2classpathlist\fP contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi\-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path. -.LP -Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included. -.nf -\f3 -.fl - \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar -.fl -\fP -.fi -Example of path to starting doclet class file. Notice the class filename is omitted. -.nf -\f3 -.fl - \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/ -.fl -\fP -.fi -For full, working examples of running a particular doclet, see the -.na -\f2MIF Doclet documentation\fP @ -.fi -http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. -.LP -.TP 3 -\-1.1 -\f2This feature has been removed from Javadoc 1.4. There is no replacement for it. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, use Javadoc 1.2 or 1.3 instead.\fP -.LP -.TP 3 -\-source release -Specifies the version of source code accepted. The following values for \f2release\fP are allowed: -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 81 -.nr 34 \n(.lu -.eo -.am 81 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/3u -.if \n(.l<\n(81 .ll \n(81u -.in 0 -javadoc accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior if the \f3\-source\fP flag is not used. -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.eo -.am 81 -.br -.di b+ -.35 -.ft \n(.f -.ll \n(34u*1u/3u -.if \n(.l<\n(81 .ll \n(81u -.in 0 -javadoc accepts code containing assertions, which were introduced in JDK 1.4. -.br -.di -.nr b| \n(dn -.nr b- \n(dl -.. -.ec \ -.eo -.am 81 -.br -.di c+ -.35 -.ft \n(.f -.ll \n(34u*1u/3u -.if \n(.l<\n(81 .ll \n(81u -.in 0 -javadoc does \f2not\fP support assertions, generics, or other language features introduced after JDK 1.3. -.br -.di -.nr c| \n(dn -.nr c- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 31 0 -.nr 32 0 -.nr 38 \w\f31 -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w.5\fP -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w\f31 -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w.4\fP -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w\f31 -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w.3\fP -.if \n(32<\n(38 .nr 32 \n(38 -.80 -.rm 80 -.nr 60 \n(31 -.nr 38 \n(60+\n(32 -.if \n(38>\n(80 .nr 80 \n(38 -.if \n(38<\n(80 .nr 60 +(\n(80-\n(38)/2 -.nr 81 0 -.81 -.rm 81 -.nr 38 \n(a- -.if \n(81<\n(38 .nr 81 \n(38 -.nr 38 \n(b- -.if \n(81<\n(38 .nr 81 \n(38 -.nr 38 \n(c- -.if \n(81<\n(38 .nr 81 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr 60 +\n(40 -.nr 41 \n(80+(3*\n(38) -.nr 81 +\n(41 -.nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 2450 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(60u \n(80u \n(81u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f31.5\fP\h'|\n(41u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(41u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.ne \n(b|u+\n(.Vu -.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) -.ta \n(60u \n(80u \n(81u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f31.4\fP\h'|\n(41u' -.mk ## -.nr 31 \n(## +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 .sp |\n(##u-1v .nr 37 \n(41u .in +\n(37u @@ -3981,17 +2794,8 @@ javadoc does \f2not\fP support assertions, generics, or other language features .in -\n(37u .mk 32 .if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.ne \n(c|u+\n(.Vu -.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) -.ta \n(60u \n(80u \n(81u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f31.3\fP\h'|\n(41u' -.mk ## -.nr 31 \n(## .sp |\n(##u-1v -.nr 37 \n(41u +.nr 37 \n(42u .in +\n(37u .c+ .in -\n(37u @@ -4005,17 +2809,112 @@ javadoc does \f2not\fP support assertions, generics, or other language features .rm a+ .rm b+ .rm c+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-14 -.LP -Use the value of \f2release\fP corresponding to that used when compiling the code with javac. +.if \n-(b.=0 .nr c. \n(.c-\n(d.-127 .LP +Options shown in \f2italic\fP are the Javadoc core options, which are provided by the front end of the Javadoc tool and are available to all doclets. The standard doclet itself provides the non\-italic options. +.SS +Javadoc Options +.RS 3 +.TP 3 +\-overview \ path/filename +Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by \f2path/filename\fP and place it on the Overview page (\f2overview\-summary.html\fP). The \f2path/filename\fP is relative to the current directory. +.br +.br +While you can use any name you want for \f2filename\fP and place it anywhere you want for \f2path\fP, a typical thing to do is to name it \f2overview.html\fP and place it in the source tree at the directory that contains the topmost package directories. In this location, no \f2path\fP is needed when documenting packages, since \f2\-sourcepath\fP will point to this file. For example, if the source tree for the \f2java.lang\fP package is \f2/src/classes/java/lang/\fP, then you could place the overview file at \f2/src/classes/overview.html\fP. See Real World Example. +.br +.br +For information about the file specified by \f2path/filename\fP, see overview comment file. +.br +.br +Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) +.br +.br +The title on the overview page is set by \f2\-doctitle\fP. +.TP 3 +\-public +Shows only public classes and members. +.TP 3 +\-protected +Shows only protected and public classes and members. This is the default. +.TP 3 +\-package +Shows only package, protected, and public classes and members. +.TP 3 +\-private +Shows all classes and members. +.TP 3 +\-help +Displays the online help, which lists these javadoc and doclet command line options. +.TP 3 +\-doclet\ class +Specifies the class file that starts the doclet used in generating the documentation. Use the fully\-qualified name. This doclet defines the content and formats the output. If the \f4\-doclet\fP option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the \f2start(Root)\fP method. The path to this starting class is defined by the \f2\-docletpath\fP option. +.br +.br +For example, to call the MIF doclet, use: +.nf +\f3 +.fl + \-doclet com.sun.tools.doclets.mif.MIFDoclet +.fl +\fP +.fi +For full, working examples of running a particular doclet, see the +.na +\f2MIF Doclet documentation\fP @ +.fi +http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. +.TP 3 +\-docletpath\ classpathlist +Specifies the path to the doclet starting class file (specified with the \f2\-doclet\fP option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If \f2classpathlist\fP contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi\-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path. +.br +.br +Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included. +.nf +\f3 +.fl + \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar +.fl +\fP +.fi +Example of path to starting doclet class file. Notice the class filename is omitted. +.nf +\f3 +.fl + \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/ +.fl +\fP +.fi +For full, working examples of running a particular doclet, see the +.na +\f2MIF Doclet documentation\fP @ +.fi +http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. +.TP 3 +\-1.1 +\f2This feature has been removed from Javadoc 1.4. There is no replacement for it. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, use Javadoc 1.2 or 1.3 instead.\fP +.TP 3 +\-source release +Specifies the version of source code accepted. The following values for \f2release\fP are allowed: +.RS 3 +.TP 2 +o +\f31.5\fP \- javadoc accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior if the \f3\-source\fP flag is not used. +.TP 2 +o +\f31.4\fP \- javadoc accepts code containing assertions, which were introduced in JDK 1.4. +.TP 2 +o +\f31.3\fP \- javadoc does \f2not\fP support assertions, generics, or other language features introduced after JDK 1.3. +.RE +Use the value of \f2release\fP corresponding to that used when compiling the code with javac. .TP 3 \-sourcepath\ sourcepathlist -Specifies the search paths for finding source files (\f2.java\fP) when passing package names or \f2\-subpackages\fP into the \f2javadoc\fP command. The \f2sourcepathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented but whose comments are inherited by the source files being documented. -.LP -Note that you can use the \f2\-sourcepath\fP option only when passing package names into the javadoc command \-\- it will not locate \f2.java\fP files passed into the \f2javadoc\fP command. (To locate \f2.java\fP files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If \f2\-sourcepath\fP is omitted, javadoc uses the class path to find the source files (see \-classpath). Therefore, the default \-sourcepath is the value of class path. If \-classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files. -.LP +Specifies the search paths for finding source files (\f2.java\fP) when passing package names or \f2\-subpackages\fP into the \f2javadoc\fP command. The \f2sourcepathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented but whose comments are inherited by the source files being documented. +.br +.br +Note that you can use the \f2\-sourcepath\fP option only when passing package names into the javadoc command \-\- it will not locate \f2.java\fP files passed into the \f2javadoc\fP command. (To locate \f2.java\fP files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If \f2\-sourcepath\fP is omitted, javadoc uses the class path to find the source files (see \-classpath). Therefore, the default \-sourcepath is the value of class path. If \-classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files. +.br +.br Set \f2sourcepathlist\fP to the root directory of the source tree for the package you are documenting. For example, suppose you want to document a package called \f2com.mypackage\fP whose source files are located at: .nf \f3 @@ -4031,8 +2930,9 @@ In this case you would specify the \f2sourcepath\fP to \f2/home/user/src\fP, the % \fP\f3javadoc \-sourcepath /home/user/src/ com.mypackage\fP .fl .fi -This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a slash "/", you end up with the full path to the package: \f2/home/user/src/com/mypackage\fP. -.LP +This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a slash "/", you end up with the full path to the package: \f2/home/user/src/com/mypackage\fP. +.br +.br To point to two source paths: .nf \f3 @@ -4040,17 +2940,18 @@ To point to two source paths: % \fP\f3javadoc \-sourcepath /home/user1/src:/home/user2/src com.mypackage\fP .fl .fi -.LP .TP 3 \-classpath\ classpathlist Specifies the paths where javadoc will look for referenced classes (\f2.class\fP files) \-\- these are the documented classes plus any classes referenced by those classes. The \f2classpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Follow the instructions in .na \f2class path\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#general documentation for specifying \f2classpathlist\fP. -.LP -If \f2\-sourcepath\fP is omitted, the Javadoc tool uses \f2\-classpath\fP to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both \f2\-sourcepath\fP and \f2\-classpath\fP. -.LP +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general documentation for specifying \f2classpathlist\fP. +.br +.br +If \f2\-sourcepath\fP is omitted, the Javadoc tool uses \f2\-classpath\fP to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both \f2\-sourcepath\fP and \f2\-classpath\fP. +.br +.br For example, if you want to document \f2com.mypackage\fP, whose source files reside in the directory \f2/home/user/src/com/mypackage\fP, and if this package relies on a library in \f2/home/user/lib\fP, you would specify: .nf \f3 @@ -4058,23 +2959,25 @@ For example, if you want to document \f2com.mypackage\fP, whose source files res % \fP\f3javadoc \-classpath /home/user/lib \-sourcepath /home/user/src com.mypackage\fP .fl .fi -As with other tools, if you do not specify \f2\-classpath\fP, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory. -.LP +As with other tools, if you do not specify \f2\-classpath\fP, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory. +.br +.br For an in\-depth description of how the Javadoc tool uses \f2\-classpath\fP to find user classes as it relates to extension classes and bootstrap classes, see .na \f2How Classes Are Found\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html. -.LP -As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations). +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html. .br .br -For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. -.LP +As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a Java program cannot tell the difference between the two invocations). +.br +.br +For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. .TP 3 \-subpackages\ \ package1:package2:... -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, as they are automatically included. Each \f2package\fP argument is any top\-level subpackage (such as \f2java\fP) or fully qualified package (such as \f2javax.swing\fP) that does not need to contain source files. Arguments are separated by colons (on all operating systmes). Wildcards are not needed or allowed. Use \f2\-sourcepath\fP to specify where to find the packages. This option is smart about not processing source files that are in the source tree but do not belong to the packages, as described at processing of source files. -.LP +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, as they are automatically included. Each \f2package\fP argument is any top\-level subpackage (such as \f2java\fP) or fully qualified package (such as \f2javax.swing\fP) that does not need to contain source files. Arguments are separated by colons (on all operating systmes). Wildcards are not needed or allowed. Use \f2\-sourcepath\fP to specify where to find the packages. This option is smart about not processing source files that are in the source tree but do not belong to the packages, as described at processing of source files. +.br +.br For example: .nf \f3 @@ -4082,10 +2985,10 @@ For example: % \fP\f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax.swing\fP .fl .fi -This command generates documentation for packages named "java" and "javax.swing" and all their subpackages. -.LP -You can use \f2\-subpackages\fP in conjunction with \f2\-exclude\fP to exclude specific packages. -.LP +This command generates documentation for packages named "java" and "javax.swing" and all their subpackages. +.br +.br +You can use \f2\-subpackages\fP in conjunction with \f2\-exclude\fP to exclude specific packages. .TP 3 \-exclude\ \ packagename1:packagename2:... Unconditionally excludes the specified packages and their subpackages from the list formed by \f2\-subpackages\fP. It excludes those packages even if they would otherwise be included by some previous or later \f2\-subpackages\fP option. For example: @@ -4095,36 +2998,32 @@ Unconditionally excludes the specified packages and their subpackages from the l % \fP\f3javadoc \-sourcepath /home/user/src \-subpackages java \-exclude java.net:java.lang\fP .fl .fi -would include \f2java.io\fP, \f2java.util\fP, and \f2java.math\fP (among others), but would exclude packages rooted at \f2java.net\fP and \f2java.lang\fP. Notice this excludes \f2java.lang.ref\fP, a subpackage of \f2java.lang\fP). -.LP +would include \f2java.io\fP, \f2java.util\fP, and \f2java.math\fP (among others), but would exclude packages rooted at \f2java.net\fP and \f2java.lang\fP. Notice this excludes \f2java.lang.ref\fP, a subpackage of \f2java.lang\fP). .TP 3 \-bootclasspath\ classpathlist Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files. See .na \f2How Classes Are Found\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html#srcfiles. for more details. Separate directories in \f2classpathlist\fP with colons (:). -.LP +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html#srcfiles. for more details. Separate directories in \f2classpathlist\fP with colons (:). .TP 3 \-extdirs\ dirlist -Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See \f2\-classpath\fP (above) for more details. Separate directories in \f2dirlist\fP with colons (:). -.LP +Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See \f2\-classpath\fP (above) for more details. Separate directories in \f2dirlist\fP with colons (:). .TP 3 \-verbose -Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file. -.LP +Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file. .TP 3 \-quiet -Shuts off non\-error and non\-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string. -.LP +Shuts off non\-error and non\-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string. .TP 3 \-breakiterator\ Uses the internationalized sentence boundary of .na \f2java.text.BreakIterator\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/text/BreakIterator.html to determine the end of the first sentence for English (all other locales already use \f2BreakIterator\fP), rather than an English language, locale\-specific algorithm. By \f2first sentence\fP, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index. -.LP +http://download.oracle.com/javase/7/docs/api/java/text/BreakIterator.html to determine the end of the first sentence for English (all other locales already use \f2BreakIterator\fP), rather than an English language, locale\-specific algorithm. By \f2first sentence\fP, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index. +.br +.br From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English. Therefore, the \f2\-breakiterator\fP option has no effect except for English from 1.2 forward. English has its own default algorithm: .RS 3 .TP 2 @@ -4134,31 +3033,22 @@ English default sentence\-break algorithm \- Stops at a period followed by a spa o Breakiterator sentence\-break algorithm \- In general, stops at a period, question mark or exclamation mark followed by a space if the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith"). Doesn't stop at HTML tags or sentences that begin with numbers or symbols. Stops at the last period in "../filename", even if embedded in an HTML tag. .RE -.RS 3 - -.LP -.LP -NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence\-break algorithm unchanged. That is, the \-breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused. -.LP -.RE +NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence\-break algorithm unchanged. That is, the \-breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused. .TP 3 \-locale\ language_country_variant -.RS 3 -.LP \f3Important\fP \- The \f2\-locale\fP option must be placed \f2ahead\fP (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command\-line option that is order\-dependent. -.LP -.RE -.LP -Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as \f2en_US\fP (English, United States) or \f2en_US_WIN\fP (Windows variant). -.LP -Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes. -.LP +.br +.br +Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as \f2en_US\fP (English, United States) or \f2en_US_WIN\fP (Windows variant). +.br +.br +Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes. .TP 3 \-encoding\ name -Specifies the encoding name of the source files, such as \f2EUCJIS/SJIS\fP. If this option is not specified, the platform default converter is used. -.LP -Also see \-docencoding and \-charset. -.LP +Specifies the encoding name of the source files, such as \f2EUCJIS/SJIS\fP. If this option is not specified, the platform default converter is used. +.br +.br +Also see \-docencoding and \-charset. .TP 3 \-Jflag Passes \f2flag\fP directly to the runtime system java that runs javadoc. Notice there must be no space between the \f2J\fP and the \f2flag\fP. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the \f2\-Xmx\fP option of java as follows (\f2\-Xms\fP is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required): @@ -4183,12 +3073,12 @@ To tell what version of javadoc you are using, call the "\f2\-version\fP" option .RE .SS Options Provided by the Standard Doclet -.LP .RS 3 .TP 3 \-d\ directory -Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value \f2directory\fP can be absolute, or relative to the current working directory. As of 1.4, the destination directory is automatically created when javadoc is run. -.LP +Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value \f2directory\fP can be absolute, or relative to the current working directory. As of 1.4, the destination directory is automatically created when javadoc is run. +.br +.br For example, the following generates the documentation for the package \f2com.mypackage\fP and saves the results in the \f2/home/user/doc/\fP directory: .nf \f3 @@ -4196,28 +3086,27 @@ For example, the following generates the documentation for the package \f2com.my % \fP\f3javadoc \-d /home/user/doc com.mypackage\fP .fl .fi -.LP .TP 3 \-use -Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given 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. -.LP -For example, let us look at what might appear on the "Use" page for String. The \f2getName()\fP method in the \f2java.awt.Font\fP class returns type \f2String\fP. Therefore, \f2getName()\fP uses \f2String\fP, and you will find that method on the "Use" page for \f2String\fP. -.LP -Note that this documents only uses of the API, not the implementation. If a method uses \f2String\fP in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of \f2String\fP. -.LP -You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar. +Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given 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. +.br +.br +For example, let us look at what might appear on the "Use" page for String. The \f2getName()\fP method in the \f2java.awt.Font\fP class returns type \f2String\fP. Therefore, \f2getName()\fP uses \f2String\fP, and you will find that method on the "Use" page for \f2String\fP. +.br +.br +Note that this documents only uses of the API, not the implementation. If a method uses \f2String\fP in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of \f2String\fP. +.br +.br +You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar. .TP 3 \-version -Includes the @version text in the generated docs. This text is omitted by default. To tell what version of the Javadoc tool you are using, use the \f2\-J\-version\fP option. -.LP +Includes the @version text in the generated docs. This text is omitted by default. To tell what version of the Javadoc tool you are using, use the \f2\-J\-version\fP option. .TP 3 \-author -Includes the @author text in the generated docs. -.LP +Includes the @author text in the generated docs. .TP 3 \-splitindex -Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non\-alphabetical characters. -.LP +Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non\-alphabetical characters. .TP 3 \-windowtitle\ title Specifies the title to be placed in the HTML tag. This 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, as the browser will not properly interpret them. Any internal quotation marks within \f2title\fP may have to be escaped. If \-windowtitle is omitted, the Javadoc tool uses the value of \-doctitle for this option. @@ -4238,8 +3127,7 @@ Specifies the title to be placed near the top of the overview summary file. The .fi .TP 3 \-title\ title -\f3This option no longer exists.\fP It existed only in Beta versions of Javadoc 1.2. It has been renamed to \f2\-doctitle\fP. This option is being renamed to make it clear that it defines the document title rather than the window title. -.LP +\f3This option no longer exists.\fP It existed only in Beta versions of Javadoc 1.2. It has been renamed to \f2\-doctitle\fP. This option is being renamed to make it clear that it defines the document title rather than the window title. .TP 3 \-header\ header Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. \f2header\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2header\fP may have to be escaped. @@ -4249,28 +3137,30 @@ Specifies the header text to be placed at the top of each output file. The heade % \fP\f3javadoc \-header "<b>Java 2 Platform </b><br>v1.4" com.mypackage\fP .fl .fi -.LP .TP 3 \-footer\ footer Specifies the footer text to be placed at the bottom of each output file. The footer will be placed to the right of the lower navigation bar. \f2footer\fP may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2footer\fP may have to be escaped. -.LP +.TP 3 +\-top +Specifies the text to be placed at the top of each output file. .TP 3 \-bottom\ text -Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The \f2text\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2text\fP may have to be escaped. -.LP +Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The \f2text\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2text\fP may have to be escaped. .TP 3 \-link\ extdocURL -Creates links to existing javadoc\-generated documentation of external referenced classes. It takes one argument: -.LP +Creates links to existing javadoc\-generated documentation of external referenced classes. It takes one argument: .RS 3 .TP 2 o -\f4extdocURL\fP is the absolute or relative URL of the directory containing the external javadoc\-generated documentation you want to link to. Examples are shown below. The package\-list file must be found in this directory (otherwise, use \f2\-linkoffline\fP). The Javadoc tool reads the package names from the \f2package\-list\fP file and then links to those packages at that URL. When the Javadoc tool is run, the \f2extdocURL\fP value is copied literally into the \f2<A HREF>\fP links that are created. Therefore, \f2extdocURL\fP must be the URL to the \f2directory\fP, not to a file. -.LP -You can use an absolute link for \f2extdocURL\fP to enable your docs to link to a document on any website, or can use a relative link to link only to a relative location. If relative, the value you pass in should be the relative path from the destination directory (specified with \f2\-d\fP) to the directory containing the packages being linked to. -.LP -When specifying an absolute link you normally use an \f2http:\fP link. However, if you want to link to a file system that has no web server, you can use a \f2file:\fP link \-\- however, do this only if everyone wanting to access the generated documentation shares the same file system. -.LP +\f4extdocURL\fP is the absolute or relative URL of the directory containing the external javadoc\-generated documentation you want to link to. Examples are shown below. The package\-list file must be found in this directory (otherwise, use \f2\-linkoffline\fP). The Javadoc tool reads the package names from the \f2package\-list\fP file and then links to those packages at that URL. When the Javadoc tool is run, the \f2extdocURL\fP value is copied literally into the \f2<A HREF>\fP links that are created. Therefore, \f2extdocURL\fP must be the URL to the \f2directory\fP, not to a file. +.br +.br +You can use an absolute link for \f2extdocURL\fP to enable your docs to link to a document on any website, or can use a relative link to link only to a relative location. If relative, the value you pass in should be the relative path from the destination directory (specified with \f2\-d\fP) to the directory containing the packages being linked to. +.br +.br +When specifying an absolute link you normally use an \f2http:\fP link. However, if you want to link to a file system that has no web server, you can use a \f2file:\fP link \-\- however, do this only if everyone wanting to access the generated documentation shares the same file system. +.br +.br In all cases, and on all operating systems, you should use a forward slash as the separator, whether the URL is absolute or relative, and "http:" or "file:" based (as specified in the .na \f2URL Memo\fP @ @@ -4288,8 +3178,11 @@ Relative link: \f2\-link <directory>/<directory>/.../<name>\fP .RE .RE -.LP -You can specify multiple \f2\-link\fP options in a given javadoc run to link to multiple documents. \f3Choosing between \-linkoffline and \-link\fP: +You can specify multiple \f2\-link\fP options in a given javadoc run to link to multiple documents. +.br +.br +\f3Choosing between \-linkoffline and \-link\fP: +.br .br Use \f2\-link\fP: .RS 3 @@ -4306,16 +3199,17 @@ Use \f2\-linkoffline\fP: o when using an absolute URL to the external API document, if your shell \f2does not allow\fP a program to open a connection to that URL for reading. This can occur if you are behind a firewall and the document you want to link to is on the other side. .RE -.LP +.br +.br \f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java Platform packages at .na -\f2http://java.sun.com/javase/6/docs/api/\fP @ +\f2http://download.oracle.com/javase/7/docs/api/\fP @ .fi -http://java.sun.com/javase/6/docs/api. The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other options, such as \f2\-sourcepath\fP and \f2\-d\fP, are not shown.) +http://download.oracle.com/javase/7/docs/api/. The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other options, such as \f2\-sourcepath\fP and \f2\-d\fP, are not shown.) .nf \f3 .fl - % \fP\f3javadoc \-link http://java.sun.com/javase/6/docs/api com.mypackage\fP + % \fP\f3javadoc \-link http://download.oracle.com/javase/7/docs/api/ com.mypackage\fP .fl .fi \f3Example using relative links to the external docs\fP \- Let us say you have two packages whose docs are generated in different runs of the Javadoc tool, and those docs are separated by a relative path. In this example, the packages are \f2com.apipackage\fP, an API, and \f2com.spipackage\fP, an SPI (Service Provide Interface). You want the documentation to reside in \f2docs/api/com/apipackage\fP and \f2docs/spi/com/spipackage\fP. Assuming the API package documentation is already generated, and that \f2docs\fP is the current directory, you would document the SPI package with links to the API documentation by running: @@ -4325,17 +3219,21 @@ http://java.sun.com/javase/6/docs/api. The following command generates documenta % \fP\f3javadoc \-d ./spi \-link ../api com.spipackage\fP .fl .fi -.LP -Notice the \f2\-link\fP argument is relative to the destination directory (\f2docs/spi\fP). -.LP -\f3Details\fP \- The \f2\-link\fP option enables you to link to classes referenced to by your code but \f2not\fP documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with \f2extdocURL\fP. This allows, for instance, third party documentation to link to \f2java.*\fP documentation on \f2http://java.sun.com\fP. -.LP -Omit the \f2\-link\fP option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the \f2\-link\fP option, the Javadoc tool does not create links to documentation for external references, because it does not know if or where that documentation exists.) -.LP -This option can create links in several places in the generated documentation. -.LP -Another use is for cross\-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. -.LP +Notice the \f2\-link\fP argument is relative to the destination directory (\f2docs/spi\fP). +.br +.br +\f3Details\fP \- The \f2\-link\fP option enables you to link to classes referenced to by your code but \f2not\fP documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with \f2extdocURL\fP. This allows, for instance, third party documentation to link to \f2java.*\fP documentation on \f2http://java.sun.com\fP. +.br +.br +Omit the \f2\-link\fP option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the \f2\-link\fP option, the Javadoc tool does not create links to documentation for external references, because it does not know if or where that documentation exists.) +.br +.br +This option can create links in several places in the generated documentation. +.br +.br +Another use is for cross\-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. +.br +.br \f3How a Class Must be Referenced\fP \- For a link to an external referenced class to actually appear (and not just its text label), the class must be referenced in the following way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an \f2import\fP statement or in a declaration. Here are examples of how the class \f2java.io.File\fP can be referenced: .RS 3 .TP 2 @@ -4353,16 +3251,17 @@ In a declaration: .br The reference and be in the return type or parameter type of a method, constructor, field, class or interface, or in an \f2implements\fP, \f2extends\fP or \f2throws\fP statement. .RE -.LP -An important corollary is that when you use the \f2\-link\fP option, there may be many links that unintentionally do not appear due to this constraint. (The text would appear without a hypertext link.) You can detect these by the warnings they emit. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above. -.LP -\f3Package List\fP \- The \f2\-link\fP option requires that a file named \f2package\-list\fP, which is generated by the Javadoc tool, exist at the URL you specify with \f2\-link\fP. The \f2package\-list\fP file is a simple text file that lists the names of packages documented at that location. In the earlier example, the Javadoc tool looks for a file named \f2package\-list\fP at the given URL, reads in the package names and then links to those packages at that URL. -.LP +An important corollary is that when you use the \f2\-link\fP option, there may be many links that unintentionally do not appear due to this constraint. (The text would appear without a hypertext link.) You can detect these by the warnings they emit. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above. +.br +.br +\f3Package List\fP \- The \f2\-link\fP option requires that a file named \f2package\-list\fP, which is generated by the Javadoc tool, exist at the URL you specify with \f2\-link\fP. The \f2package\-list\fP file is a simple text file that lists the names of packages documented at that location. In the earlier example, the Javadoc tool looks for a file named \f2package\-list\fP at the given URL, reads in the package names and then links to those packages at that URL. +.br +.br For example, the package list for the Java SE 6 API is located at .na -\f2http://java.sun.com/javase/6/docs/api/package\-list\fP @ +\f2http://download.oracle.com/javase/7/docs/api/package\-list\fP @ .fi -http://java.sun.com/javase/6/docs/api/package\-list. and starts as follows: +http://download.oracle.com/javase/7/docs/api/package\-list. and starts as follows: .nf \f3 .fl @@ -4384,31 +3283,39 @@ http://java.sun.com/javase/6/docs/api/package\-list. and starts as follows: .fl \fP .fi -.LP -When javadoc is run without the \f2\-link\fP option, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the \f2\-link\fP option is used, the Javadoc tool searches the \f2package\-list\fP file at the specified \f2extdocURL\fP location for that package name. If it finds the package name, it prefixes the name with \f2extdocURL\fP. -.LP -In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The Javadoc tool will not check that these pages exist \-\- only that the package\-list exists. -.LP -\f3Multiple Links\fP \- You can supply multiple \f2\-link\fP options to link to any number of external generated documents. \ Javadoc 1.2 has a known bug which prevents you from supplying more than one \f2\-link\fP command. This was fixed in 1.2.2. -.LP -Specify a different link option for each external document to link to: -.LP -\ \ \f2% \fP\f4javadoc \-link\fP \f2extdocURL1\fP \f4\-link\fP \f2extdocURL2\fP \f2... \fP\f4\-link\fP \f2extdocURLn\fP \f4com.mypackage\fP -.LP -where \f2extdocURL1\fP,\ \f2extdocURL2\fP,\ ... \f2extdocURLn\fP point respectively to the roots of external documents, each of which contains a file named \f2package\-list\fP. -.LP -\f3Cross\-links\fP \- Note that "bootstrapping" may be required when cross\-linking two or more documents that have not previously been generated. In other words, if \f2package\-list\fP does not exist for either document, when you run the Javadoc tool on the first document, the \f2package\-list\fP will not yet exist for the second document. Therefore, to create the external links, you must re\-generate the first document after generating the second document. -.LP -In this case, the purpose of first generating a document is to create its \f2package\-list\fP (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. The Javadoc tool prints a warning if a needed external \f2package\-list\fP file does not exist. -.LP +When javadoc is run without the \f2\-link\fP option, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the \f2\-link\fP option is used, the Javadoc tool searches the \f2package\-list\fP file at the specified \f2extdocURL\fP location for that package name. If it finds the package name, it prefixes the name with \f2extdocURL\fP. +.br +.br +In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The Javadoc tool will not check that these pages exist \-\- only that the package\-list exists. +.br +.br +\f3Multiple Links\fP \- You can supply multiple \f2\-link\fP options to link to any number of external generated documents. \ Javadoc 1.2 has a known bug which prevents you from supplying more than one \f2\-link\fP command. This was fixed in 1.2.2. +.br +.br +Specify a different link option for each external document to link to: +.br +.br +\ \ \f2% \fP\f4javadoc \-link\fP \f2extdocURL1\fP \f4\-link\fP \f2extdocURL2\fP \f2... \fP\f4\-link\fP \f2extdocURLn\fP \f4com.mypackage\fP +.br +.br +where \f2extdocURL1\fP,\ \f2extdocURL2\fP,\ ... \f2extdocURLn\fP point respectively to the roots of external documents, each of which contains a file named \f2package\-list\fP. +.br +.br +\f3Cross\-links\fP \- Note that "bootstrapping" may be required when cross\-linking two or more documents that have not previously been generated. In other words, if \f2package\-list\fP does not exist for either document, when you run the Javadoc tool on the first document, the \f2package\-list\fP will not yet exist for the second document. Therefore, to create the external links, you must re\-generate the first document after generating the second document. +.br +.br +In this case, the purpose of first generating a document is to create its \f2package\-list\fP (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. The Javadoc tool prints a warning if a needed external \f2package\-list\fP file does not exist. .TP 3 \-linkoffline\ extdocURL\ packagelistLoc -This option is a variation of \f2\-link\fP; they both create links to javadoc\-generated documentation for external referenced classes. Use the \f2\-linkoffline\fP option when linking to a document on the web when the Javadoc tool itself is "offline" \-\- that is, it cannot access the document through a web connection. -.LP -More specifically, use \f2\-linkoffline\fP if the external document's \f2package\-list\fP file is not accessible or does not exist at the \f2extdocURL\fP location but does exist at a different location, which can be specified by \f2packageListLoc\fP (typically local). Thus, if \f2extdocURL\fP is accessible only on the World Wide Web, \f2\-linkoffline\fP removes the constraint that the Javadoc tool have a web connection when generating the documentation. -.LP -Another use is as a "hack" to update docs: After you have run javadoc on a full set of packages, then you can run javadoc again on onlya smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples are given below. -.LP +This option is a variation of \f2\-link\fP; they both create links to javadoc\-generated documentation for external referenced classes. Use the \f2\-linkoffline\fP option when linking to a document on the web when the Javadoc tool itself is "offline" \-\- that is, it cannot access the document through a web connection. +.br +.br +More specifically, use \f2\-linkoffline\fP if the external document's \f2package\-list\fP file is not accessible or does not exist at the \f2extdocURL\fP location but does exist at a different location, which can be specified by \f2packageListLoc\fP (typically local). Thus, if \f2extdocURL\fP is accessible only on the World Wide Web, \f2\-linkoffline\fP removes the constraint that the Javadoc tool have a web connection when generating the documentation. +.br +.br +Another use is as a "hack" to update docs: After you have run javadoc on a full set of packages, then you can run javadoc again on onlya smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples are given below. +.br +.br The \f2\-linkoffline\fP option takes two arguments \-\- the first for the string to be embedded in the \f2<a href>\fP links, the second telling it where to find \f2package\-list\fP: .RS 3 .TP 2 @@ -4418,35 +3325,39 @@ o o \f4packagelistLoc\fP is the path or URL to the directory containing the \f2package\-list\fP file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. If relative, make it relative to the \f2current\fP directory from where javadoc was run. Do not include the \f2package\-list\fP filename. .RE -.LP -You can specify multiple \f2\-linkoffline\fP options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.) -.LP -\f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java SE Platform packages at \f2http://java.sun.com/javase/6/docs/api\fP, but your shell does not have web access. You could open the \f2package\-list\fP file in a browser at +You can specify multiple \f2\-linkoffline\fP options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.) +.br +.br +\f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java SE Platform packages at \f2http://download.oracle.com/javase/7/docs/api/\fP, but your shell does not have web access. You could open the \f2package\-list\fP file in a browser at .na -\f2http://java.sun.com/javase/6/docs/api/package\-list\fP @ +\f2http://download.oracle.com/javase/7/docs/api/package\-list\fP @ .fi -http://java.sun.com/javase/6/docs/api/package\-list, save it to a local directory, and point to this local copy with the second argument, \f2packagelistLoc\fP. In this example, the package list file has been saved to the current directory "\f2.\fP" . The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other necessary options, such as \f2\-sourcepath\fP, are not shown.) +http://download.oracle.com/javase/7/docs/api/package\-list, save it to a local directory, and point to this local copy with the second argument, \f2packagelistLoc\fP. In this example, the package list file has been saved to the current directory "\f2.\fP" . The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other necessary options, such as \f2\-sourcepath\fP, are not shown.) .nf \f3 .fl -% \fP\f3javadoc \-linkoffline http://java.sun.com/javase/6/docs/api . com.mypackage\fP +% \fP\f3javadoc \-linkoffline http://download.oracle.com/javase/7/docs/api/ . com.mypackage\fP .fl .fi -.LP -\f3Example using relative links to the external docs\fP \- It's not very common to use \f2\-linkoffline\fP with relative paths, for the simple reason that \f2\-link\fP usually suffices. When using \f2\-linkoffline\fP, the \f2package\-list\fP file is generally local, and when using relative links, the file you are linking to is also generally local. So it is usually unnecessary to give a different path for the two arguments to \f2\-linkoffline\fP. When the two arguments are identical, you can use \f2\-link\fP. See the \f2\-link\fP relative example. -.LP -\f3Manually Creating a \fP\f4package\-list\fP\f3 File\fP \- If a \f2package\-list\fP file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with \f2packagelistLoc\fP. An example would be the previous case where the package list for \f2com.spipackage\fP did not exist when \f2com.apipackage\fP was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating \f2package\-list\fP files for packages generated with Javadoc 1.0 or 1.1, where \f2package\-list\fP files were not generated. Likewise, two companies can share their unpublished \f2package\-list\fP files, enabling them to release their cross\-linked documentation simultaneously. -.LP -\f3Linking to Multiple Documents\fP \- You can include \f2\-linkoffline\fP once for each generated document you want to refer to (each option is shown on a separate line for clarity): -.LP +\f3Example using relative links to the external docs\fP \- It's not very common to use \f2\-linkoffline\fP with relative paths, for the simple reason that \f2\-link\fP usually suffices. When using \f2\-linkoffline\fP, the \f2package\-list\fP file is generally local, and when using relative links, the file you are linking to is also generally local. So it is usually unnecessary to give a different path for the two arguments to \f2\-linkoffline\fP. When the two arguments are identical, you can use \f2\-link\fP. See the \f2\-link\fP relative example. +.br +.br +\f3Manually Creating a \fP\f4package\-list\fP\f3 File\fP \- If a \f2package\-list\fP file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with \f2packagelistLoc\fP. An example would be the previous case where the package list for \f2com.spipackage\fP did not exist when \f2com.apipackage\fP was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating \f2package\-list\fP files for packages generated with Javadoc 1.0 or 1.1, where \f2package\-list\fP files were not generated. Likewise, two companies can share their unpublished \f2package\-list\fP files, enabling them to release their cross\-linked documentation simultaneously. +.br +.br +\f3Linking to Multiple Documents\fP \- You can include \f2\-linkoffline\fP once for each generated document you want to refer to (each option is shown on a separate line for clarity): +.br +.br \f2% \fP\f4javadoc \-linkoffline\fP \f2extdocURL1\fP \f2packagelistLoc1\fP \f2\\\fP .br \f2\ \ \ \ \ \ \ \ \ \ \fP\f4\-linkoffline\fP \f2extdocURL2\fP \f2packagelistLoc2\fP \f2\\\fP .br -\f2\ \ \ \ \ \ \ \ \ \ ...\fP -.LP -\f3Updating docs\fP \- Another use for \f2\-linkoffline\fP option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re\-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to declarations. If you were to add, remove or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, and other places. -.LP +\f2\ \ \ \ \ \ \ \ \ \ ...\fP +.br +.br +\f3Updating docs\fP \- Another use for \f2\-linkoffline\fP option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re\-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to declarations. If you were to add, remove or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, and other places. +.br +.br First, you create a new destination directory (call it \f2update\fP) for this new small run. Let us say the original destination directory was named \f2html\fP. In the simplest example, cd to the parent of \f2html\fP. Set the first argument of \f2\-linkoffline\fP to the current directory "." and set the second argument to the relative path to \f2html\fP, where it can find \f2package\-list\fP, and pass in only the package names of the packages you want to update: .nf \f3 @@ -4454,14 +3365,15 @@ First, you create a new destination directory (call it \f2update\fP) for this ne % \fP\f3javadoc \-d update \-linkoffline . html com.mypackage\fP .fl .fi -When the Javadoc tool is done, copy these generated class pages in \f2update/com/package\fP (not the overview or index), over the original files in \f2html/com/package\fP. -.LP +When the Javadoc tool is done, copy these generated class pages in \f2update/com/package\fP (not the overview or index), over the original files in \f2html/com/package\fP. .TP 3 \-linksource\ -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 fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes. -.LP -\f3This option exposes \fP\f4all\fP\f3 private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, \fP\f4regardless of the \fP\f4\-public\fP\f3, \fP\f4\-package\fP\f3, \fP\f4\-protected\fP\f3 and \fP\f4\-private\fP\f3 options.\fP Unless you also use the \f2\-private\fP option, not all private classes or interfaces will necessarily be accessible via links. -.LP +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 fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes. +.br +.br +\f3This option exposes \fP\f4all\fP\f3 private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, \fP\f4regardless of the \fP\f4\-public\fP\f3, \fP\f4\-package\fP\f3, \fP\f4\-protected\fP\f3 and \fP\f4\-private\fP\f3 options.\fP Unless you also use the \f2\-private\fP option, not all private classes or interfaces will necessarily be accessible via links. +.br +.br Each link appears on the name of the identifier in its declaration. For example, the link to the source code of the \f2Button\fP class would be on the word "Button": .nf \f3 @@ -4482,7 +3394,6 @@ and the link to the source code of the \f2getLabel()\fP method in the Button cla .fl \fP .fi -.LP .TP 3 \-group\ groupheading\ packagepattern:packagepattern:... Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different \f2\-group\fP option. The groups appear on the page in the order specified on the command line; packages are alphabetized within a group. For a given \f2\-group\fP option, the packages matching the list of \f2packagepattern\fP expressions appear in a table with the heading \f2groupheading\fP. @@ -4494,16 +3405,12 @@ o o \f4packagepattern\fP can be any package name, or can be the start of any package name followed by an asterisk (\f2*\fP). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with colons (\f2:\fP). .RE -.RS 3 - -.LP -.LP \f3NOTE: If using an asterisk in a pattern or pattern list, the pattern list must be inside quotes, such as \fP\f4"java.lang*:java.util"\fP -.LP -.RE -.LP -If you do not supply any \f2\-group\fP option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages". -.LP +.br +.br +If you do not supply any \f2\-group\fP option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages". +.br +.br For example, the following option separates the four documented packages into core, extension and other packages. Notice the trailing "dot" does not appear in "java.lang*" \-\- including the dot, such as "java.lang.*" would omit the java.lang package. .nf \f3 @@ -4517,7 +3424,6 @@ For example, the following option separates the four documented packages into co .fi This results in the groupings: .RS 3 -.RS 3 .TP 3 Core Packages \f2java.lang\fP @@ -4530,38 +3436,27 @@ Extension Packages Other Packages \f2java.new\fP .RE - -.LP -.RE -.LP .TP 3 \-nodeprecated -Prevents the generation of any deprecated API at all in the documentation. This does what \-nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code. -.LP +Prevents the generation of any deprecated API at all in the documentation. This does what \-nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code. .TP 3 \-nodeprecatedlist -Prevents the generation of the file containing the list of deprecated APIs (deprecated\-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner. -.LP +Prevents the generation of the file containing the list of deprecated APIs (deprecated\-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner. .TP 3 \-nosince -Omits from the generated docs the "Since" sections associated with the @since tags. -.LP +Omits from the generated docs the "Since" sections associated with the @since tags. .TP 3 \-notree -Omits the class/interface hierarchy pages from the generated docs. These are the pages you reach using the "Tree" button in the navigation bar. The hierarchy is produced by default. -.LP +Omits the class/interface hierarchy pages from the generated docs. These are the pages you reach using the "Tree" button in the navigation bar. The hierarchy is produced by default. .TP 3 \-noindex -Omits the index from the generated docs. The index is produced by default. -.LP +Omits the index from the generated docs. The index is produced by default. .TP 3 \-nohelp -Omits the HELP link in the navigation bars at the top and bottom of each page of output. -.LP +Omits the HELP link in the navigation bars at the top and bottom of each page of output. .TP 3 \-nonavbar -Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The \f2\-nonavbar\fP option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only. -.LP +Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The \f2\-nonavbar\fP option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only. .TP 3 \-helpfile\ path/filename Specifies the path of an alternate help file \f2path/filename\fP that the HELP link in the top and bottom navigation bars link to. Without this option, the Javadoc tool automatically creates a help file \f2help\-doc.html\fP that is hard\-coded in the Javadoc tool. This option enables you to override this default. The \f2filename\fP can be any name and is not restricted to \f2help\-doc.html\fP \-\- the Javadoc tool will adjust the links in the navigation bar accordingly. For example: @@ -4582,8 +3477,7 @@ Specifies the path of an alternate HTML stylesheet file. Without this option, th .fi .TP 3 \-serialwarn -Generates compile\-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and \f2writeExternal\fP methods. -.LP +Generates compile\-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and \f2writeExternal\fP methods. .TP 3 \-charset\ name Specifies the HTML character set for this document. The name should be a preferred MIME name as given in the @@ -4609,10 +3503,10 @@ This META tag is described in the .na \f2HTML standard\fP @ .fi -http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2. (4197265 and 4137321) -.LP +http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2. (4197265 and 4137321) +.br +.br Also see \-encoding and \-docencoding. -.LP .TP 3 \-docencoding\ name Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as given in the @@ -4626,12 +3520,12 @@ http://www.iana.org/assignments/character\-sets. If you omit this option but use % \fP\f3javadoc \-docencoding "ISO\-8859\-1" mypackage\fP .fl .fi -Also see \-encoding and \-charset. -.LP +Also see \-encoding and \-charset. .TP 3 \-keywords -Adds HTML meta keyword tags to the generated file for each class. These tags can help the page be found by search engines that look for meta tags. (Most search engines that search the entire Internet do not look at meta tags, because pages can misuse them; but search engines offered by companies that confine their search to their own website can benefit by looking at meta tags.) -.LP +Adds HTML meta keyword tags to the generated file for each class. These tags can help the page be found by search engines that look for meta tags. (Most search engines that search the entire Internet do not look at meta tags, because pages can misuse them; but search engines offered by companies that confine their search to their own website can benefit by looking at meta tags.) +.br +.br The meta tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors are not included because they are identical to the class name. For example, the class String starts with these keywords: .nf \f3 @@ -4646,16 +3540,21 @@ The meta tags include the fully qualified name of the class and the unqualified .fl \fP .fi -.LP .TP 3 \-tag\ \ tagname:Xaoptcmf:"taghead" -Enables the Javadoc tool to interpret a simple, one\-argument custom block tag \f2@\fP\f2tagname\fP in doc comments. So the Javadoc tool can "spell\-check" tag names, it is important to include a \f2\-tag\fP option for every custom tag that is present in the source code, disabling (with \f2X\fP) those that are not being output in the current run. -.LP -The colon (\f4:\fP) is always the separator. To use a colon in \f2tagname\fP, see Use of Colon in Tag Name. -.LP -The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed on the next line by the text from its single argument, as shown in the example below. Like any block tag, this argument's text can contain inline tags, which are also interpreted. The output is similar to standard one\-argument tags, such as \f2@return\fP and \f2@author\fP. Omitting \f2taghead\fP causes \f2tagname\fP to appear as the heading. -.LP -\f3Placement of tags\fP \- The \f4Xaoptcmf\fP part of the argument determines where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using \f2X\fP). You can supply either \f4a\fP, to allow the tag in all places, or any combination of the other letters: \f4X\fP (disable tag) +Enables the Javadoc tool to interpret a simple, one\-argument custom block tag \f2@\fP\f2tagname\fP in doc comments. So the Javadoc tool can "spell\-check" tag names, it is important to include a \f2\-tag\fP option for every custom tag that is present in the source code, disabling (with \f2X\fP) those that are not being output in the current run. +.br +.br +The colon (\f4:\fP) is always the separator. To use a colon in \f2tagname\fP, see Use of Colon in Tag Name. +.br +.br +The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed on the next line by the text from its single argument, as shown in the example below. Like any block tag, this argument's text can contain inline tags, which are also interpreted. The output is similar to standard one\-argument tags, such as \f2@return\fP and \f2@author\fP. Omitting \f2taghead\fP causes \f2tagname\fP to appear as the heading. +.br +.br +\f3Placement of tags\fP \- The \f4Xaoptcmf\fP part of the argument determines where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using \f2X\fP). You can supply either \f4a\fP, to allow the tag in all places, or any combination of the other letters: +.br +.br +\f4X\fP (disable tag) .br \f4a\fP (all) .br @@ -4670,7 +3569,8 @@ The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed \f4m\fP (methods) .br \f4f\fP (fields) -.LP +.br +.br \f3Examples of single tags\fP \- An example of a tag option for a tag that can be used anywhere in the source code is: .nf \f3 @@ -4715,8 +3615,9 @@ use this tag option: .fl \fP .fi -\f3Spell\-checking tag names (Disabling tags)\fP \- Some developers put custom tags in the source code that they don't always want to output. In these cases, it is important to list all tags that are present in the source code, enabling the ones you want to output and disabling the ones you don't want to output. The presence of \f2X\fP disables the tag, while its absence enables the tag. This gives the Javadoc tool enough information to know if a tag it encounters is unknown, probably the results of a typo or a misspelling. It prints a warning in these cases. -.LP +\f3Spell\-checking tag names (Disabling tags)\fP \- Some developers put custom tags in the source code that they don't always want to output. In these cases, it is important to list all tags that are present in the source code, enabling the ones you want to output and disabling the ones you don't want to output. The presence of \f2X\fP disables the tag, while its absence enables the tag. This gives the Javadoc tool enough information to know if a tag it encounters is unknown, probably the results of a typo or a misspelling. It prints a warning in these cases. +.br +.br You can add \f2X\fP to the placement values already present, so that when you want to enable the tag, you can simply delete the \f2X\fP. For example, if @todo is a tag that you want to suppress on output, you would use: .nf \f3 @@ -4733,13 +3634,15 @@ or, if you'd rather keep it simple: .fl \fP .fi -.LP -The syntax \f2\-tag todo:X\fP works even if \f2@todo\fP is defined by a taglet. -.LP -\f3Order of tags\fP \- The order of the \f2\-tag\fP (and \f2\-taglet\fP) options determine the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order \-\- they take only the standard tag's name. (Subheadings for standard tags cannot be altered.) This is illustrated in the following example. -.LP -If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its order. If they are both present, then whichever appears last on the command line determines its order. (This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if \f2\-taglet\fP and \f2\-tag\fP both have the name "todo", the one that appears last on the command line will determine its order. -.LP +The syntax \f2\-tag todo:X\fP works even if \f2@todo\fP is defined by a taglet. +.br +.br +\f3Order of tags\fP \- The order of the \f2\-tag\fP (and \f2\-taglet\fP) options determine the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order \-\- they take only the standard tag's name. (Subheadings for standard tags cannot be altered.) This is illustrated in the following example. +.br +.br +If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its order. If they are both present, then whichever appears last on the command line determines its order. (This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if \f2\-taglet\fP and \f2\-tag\fP both have the name "todo", the one that appears last on the command line will determine its order. +.br +.br \f3Example of a complete set of tags\fP \- This example inserts "To Do" after "Parameters" and before "Throws" in the output. By using "X", it also specifies that @example is a tag that might be encountered in the source code that should not be output during this run. Notice that if you use @argfile, you can put the tags on separate lines in an argument file like this (no line continuation characters needed): .nf \f3 @@ -4758,21 +3661,23 @@ If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its or .fl \fP .fi -.LP -When javadoc parses the doc comments, any tag encountered that is neither a standard tag nor passed in with \f2\-tag\fP or \f2\-taglet\fP is considered unknown, and a warning is thrown. -.LP -The standard tags are initially stored internally in a list in their default order. Whenever \f2\-tag\fP options are used, those tags get appended to this list \-\- standard tags are moved from their default position. Therefore, if a \f2\-tag\fP option is omitted for a standard tag, it remains in its default position. -.LP -\f3Avoiding Conflicts\fP \- If you want to slice out your own namespace, you can use a dot\-separated naming convention similar to that used for packages: \f2com.mycompany.todo\fP. Sun will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Sun. In other words, if you create a tag or taglet \f2@todo\fP, it will always have the same behavior you define, even if Sun later creates a standard tag of the same name. -.LP +When javadoc parses the doc comments, any tag encountered that is neither a standard tag nor passed in with \f2\-tag\fP or \f2\-taglet\fP is considered unknown, and a warning is thrown. +.br +.br +The standard tags are initially stored internally in a list in their default order. Whenever \f2\-tag\fP options are used, those tags get appended to this list \-\- standard tags are moved from their default position. Therefore, if a \f2\-tag\fP option is omitted for a standard tag, it remains in its default position. +.br +.br +\f3Avoiding Conflicts\fP \- If you want to slice out your own namespace, you can use a dot\-separated naming convention similar to that used for packages: \f2com.mycompany.todo\fP. Oracle will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Oracle. In other words, if you create a tag or taglet \f2@todo\fP, it will always have the same behavior you define, even if Oracle later creates a standard tag of the same name. +.br +.br \f3Annotations vs. Javadoc Tags\fP \- In general, if the markup you want to add is intended to affect or produce documentation, it should probably be a javadoc tag; otherwise, it should be an annotation. See .na \f2Comparing Annotations and Javadoc Tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#annotations -.LP -You can also create more complex block tags, or custom inline tags with the \-taglet option. -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#annotations< +.br +.br +You can also create more complex block tags, or custom inline tags with the \-taglet option. .TP 3 \-taglet\ \ class Specifies the class file that starts the taglet used in generating the documentation for that tag. Use the fully\-qualified name for \f2class\fP. This taglet also defines the number of text arguments that the custom tag has. The taglet accepts those arguments, processes them, and generates the output. For extensive documentation with example taglets, see: @@ -4782,13 +3687,14 @@ o .na \f2Taglet Overview\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/taglet/overview.html +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html .RE -.LP -Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. -.LP -Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. So a taglet cannot 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's text to a file or triggering another process. -.LP +Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. +.br +.br +Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. So a taglet cannot 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's text to a file or triggering another process. +.br +.br Use the \f2\-tagletpath\fP option to specify the path to the taglet. Here is an example that inserts the "To Do" taglet after "Parameters" and ahead of "Throws" in the generated pages: .nf \f3 @@ -4809,25 +3715,21 @@ Use the \f2\-tagletpath\fP option to specify the path to the taglet. Here is an .fl \fP .fi -.LP -Alternatively, you can use the \f2\-taglet\fP option in place of its \f2\-tag\fP option, but that may be harder to read. -.LP +Alternatively, you can use the \f2\-taglet\fP option in place of its \f2\-tag\fP option, but that may be harder to read. .TP 3 \-tagletpath\ \ tagletpathlist -Specifies the search paths for finding taglet class files (.class). The \f2tagletpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. -.LP +Specifies the search paths for finding taglet class files (.class). The \f2tagletpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. .TP 3 \-docfilessubdirs\ -Enables deep copying of "\f2doc\-files\fP" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory \f2doc\-files/example/images\fP and all its contents would now be copied. There is also an option to exclude subdirectories. -.LP +Enables deep copying of "\f2doc\-files\fP" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory \f2doc\-files/example/images\fP and all its contents would now be copied. There is also an option to exclude subdirectories. .TP 3 \-excludedocfilessubdir\ \ name1:name2... -Excludes any "\f2doc\-files\fP" subdirectories with the given names. This prevents the copying of SCCS and other source\-code\-control subdirectories. -.LP +Excludes any "\f2doc\-files\fP" subdirectories with the given names. This prevents the copying of SCCS and other source\-code\-control subdirectories. .TP 3 \-noqualifier\ \ all\ | \ packagename1:packagename2:... -Omits qualifying package name from ahead of class names in output. The argument to \f2\-noqualifier\fP is either "\f2all\fP" (all package qualifiers are omitted) or a colon\-separate list of packages, with wildcards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. -.LP +Omits qualifying package name from ahead of class names in output. The argument to \f2\-noqualifier\fP is either "\f2all\fP" (all package qualifiers are omitted) or a colon\-separate list of packages, with wildcards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. +.br +.br The following example omits all package qualifiers: .nf \f3 @@ -4852,8 +3754,7 @@ The following example omits package qualifiers starting with "java", and "com.su .fl \fP .fi -Where a package qualifier would appear due to the above behavior, the name can be suitably shortened \-\- see How a name is displayed. This rule is in effect whether or not \f2\-noqualifier\fP is used. -.LP +Where a package qualifier would appear due to the above behavior, the name can be suitably shortened \-\- see How a name is displayed. This rule is in effect whether or not \f2\-noqualifier\fP is used. .TP 3 \-notimestamp\ Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page. Useful when you want to run javadoc on two source bases and diff them, as it prevents timestamps from causing a diff (which would otherwise be a diff on every page). The timestamp includes the javadoc version number, and currently looks like this: @@ -4864,53 +3765,40 @@ Suppresses the timestamp, which is hidden in an HTML comment in the generated HT .fl \fP .fi -.LP .TP 3 \-nocomment\ Suppress the entire comment body, including the main description and all tags, generating only declarations. This option enables re\-using source files originally intended for a different purpose, to produce skeleton HTML documentation at the early stages of a new project. +.TP 3 +\-sourcetab tabLength +Specify the number of spaces each tab takes up in the source. .RE .SH "COMMAND LINE ARGUMENT FILES" .LP - -.LP -.LP To shorten or simplify the javadoc command line, you can specify one or more files that themselves contain arguments to the \f2javadoc\fP command (except \f2\-J\fP options). This enables you to create javadoc commands of any length on any operating system. .LP -.LP An argument file can include javac options and source filenames in any combination. The arguments within a file can be space\-separated or newline\-separated. If a filename contains embedded spaces, put the whole filename in double quotes. .LP -.LP Filenames within an argument file are relative to the current directory, not the location of the argument file. Wildcards (*) are not allowed in these lists (such as for specifying \f2*.java\fP). Use of the '\f2@\fP' character to recursively interpret files is not supported. The \f2\-J\fP options are not supported because they are passed to the launcher, which does not support argument files. .LP -.LP When executing javadoc, pass in the path and name of each argument file with the '\f2@\fP' leading character. When javadoc encounters an argument beginning with the character `\f2@\fP', it expands the contents of that file into the argument list. -.LP .SS Example \- Single Arg File .LP -.LP You could use a single argument file named "\f2argfile\fP" to hold all Javadoc arguments: -.LP .nf \f3 .fl % \fP\f3javadoc @argfile\fP .fl .fi - -.LP .LP This argument file could contain the contents of both files shown in the next example. -.LP .SS Example \- Two Arg Files .LP -.LP You can create two argument files \-\- one for the Javadoc options and the other for the package names or source filenames: (Notice the following lists have no line\-continuation characters.) .LP -.LP Create a file named "\f2options\fP" containing: -.LP .nf \f3 .fl @@ -4920,13 +3808,13 @@ Create a file named "\f2options\fP" containing: .fl \-splitindex .fl - \-windowtitle 'Java(TM) SE 7 API Specification' + \-windowtitle 'Java SE 7 API Specification' .fl - \-doctitle 'Java(TM) SE 7 API Specification' + \-doctitle 'Java SE 7 API Specification' .fl - \-header '<b>Java(TM); SE 7' + \-header '<b>Java(TM) SE 7</b>' .fl - \-bottom 'Copyright 1993\-2009 Sun Microsystems, Inc. All Rights Reserved.' + \-bottom 'Copyright © 1993\-2011 Oracle and/or its affiliates. All rights reserved.' .fl \-group "Core Packages" "java.*" .fl @@ -4936,11 +3824,8 @@ Create a file named "\f2options\fP" containing: .fl \fP .fi - -.LP .LP Create a file named "\f2packages\fP" containing: -.LP .nf \f3 .fl @@ -4952,120 +3837,85 @@ Create a file named "\f2packages\fP" containing: .fl \fP .fi - -.LP .LP You would then run javadoc with: -.LP .nf \f3 .fl % \fP\f3javadoc @options @packages\fP .fl .fi - -.LP .SS Example \- Arg Files with Paths .LP -.LP The argument files can have paths, but any filenames inside the files are relative to the current working directory (not \f2path1\fP or \f2path2\fP): -.LP .nf \f3 .fl % \fP\f3javadoc @path1/options @path2/packages\fP .fl .fi - -.LP .SS Example \- Option Arguments .LP -.LP Here's an example of saving just an argument to a javadoc option in an argument file. We'll use the \f2\-bottom\fP option, since it can have a lengthy argument. You could create a file named "\f2bottom\fP" containing its text argument: -.LP .nf \f3 .fl -'<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit a +<font size="\-1"> .fl -bug or feature</a><br><br>Java is a trademark or registered trademark of + <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> .fl -Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-2000 Sun + Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> .fl -Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. + Oracle is a registered trademark of Oracle Corporation and/or its affiliates. .fl -All Rights Reserved.</font>' + Other names may be trademarks of their respective owners.</font> .fl \fP .fi - -.LP .LP Then run the Javadoc tool with: -.LP .nf \f3 .fl % \fP\f3javadoc \-bottom @bottom @packages\fP .fl .fi - -.LP .LP Or you could include the \f2\-bottom\fP option at the start of the argument file, and then just run it as: -.LP .nf \f3 .fl % \fP\f3javadoc @bottom @packages\fP .fl .fi - -.LP - -.LP .SH "Name" Running -.LP .SH "RUNNING JAVADOC" .LP - -.LP -.LP \f3Version Numbers\fP \- The version number of javadoc can be determined using \f3javadoc \-J\-version\fP. The version number of the standard doclet appears in its output stream. It can be turned off with \f2\-quiet\fP. .LP -.LP \f3Public programmatic interface\fP \- To invoke the Javadoc tool from within programs written in the Java language. This interface is in \f2com.sun.tools.javadoc.Main\fP (and javadoc is re\-entrant). For more details, see .na \f2Standard Doclet\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/standard\-doclet.html#runningprogrammatically. -.LP +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/standard\-doclet.html#runningprogrammatically. .LP \f3Running Doclets\fP \- The instructions given below are for invoking the standard HTML doclet. To invoke a custom doclet, use the \-doclet and \-docletpath options. For full, working examples of running a particular doclet, see the .na \f2MIF Doclet documentation\fP @ .fi http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. -.LP .SH "SIMPLE EXAMPLES" .LP - -.LP -.LP You can run javadoc on entire packages or individual source files. Each package name has a corresponding directory name. In the following examples, the source files are located at \f2/home/src/java/awt/*.java\fP. The destination directory is \f2/home/html\fP. -.LP .SS Documenting One or More Packages .LP -.LP To document a package, the source files (\f2*.java\fP) for that package must be located in a directory having the same name as the package. If a package name is made up of several identifiers (separated by dots, such as \f2java.awt.color\fP), each subsequent identifier must correspond to a deeper subdirectory (such as \f2java/awt/color\fP). You may split the source files for a single package among two such directory trees located at different places, as long as \f2\-sourcepath\fP points to them both \-\- for example \f2src1/java/awt/color\fP and \f2src2/java/awt/color\fP. .LP -.LP You can run javadoc either by changing directories (with \f2cd\fP) or by using \f2\-sourcepath\fP option. The examples below illustrate both alternatives. -.LP .RS 3 .TP 2 o @@ -5108,17 +3958,12 @@ o .fl .fi .RE - -.LP .LP Result: All cases generate HTML\-formatted documentation for the public and protected classes and interfaces in packages \f2java.awt\fP and \f2java.awt.event\fP and save the HTML files in the specified destination directory (\f2/home/html\fP). Because two or more packages are being generated, the document has three HTML frames \-\- for the list of packages, the list of classes, and the main class pages. -.LP .SS Documenting One or More Classes .LP -.LP The second way to run the Javadoc tool is by passing in one or more source files (\f2.java\fP). You can run javadoc either of the following two ways \-\- by changing directories (with \f2cd\fP) or by fully\-specifying the path to the \f2.java\fP files. Relative paths are relative to the current directory. The \f2\-sourcepath\fP option is ignored when passing in source files. You can use command line wildcards, such as asterisk (*), to specify groups of classes. -.LP .RS 3 .TP 2 o @@ -5155,93 +4000,76 @@ o .fi This example generates HTML\-formatted documentation for the class \f2Button\fP and classes beginning with \f2Graphics\fP. .RE - -.LP .SS Documenting Both Packages and Classes .LP -.LP You can document entire packages and individual classes at the same time. Here's an example that mixes two of the previous examples. You can use \f2\-sourcepath\fP for the path to the packages but not for the path to the individual classes. -.LP .nf \f3 .fl % \fP\f3javadoc \-d /home/html \-sourcepath /home/src java.awt /home/src/java/applet/Applet.java\fP .fl .fi - -.LP .LP This example generates HTML\-formatted documentation for the package \f2java.awt\fP and class \f2Applet\fP. (The Javadoc tool determines the package name for \f2Applet\fP from the package declaration, if any, in the \f2Applet.java\fP source file.) -.LP .SH "REAL WORLD EXAMPLE" .LP - -.LP -.LP The Javadoc tool has many useful options, some of which are more commonly used than others. Here is effectively the command we use to run the Javadoc tool on the Java platform API. We use 180MB of memory to generate the documentation for the 1500 (approx.) public and protected classes in the Java SE Platform, Standard Edition, v1.2. .LP -.LP The same example is shown twice \-\- first as executed on the command line, then as executed from a makefile. It uses absolute paths in the option arguments, which enables the same \f2javadoc\fP command to be run from any directory. -.LP .SS Command Line Example .LP -.LP -This command line example is over 900 characters, which is too long for some shells, such as DOS. You can use a command line argument file (or write a shell script) to workaround this limitation. -.LP +The following example may be too long for some shells such as DOS. You can use a command line argument file (or write a shell script) to workaround this limitation. .nf \f3 .fl -% javadoc \-sourcepath /java/jdk/src/share/classes \\ +% javadoc \-sourcepath /java/jdk/src/share/classes \\ +.fl + \-overview /java/jdk/src/share/classes/overview.html \\ .fl - \-overview /java/jdk/src/share/classes/overview.html \\ + \-d /java/jdk/build/api \\ .fl - \-d /java/jdk/build/api \\ + \-use \\ .fl - \-use \\ + \-splitIndex \\ .fl - \-splitIndex \\ + \-windowtitle 'Java Platform, Standard Edition 7 API Specification' \\ .fl - \-windowtitle 'Java(TM) Platform, Standard Edition 7 API Specification' \\ + \-doctitle 'Java Platform, Standard Edition 7 API Specification' \\ .fl - \-doctitle 'Java(TM) Platform, Standard Edition 7 API Specification' \\ + \-header '<b>Java(TM) SE 7</b>' \\ .fl - \-header '<b>Java(TM) SE </b><br><font size="\-1">7</font>' \\ + \-bottom '<font size="\-1"> .fl - \-bottom '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit + <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> .fl -a bug or feature</a><br><br>Java is a trademark or registered trademark of Sun Microsystems, + Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> .fl -Inc. in the US and other countries.<br>Copyright 1993\-1999 Sun Microsystems, Inc. + Oracle is a registered trademark of Oracle Corporation and/or its affiliates. .fl -901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>' \\ + Other names may be trademarks of their respective owners.</font>' \\ .fl \-group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \\ .fl - \-group "Extension Packages" "javax.*" \\ + \-group "Extension Packages" "javax.*" \\ .fl - \-J\-Xmx180m \\ + \-J\-Xmx180m \\ .fl @packages .fl \fP .fi - -.LP .LP where \f2packages\fP is the name of a file containing the packages to process, such as \f2java.applet java.lang\fP. None of the options should contain any newline characters between the single quotes. (For example, if you copy and paste this example, delete the newline characters from the \f2\-bottom\fP option.) See the other notes listed below. -.LP .SS Makefile Example .LP -.LP This is an example of a GNU makefile. For an example of a Windows makefile, see .na \f2creating a makefile for Windows\fP @ .fi http://java.sun.com/j2se/javadoc/faq/index.html#makefiles. -.LP .nf \f3 .fl @@ -5283,15 +4111,15 @@ DOCTITLE = 'Java(TM) Platform Standard Edition 7 API Specification' .fl HEADER = '<b>Java(TM) SE 7</font>' .fl -BOTTOM = '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit +BOTTOM = '<font size="\-1"> .fl - a bug or feature</a><br><br>Java is a trademark or registered trademark + <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> .fl - of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-1999 + Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> .fl - Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. + Oracle is a registered trademark of Oracle Corporation and/or its affiliates. .fl - All Rights Reserved.</font>' + Other names may be trademarks of their respective owners.</font>' .fl GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"' .fl @@ -5301,14 +4129,10 @@ SRCDIR = '/java/jdk/1.7.0/src/share/classes' .fl \fP .fi - -.LP .LP Single quotes are used to surround makefile arguments. .LP -.LP \f3NOTES\fP -.LP .RS 3 .TP 2 o @@ -5320,15 +4144,9 @@ If you omit the \f2\-footer\fP option, as done here, the Javadoc tool copies the o Other important options you might want to use but not needed in this example are \-\f2classpath\fP and \-\f2link\fP. .RE - -.LP .SH "TROUBLESHOOTING" -.LP - -.LP .SS General Troubleshooting -.LP .RS 3 .TP 2 o @@ -5347,37 +4165,23 @@ o o \f3Documents only legal classes\fP \- When documenting a package, javadoc only reads files whose names are composed of legal class names. You can prevent javadoc from parsing a file by including, for example, a hyphen "\-" in its filename. .RE - -.LP .SS Errors and Warnings .LP -.LP Error and warning messages contain the filename and line number to the declaration line rather than to the particular line in the doc comment. -.LP .RS 3 .TP 2 o \f2"error: cannot read: Class1.java"\fP the Javadoc tool is trying to load the class Class1.java in the current directory. The class name is shown with its path (absolute or relative), which in this case is the same as \f2./Class1.java\fP. .RE - -.LP .SH "ENVIRONMENT" -.LP - -.LP .RS 3 .TP 3 CLASSPATH Environment variable that provides the path which javadoc uses to find user class files. This environment variable is overridden by the \f2\-classpath\fP option. Separate directories with a colon, for example: .:/home/classes:/usr/local/java/classes .RE - -.LP .SH "SEE ALSO" -.LP - -.LP .RS 3 .TP 2 o @@ -5399,75 +4203,24 @@ o .na \f2Javadoc Home Page\fP @ .fi -http://java.sun.com/j2se/javadoc/index.jsp +http://www.oracle.com/technetwork/java/javase/documentation/index\-jsp\-135444.html .TP 2 o .na \f2How to Write Doc Comments for Javadoc\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html .TP 2 o .na \f2Setting the Class Path\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#general +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general .TP 2 o .na \f2How Javac and Javadoc Find Classes\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html#srcfiles (tools.jar) +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html#srcfiles (tools.jar) .RE - -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 80 0 -.80 -.rm 80 -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 3869 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.fc -.nr T. 1 -.T# 1 -.35 -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-3 - -.LP diff --git a/src/linux/doc/man/javah.1 b/src/linux/doc/man/javah.1 index 60a51c37af62adc8a11f3de233b0564617dd7a13..16dfa9bcc93bf23cde8b5fc2b74d963b0aa81329 100644 --- a/src/linux/doc/man/javah.1 +++ b/src/linux/doc/man/javah.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,37 +19,27 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javah 1 "02 Jun 2010" +.TH javah 1 "10 May 2011" .LP .SH "Name" javah \- C Header and Stub File Generator -.LP -.RS 3 - .LP .LP \f3javah\fP produces C header files and C source files from a Java class. These files provide the connective glue that allow your Java and C code to interact. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 .fl javah [ \fP\f3options\fP\f3 ] fully\-qualified\-classname. . . .fl -javah_g [ \fP\f3options\fP\f3 ] fully\-qualified\-classname. . . -.fl \fP .fi .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3javah\fP generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition whose layout parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class. @@ -63,12 +53,7 @@ By default \f3javah\fP creates a header file for each class listed on the comman .LP The new native method interface, Java Native Interface (JNI), does not require header information or stub files. \f3javah\fP can still be used to generate native method function proptotypes needed for JNI\-style native methods. \f3javah\fP produces JNI\-style output by default, and places the result in the .h file. .LP -.LP -\f3javah_g\fP is a non\-optimized version of \f3javah\fP suitable for use with debuggers like jdb(1). -.LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -110,11 +95,10 @@ For example: .fl \fP .fi -.LP As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations). .br .br -For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. +For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. .TP 3 \-bootclasspath path Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java 2 platform located in \f2jre/lib/rt.jar\fP and several other jar files. @@ -131,8 +115,6 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "ENVIRONMENT VARIABLES" -.LP - .LP .RS 3 .TP 3 @@ -149,8 +131,6 @@ Used to provide the system a path to user\-defined classes. Directories are sepa .LP .SH "SEE ALSO" -.LP - .LP .LP javac(1), java(1), jdb(1), javap(1), javadoc(1) diff --git a/src/linux/doc/man/javap.1 b/src/linux/doc/man/javap.1 index 33518779b69056fd2e6c291c7917e431d95de00a..aa6e8d0114cd9bce3fa4a25cdd6c9acda2e84c79 100644 --- a/src/linux/doc/man/javap.1 +++ b/src/linux/doc/man/javap.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,41 +19,43 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javap 1 "02 Jun 2010" +.TH javap 1 "10 May 2011" .LP .SH "Name" javap \- The Java Class File Disassembler -.LP -.RS 3 - .LP .LP Disassembles class files. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 .fl -javap [ \fP\f3options\fP\f3 ] class. . . +javap [ \fP\f3options\fP\f3 ] classes .fl \fP .fi .LP .SH "DESCRIPTION" -.LP - .LP .LP -The \f3javap\fP command disassembles a class file. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout. For example, compile the following class declaration: +The \f3javap\fP command disassembles one or more class files. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout. .LP .RS 3 +.TP 3 +options +Command\-line options. +.TP 3 +classes +List of one or more classes (separated by spaces) to be processed for annotations (such as \f2DocFooter.class\fP). You may specify a class that can be found in the class path, by its file name (for example, \f2/home/user/myproject/src/DocFooter.class\fP), or with a URL (for example, \f2file:///home/user/myproject/src/DocFooter.class\fP). +.RE +.LP +.LP +For example, compile the following class declaration: .LP .nf \f3 @@ -96,166 +98,160 @@ public class DocFooter extends Applet { .fl \fP .fi -.RE .LP .LP -The output from \f3javap DocFooter\fP yields: -.LP -.RS 3 - +The output from \f3javap DocFooter.class\fP yields: .LP .nf \f3 .fl -Compiled from DocFooter.java +Compiled from "DocFooter.java" .fl public class DocFooter extends java.applet.Applet { .fl - java.lang.String date; + java.lang.String date; .fl - java.lang.String email; + java.lang.String email; .fl - public DocFooter(); + public DocFooter(); .fl - public void init(); + public void init(); .fl - public void paint(java.awt.Graphics); + public void paint(java.awt.Graphics); .fl } .fl \fP .fi -.RE .LP .LP -The output from \f3javap \-c DocFooter\fP yields: -.LP -.RS 3 - +The output from \f3javap \-c DocFooter.class\fP yields: .LP .nf \f3 .fl -Compiled from DocFooter.java +Compiled from "DocFooter.java" .fl public class DocFooter extends java.applet.Applet { .fl - java.lang.String date; -.fl - java.lang.String email; -.fl - public DocFooter(); -.fl - public void init(); + java.lang.String date; .fl - public void paint(java.awt.Graphics); + .fl -} + java.lang.String email; .fl .fl -Method DocFooter() + public DocFooter(); .fl - 0 aload_0 + Code: .fl - 1 invokespecial #1 <Method java.applet.Applet()> + 0: aload_0 .fl - 4 return + 1: invokespecial #1 // Method java/applet/Applet."<init>":()V +.fl + 4: return .fl .fl -Method void init() + public void init(); +.fl + Code: .fl - 0 aload_0 + 0: aload_0 .fl - 1 sipush 500 + 1: sipush 500 .fl - 4 bipush 100 + 4: bipush 100 .fl - 6 invokevirtual #2 <Method void resize(int, int)> + 6: invokevirtual #2 // Method resize:(II)V .fl - 9 aload_0 + 9: aload_0 .fl - 10 aload_0 + 10: aload_0 .fl - 11 ldc #3 <String "LAST_UPDATED"> + 11: ldc #3 // String LAST_UPDATED .fl - 13 invokevirtual #4 <Method java.lang.String getParameter(java.lang.String)> + 13: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String; .fl - 16 putfield #5 <Field java.lang.String date> + 16: putfield #5 // Field date:Ljava/lang/String; .fl - 19 aload_0 + 19: aload_0 .fl - 20 aload_0 + 20: aload_0 .fl - 21 ldc #6 <String "EMAIL"> + 21: ldc #6 // String EMAIL .fl - 23 invokevirtual #4 <Method java.lang.String getParameter(java.lang.String)> + 23: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String; .fl - 26 putfield #7 <Field java.lang.String email> + 26: putfield #7 // Field email:Ljava/lang/String; .fl - 29 return + 29: return .fl .fl -Method void paint(java.awt.Graphics) + public void paint(java.awt.Graphics); .fl - 0 aload_1 + Code: .fl - 1 new #8 <Class java.lang.StringBuffer> + 0: aload_1 .fl - 4 dup + 1: new #8 // class java/lang/StringBuilder .fl - 5 invokespecial #9 <Method java.lang.StringBuffer()> + 4: dup .fl - 8 aload_0 + 5: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V .fl - 9 getfield #5 <Field java.lang.String date> + 8: aload_0 .fl - 12 invokevirtual #10 <Method java.lang.StringBuffer append(java.lang.String)> + 9: getfield #5 // Field date:Ljava/lang/String; .fl - 15 ldc #11 <String " by "> + 12: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; .fl - 17 invokevirtual #10 <Method java.lang.StringBuffer append(java.lang.String)> + 15: ldc #11 // String by .fl - 20 invokevirtual #12 <Method java.lang.String toString()> + 17: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; .fl - 23 bipush 100 + 20: invokevirtual #12 // Method java/lang/StringBuilder.toString:()Ljava/lang/String; .fl - 25 bipush 15 + 23: bipush 100 .fl - 27 invokevirtual #13 <Method void drawString(java.lang.String, int, int)> + 25: bipush 15 .fl - 30 aload_1 + 27: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V .fl - 31 aload_0 + 30: aload_1 .fl - 32 getfield #7 <Field java.lang.String email> + 31: aload_0 .fl - 35 sipush 290 + 32: getfield #7 // Field email:Ljava/lang/String; .fl - 38 bipush 15 + 35: sipush 290 .fl - 40 invokevirtual #13 <Method void drawString(java.lang.String, int, int)> + 38: bipush 15 .fl - 43 return + 40: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V +.fl + 43: return +.fl +} .fl \fP .fi -.RE .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 -\-help +\-help \-\-help \-? Prints out help message for \f3javap\fP. .TP 3 +\-version +Prints out version information. +.TP 3 \-l Prints out line and local variable tables. .TP 3 @@ -268,14 +264,11 @@ Shows only protected and public classes and members. \-package Shows only package, protected, and public classes and members. This is the default. .TP 3 -\-private +\-private \-p Shows all classes and members. .TP 3 \-Jflag Pass \f2flag\fP directly to the runtime system. Some examples: -.RS 3 - -.LP .nf \f3 .fl @@ -285,11 +278,16 @@ javap \-J\-Djava.security.manager \-J\-Djava.security.policy=MyPolicy MyClassNam .fl \fP .fi -.RE .TP 3 \-s Prints internal type signatures. .TP 3 +\-sysinfo +Shows system information (path, size, date, MD5 hash) of the class being processed. +.TP 3 +\-constants +Shows static final constants. +.TP 3 \-c Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the .na @@ -301,22 +299,7 @@ http://java.sun.com/docs/books/vmspec/. Prints stack size, number of \f2locals\fP and \f2args\fP for methods. .TP 3 \-classpath path -Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is: -.nf -\f3 -.fl - .:<your_path> -.fl -\fP -.fi -For example: -.nf -\f3 -.fl -.:/home/avh/classes:/usr/local/java/classes -.fl -\fP -.fi +Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. .TP 3 \-bootclasspath path Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in \f2jre/lib/rt.jar\fP and several other jar files. @@ -325,32 +308,8 @@ Specifies path from which to load bootstrap classes. By default, the bootstrap c Overrides location at which installed extensions are searched for. The default location for extensions is the value of \f2java.ext.dirs\fP. .RE -.LP -.SH "ENVIRONMENT VARIABLES" -.LP - -.LP -.RS 3 -.TP 3 -CLASSPATH -Used to provide the system a path to user\-defined classes. Directories are separated by colons, for example, For example: -.RS 3 - -.LP -.nf -\f3 -.fl -.:/home/avh/classes:/usr/local/java/classes -.fl -\fP -.fi -.RE -.RE - .LP .SH "SEE ALSO" -.LP - .LP .LP javac(1), java(1), jdb(1), javah(1), javadoc(1) diff --git a/src/linux/doc/man/javaws.1 b/src/linux/doc/man/javaws.1 index 281046c10722a7c4fe0bcacd5d4f42b9a96e6d55..a73df25c0dbfd1daef4f4e3e89c060f35bf9dec7 100644 --- a/src/linux/doc/man/javaws.1 +++ b/src/linux/doc/man/javaws.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2003, 2011, 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,30 +19,18 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javaws 1 "02 Jun 2010" +.TH javaws 1 "10 May 2011" .LP .SH "Name" \f2javaws\fP Command Line .LP -.LP -\ -.LP -.SS -NAME -.LP -.RS 3 - +.SH "NAME" .LP .LP \f2javaws\fP \- Java Web Start launcher command .LP -.RE -.SS -SYNOPSIS -.LP -.RS 3 - +.SH "SYNOPSIS" .LP .LP \f2javaws [run\-options] <jnlp>\fP @@ -50,49 +38,27 @@ SYNOPSIS .LP \f2javaws [control\-options]\fP .LP -.RE -.SS -PARAMETERS -.LP -.RS 3 - +.SH "PARAMETERS" .LP .LP \f2[run\-options]\fP -.LP -.RS 3 - .LP .LP Command\-line run\-options. run\-options may be in any order. For a discussion of the various run\-options, see RUN\-OPTIONS below. .LP -.RE .LP \f2<jnlp>\fP -.LP -.RS 3 - .LP .LP This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file. .LP -.RE .LP \f2[control\-options]\fP -.LP -.RS 3 - .LP .LP Command\-line control\-options. control\-options may be in any order. For a discussion of the various control\-options, see CONTROL\-OPTIONS below. .LP -.RE -.RE -.SS -DESCRIPTION -.LP -.RS 3 - +.SH "DESCRIPTION" .LP .LP The \f2javaws\fP command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches Java applications/applets hosted on a network. @@ -103,256 +69,154 @@ If a JNLP file is specified, \f2javaws\fP will launch the Java application/apple .LP The \f2javaws\fP launcher has a set of options that are supported in the current release. However, the options may be removed in a future release. .LP -.RE -.SS -RUN\-OPTIONS -.LP -.RS 3 - +.SH "RUN\-OPTIONS" .LP .LP \f2\-offline\fP -.LP -.RS 3 - .LP .LP -run Java Web Start in offline mode. +Run Java Web Start in offline mode. .LP -.RE .LP \f2\-Xnosplash\fP -.LP -.RS 3 - .LP .LP -disable the display of the initial splash screen. +Do not display the initial splash screen. .LP -.RE .LP \f2\-open <arguments>\fP -.LP -.RS 3 - .LP .LP If specified, replaces the arguments in the jnlp file with \f2\-open <arguments>\fP. .LP -.RE .LP \f2\-print <arguments>\fP -.LP -.RS 3 - .LP .LP If specified, replaces the arguments in the jnlp file with \f2\-print <arguments>\fP. .LP -.RE .LP \f2\-online\fP -.LP -.RS 3 - .LP .LP -run in online mode (default behavior). +Use online mode (default behavior). .LP -.RE .LP \f2\-wait\fP -.LP -.RS 3 - .LP .LP -If specified, the \f2javaws\fP process will not exit until the application exits. +If specified, the \f2javaws\fP process will not exit until the application exits. This option does not function as described on Windows platforms. .LP -.RE .LP \f2\-verbose\fP -.LP -.RS 3 - .LP .LP -display additional output. +Display additional output. .LP -.RE .LP \f2\-J<option>\fP -.LP -.RS 3 - .LP .LP -supply options to the vm. +Supply options to the VM. .LP -.RE .LP \f2\-system\fP .LP -.RS 3 - .LP +Run the application from the system cache only. .LP -run the application from the system cache only. +.SH "CONTROL\-OPTIONS" .LP -.RE -.RE -.SS -CONTROL\-OPTIONS .LP -.RS 3 - +\f2\-viewer\fP .LP .LP -\f2\-viewer\fP +Show the Cache Viewer in the Java Control Panel. .LP -.RS 3 - .LP +\f2\-clearcache\fP .LP -show the Cache Viewer in the java control panel .LP -.RE +Remove all non\-installed applications from the cache. .LP -\f2\-userConfig <property name>\fP .LP -.RS 3 - +\f2\-userConfig <property name>\fP .LP .LP -clear the specified deployment property. +Clear the specified deployment property. .LP -.RE .LP \f2\-userConfig <property name> <property value>\fP .LP -.RS 3 - .LP +Set the specified deployment property to the specified value. .LP -set the specified deployment property to the specified value. -.LP -.RE .LP \f2\-uninstall\fP -.LP -.RS 3 - .LP .LP -remove all applications from the cache. +Remove all applications from the cache. .LP -.RE .LP \f2\-uninstall <jnlp>\fP -.LP -.RS 3 - .LP .LP -remove the application from the cache. +Remove the application from the cache. .LP -.RE .LP \f2\-import [import\-options] <jnlp>\fP -.LP -.RS 3 - .LP .LP -import the application to the cache. +Import the application to the cache. .LP -.RE -\f3IMPORT\-OPTIONS\fP +.SH "IMPORT\-OPTIONS" .LP .LP \f2\-silent\fP -.LP -.RS 3 - .LP .LP -import silently (with no user interface). +Import silently (with no user interface). .LP -.RE .LP \f2\-system\fP -.LP -.RS 3 - .LP .LP -import application to the system cache. +Import application to the system cache. .LP -.RE .LP \f2\-codebase <url>\fP -.LP -.RS 3 - .LP .LP -retrieve resources from the given codebase. +Retrieve resources from the given codebase. .LP -.RE .LP \f2\-shortcut\fP -.LP -.RS 3 - .LP .LP -install shortcuts as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. +Install shortcuts as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. .LP -.RE .LP \f2\-association\fP .LP -.RS 3 - .LP +Install associations as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. .LP -install associations as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. -.LP -.RE -.RE -.SS -FILES -.LP -.RS 3 - +.SH "FILES" .LP .LP For information about the user and system cache and deployment.properties files, see .na \f2System\- and User\-Level Properties\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/properties.html. +http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/properties.html. .LP -.RE -.SS -MORE INFORMATION -.LP -.RS 3 - +.SH "MORE INFORMATION" .LP .LP For more information about Java Web Start, see .na \f2Java Web Start\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javaws/index.html. -.LP -.RS 3 - -.LP -.LP -\ +http://download.oracle.com/javase/7/docs/technotes/guides/javaws/index.html. .LP -.RE -.RE diff --git a/src/linux/doc/man/jconsole.1 b/src/linux/doc/man/jconsole.1 index aafa16475f9a6f1cf20e639279896f6a2f9f5a49..14d87bb83c5963d2ec0811670702a9f920583aa4 100644 --- a/src/linux/doc/man/jconsole.1 +++ b/src/linux/doc/man/jconsole.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jconsole 1 "02 Jun 2010" +.TH jconsole 1 "10 May 2011" .LP .SH "Name" jconsole \- Java Monitoring and Management Console .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,41 +38,40 @@ jconsole \- Java Monitoring and Management Console .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 options Options, if used, should follow immediately after the command name. -.br .TP 3 connection = pid | host:port | jmxUrl .RS 3 -\f2pid\fP\ \ \ Process ID of a local Java VM. The Java VM must be running with the same user ID as the user ID running jconsole. See +.TP 2 +o +\f2pid\fP Process ID of a local Java VM. The Java VM must be running with the same user ID as the user ID running jconsole. See .na \f2JMX Monitoring and Management\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html for details. -.br -\f2host\fP:\f2port\fP\ \ Name of the host system on which the Java VM is running and the port number specified by the system property \f2com.sun.management.jmxremote.port\fP when the Java VM was started. See +http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details. +.TP 2 +o +\f2host\fP:\f2port\fP Name of the host system on which the Java VM is running and the port number specified by the system property \f2com.sun.management.jmxremote.port\fP when the Java VM was started. See .na \f2JMX Monitoring and Management\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html for details. -.br -\f2jmxUrl\fP\ \ Address of the JMX agent to be connected to as described in +http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details. +.TP 2 +o +\f2jmxUrl\fP Address of the JMX agent to be connected to as described in .na \f2JMXServiceURL\fP @ .fi -http://java.sun.com/javase/6/docs/api/javax/management/remote/JMXServiceURL.html. +http://download.oracle.com/javase/7/docs/api/javax/management/remote/JMXServiceURL.html. .RE .RE .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jconsole\fP command launches a graphical console tool that enables you to monitor and manage Java applications and virtual machines on a local or remote machine. @@ -83,18 +80,16 @@ The \f3jconsole\fP command launches a graphical console tool that enables you to On Windows, \f3jconsole\fP does not associate with a console window. It will, however, display a dialog box with error information if the \f3jconsole\fP command fails for some reason. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 \-interval=n Set the update interval to \f2n\fP seconds (default is 4 seconds). .TP 3 -\-notile\ +\-notile Do not tile windows initially (for two or more connections). .TP 3 -\-pluginpath\ plugins +\-pluginpath plugins Specify a list of directories or JAR files which are searched for JConsole plugins. The \f2plugins\fP path should contain a provider\-configuration file named: .br .nf @@ -104,20 +99,19 @@ Specify a list of directories or JAR files which are searched for JConsole plugi .fl \fP .fi -.LP containing one line for each plugin specifying the fully qualified class name of the class implementing the .na \f2com.sun.tools.jconsole.JConsolePlugin\fP @ .fi -http://java.sun.com/javase/6/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/JConsolePlugin.html class. +http://download.oracle.com/javase/7/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/JConsolePlugin.html class. .TP 3 -\-version\ +\-version Output version information and exit. .TP 3 -\-help\ +\-help Output help message and exit. .TP 3 -\-J<flag>\ +\-J<flag> Pass <flag> to the Java virtual machine on which jconsole is run. .RE @@ -130,13 +124,13 @@ o .na \f2Using JConsole\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html +http://download.oracle.com/javase/7/docs/technotes/guides/management/jconsole.html .TP 2 o .na \f2Monitoring and Management for Java Platform\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/management/index.html .RE .LP diff --git a/src/linux/doc/man/jdb.1 b/src/linux/doc/man/jdb.1 index 6e0b94394b15fa604915cf5266a35e6b95bcdba6..e89a60b9748a36e16edd54d4f38e0ec7d32b50f1 100644 --- a/src/linux/doc/man/jdb.1 +++ b/src/linux/doc/man/jdb.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1995, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jdb 1 "02 Jun 2010" +.TH jdb 1 "10 May 2011" .LP .SH "Name" jdb \- The Java Debugger -.LP -.RS 3 - .LP .LP \f3jdb\fP helps you find and fix bugs in Java language programs. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -43,9 +37,6 @@ jdb \- The Java Debugger .fl .fi -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -60,23 +51,17 @@ Arguments passed to the \f2main()\fP method of \f2class\fP. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The Java Debugger, \f3jdb\fP, is a simple command\-line debugger for Java classes. It is a demonstration of the .na \f2Java Platform Debugger Architecture\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jpda/index.html that provides inspection and debugging of a local or remote Java Virtual Machine. +http://download.oracle.com/javase/7/docs/technotes/guides/jpda/index.html that provides inspection and debugging of a local or remote Java Virtual Machine. .LP .SS Starting a jdb Session -.LP -.RS 3 - .LP .LP There are many ways to start a jdb session. The most frequently used way is to have \f3jdb\fP launch a new Java Virtual Machine (VM) with the main class of the application to be debugged. This is done by substituting the command \f3jdb\fP for \f3java\fP in the command line. For example, if your application's main class is MyClass, you use the following command to debug it under JDB: @@ -137,7 +122,7 @@ There are many other ways to connect the debugger to a VM, and all of them are s .na \f2documentation\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.html on these connection options. For information on starting a J2SE 1.4.2 or early VM for use with \f3jdb\fP see the +http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection options. For information on starting a J2SE 1.4.2 or early VM for use with \f3jdb\fP see the .na \f21.4.2 documentation\fP @ .fi @@ -148,9 +133,6 @@ Basic jdb Commands .LP .LP The following is a list of the basic \f3jdb\fP commands. The Java debugger supports other commands which you can list using \f3jdb\fP's \f2help\fP command. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -164,10 +146,12 @@ cont Continues execution of the debugged application after a breakpoint, exception, or step. .TP 3 print -Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the \f2dump\fP command below for getting more information about an object. -.LP -\f2NOTE: To display local variables, the containing class must have been compiled with the \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP option. -.LP +Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the \f2dump\fP command below for getting more information about an object. +.br +.br +\f2NOTE: To display local variables, the containing class must have been compiled with the \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP option. +.br +.br \f2print\fP supports many simple Java expressions including those with method invocations, for example: .RS 3 .TP 2 @@ -188,15 +172,13 @@ o .RE .TP 3 dump -For primitive values, this command is identical to \f2print\fP. For objects, it prints the current value of each field defined in the object. Static and instance fields are included. -.LP -The \f2dump\fP command supports the same set of expressions as the \f2print\fP command. +For primitive values, this command is identical to \f2print\fP. For objects, it prints the current value of each field defined in the object. Static and instance fields are included. +.br +.br +The \f2dump\fP command supports the same set of expressions as the \f2print\fP command. .TP 3 threads List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example: -.RS 3 - -.LP .nf \f3 .fl @@ -204,25 +186,21 @@ List the threads that are currently running. For each thread, its name and curre .fl \fP .fi -.RE In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is "main", and it is currently running, .TP 3 thread Select a thread to be the current thread. Many \f3jdb\fP commands are based on the setting of the current thread. The thread is specified with the thread index described in the \f2threads\fP command above. .TP 3 where -\f2where\fP with no arguments dumps the stack of the current thread. \f2where all\fP dumps the stack of all threads in the current thread group. \f2where\fP \f2threadindex\fP dumps the stack of the specified thread. -.LP -If the current thread is suspended (either through an event such as a breakpoint or through the \f2suspend\fP command), local variables and fields can be displayed with the \f2print\fP and \f2dump\fP commands. The \f2up\fP and \f2down\fP commands select which stack frame is current. +\f2where\fP with no arguments dumps the stack of the current thread. \f2where all\fP dumps the stack of all threads in the current thread group. \f2where\fP \f2threadindex\fP dumps the stack of the specified thread. +.br +.br +If the current thread is suspended (either through an event such as a breakpoint or through the \f2suspend\fP command), local variables and fields can be displayed with the \f2print\fP and \f2dump\fP commands. The \f2up\fP and \f2down\fP commands select which stack frame is current. .RE .LP -.RE .SS Breakpoints -.LP -.RS 3 - .LP .LP Breakpoints can be set in \f3jdb\fP at line numbers or at the first instruction of a method, for example: @@ -249,22 +227,14 @@ If a method is overloaded, you must also specify its argument types so that the .LP The \f2clear\fP command removes breakpoints using a syntax as in "\f2clear\ MyClass:45\fP". Using the \f2clear\fP or command with no argument displays a list of all breakpoints currently set. The \f2cont\fP command continues execution. .LP -.RE .SS Stepping -.LP -.RS 3 - .LP .LP The \f2step\fP commands advances execution to the next line whether it is in the current stack frame or a called method. The \f2next\fP command advances execution to the next line in the current stack frame. .LP -.RE .SS Exceptions -.LP -.RS 3 - .LP .LP When an exception occurs for which there isn't a catch statement anywhere in the throwing thread's call stack, the VM normally prints an exception trace and exits. When running under \f3jdb\fP, however, control returns to \f3jdb\fP at the offending throw. You can then use \f3jdb\fP to diagnose the cause of the exception. @@ -278,11 +248,7 @@ The \f2ignore\fP command negates the effect of a previous \f2catch\fP command. .LP \f2NOTE: The \fP\f2ignore\fP command does not cause the debugged VM to ignore specific exceptions, only the debugger. .LP -.RE -.RE .SH "Command Line Options" -.LP - .LP .LP When you use \f3jdb\fP in place of the Java application launcher on the command line, \f3jdb\fP accepts many of the same options as the java command, including \f2\-D\fP, \f2\-classpath\fP, and \f2\-X<option>\fP. @@ -335,7 +301,7 @@ Other options are supported for alternate mechanisms for connecting the debugger .na \f2documentation\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.html on these connection alternatives. +http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection alternatives. .LP .SS Options Forwarded to Debuggee Process @@ -357,8 +323,6 @@ Non\-standard target VM option .LP .SH "SEE ALSO" -.LP - .LP .LP javac(1), java(1), javah(1), javap(1), javadoc(1). diff --git a/src/linux/doc/man/jhat.1 b/src/linux/doc/man/jhat.1 index b7412b5ef3d2abe0d99e01379ac445f4f7f4406d..62c72f6852174963f17892e70afa01c3b41c8776 100644 --- a/src/linux/doc/man/jhat.1 +++ b/src/linux/doc/man/jhat.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2006, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jhat 1 "02 Jun 2010" +.TH jhat 1 "10 May 2011" .LP .SH "Name" jhat \- Java Heap Analysis Tool .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,18 +38,18 @@ jhat \- Java Heap Analysis Tool .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 options Options, if used, should follow immediately after the command name. -.br .TP 3 heap\-dump\-file Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you may specify which dump in the file by appending "#<number> to the file name, i.e. "foo.hprof#3". -.SH "DESCRIPTION" +.RE + +.LP +.SH "DESCRIPTION" .LP .LP The \f3jhat\fP command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre\-designed queries (such as 'show all instances of a known class "Foo"') as well as \f3OQL\fP (\f3O\fPbject \f3Q\fPuery \f3L\fPanguage) \- a SQL\-like query language to query heap dumps. Help on OQL is available from the OQL help page shown by jhat. With the default port, OQL help is available at http://localhost:7000/oqlhelp/ @@ -69,7 +67,7 @@ Use jconsole(1) option to obtain a heap dump via .na \f2HotSpotDiagnosticMXBean\fP @ .fi -http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime; +http://download.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime; .TP 2 o Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option; @@ -86,7 +84,8 @@ http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. .LP \f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK. .LP -.SH "OPTIONS" +.SH "OPTIONS" +.LP .RS 3 .TP 3 \-stack false/true @@ -107,21 +106,22 @@ Specify a baseline heap dump. Objects in both heap dumps with the same object ID \-debug int Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes. .TP 3 -\-version\ +\-version Report version number and exit. .TP 3 -\-h\ +\-h Output help message and exit. .TP 3 -\-help\ +\-help Output help message and exit. .TP 3 -\-J<flag>\ +\-J<flag> Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB. .RE .LP -.SH "SEE ALSO" +.SH "SEE ALSO" +.LP .RS 3 .TP 2 o @@ -136,5 +136,6 @@ o .fi http://java.sun.com/developer/technicalArticles/Programming/HPROF.html .RE -.RE + +.LP diff --git a/src/linux/doc/man/jinfo.1 b/src/linux/doc/man/jinfo.1 index 04133792f136dc6342e77412aebb192d8cb13629..ea072ffce646fa05067a58d01819cf31f4fb48c6 100644 --- a/src/linux/doc/man/jinfo.1 +++ b/src/linux/doc/man/jinfo.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jinfo 1 "02 Jun 2010" +.TH jinfo 1 "10 May 2011" .LP .SH "Name" jinfo \- Configuration Info .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -42,55 +40,56 @@ jinfo \- Configuration Info .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 option Options are mutually exclusive. Option, if used, should follow immediately after the command name. +.RE + +.LP .RS 3 .TP 3 pid process id for which the configuration info is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. .RE + +.LP .RS 3 .TP 3 executable Java executable from which the core dump was produced. .RE + +.LP .RS 3 .TP 3 core core file for which the configuration info is to be printed. .RE + +.LP .RS 3 .TP 3 remote\-hostname\-or\-IP remote debug server's (see jsadebugd(1)) hostname or IP address. .RE + +.LP .RS 3 .TP 3 server\-id optional unique id, if multiple debug servers are running on the same remote host. .RE -.RE .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jinfo\fP prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: .br - -.LP -.RS 3 - -.LP jinfo \-J\-d64 \-sysprops pid -.RE +.LP .LP \f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' need to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP .LP @@ -98,8 +97,6 @@ jinfo \-J\-d64 \-sysprops pid \f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 diff --git a/src/linux/doc/man/jmap.1 b/src/linux/doc/man/jmap.1 index 6e2469e9faa27707a8aa2563d0526650ee8cf1b0..f906dedc68128197026389b11c91229afedb2a89 100644 --- a/src/linux/doc/man/jmap.1 +++ b/src/linux/doc/man/jmap.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jmap 1 "02 Jun 2010" +.TH jmap 1 "10 May 2011" .LP .SH "Name" jmap \- Memory Map .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -42,8 +40,6 @@ jmap \- Memory Map .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -73,14 +69,9 @@ optional unique id, if multiple debug servers are running on the same remote hos .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jmap\fP prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: -.LP -.RS 3 - .LP .nf \f3 @@ -89,10 +80,11 @@ jmap \-J\-d64 \-heap pid .fl \fP .fi -.RE .LP -\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP +.LP +\f3NOTE: This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP +.LP .LP \f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP @@ -100,13 +92,11 @@ jmap \-J\-d64 \-heap pid .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 <no option> -When no option is used \f3jmap\fP prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility. +When no option is used jmap prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility. .br .TP 3 \-dump:[live,]format=b,file=<filename> diff --git a/src/linux/doc/man/jps.1 b/src/linux/doc/man/jps.1 index 94af0960db97f241ef0718253573a14ed8c0a75e..1ec15e124ea86ff533044ecd3e50bb7d90544540 100644 --- a/src/linux/doc/man/jps.1 +++ b/src/linux/doc/man/jps.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jps 1 "02 Jun 2010" +.TH jps 1 "10 May 2011" .LP .SH "Name" jps \- Java Virtual Machine Process Status Tool .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,8 +38,6 @@ jps \- Java Virtual Machine Process Status Tool .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -54,8 +50,6 @@ The host identifier of the host for which the process report should be generated .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jps\fP tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions. @@ -76,8 +70,6 @@ The list of JVMs produced by the \f3jps\fP command may be limited by the permiss \f3NOTE:\fP This utility is unsupported and may not be available in future versions of the JDK. It is not currently available on Windows 98 and Windows ME platforms. .LP .SH "OPTIONS" -.LP - .LP .LP The \f3jps\fP command supports a number of options that modify the output of the command. These options are subject to change or removal in the future. @@ -106,9 +98,6 @@ Pass \f2option\fP to the \f3java\fP launcher called by \f3jps\fP. For example, \ .LP .SS HOST IDENTIFIER -.LP -.RS 3 - .LP .LP The host identifier, or \f2hostid\fP is a string that indicates the target system. The syntax of the \f2hostid\fP string largely corresponds to the syntax of a URI: @@ -140,10 +129,7 @@ The treatment of this parameter depends on the implementation. For the optimized .RE .LP -.RE .SH "OUTPUT FORMAT" -.LP - .LP .LP The output of the \f3jps\fP command follows the following pattern: @@ -168,8 +154,6 @@ Where all output tokens are separated by white space. An \f2arg\fP that includes .LP .SH "EXAMPLES" -.LP - .LP .LP This section provides examples of the \f3jps\fP command. diff --git a/src/linux/doc/man/jrunscript.1 b/src/linux/doc/man/jrunscript.1 index 2fdbb9db5ddfd4378ea0011a916b74d0e91e4b04..7c6548fa794bb4a143ef6e44b07a0c20ef852244 100644 --- a/src/linux/doc/man/jrunscript.1 +++ b/src/linux/doc/man/jrunscript.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2006, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jrunscript 1 "02 Jun 2010" +.TH jrunscript 1 "10 May 2011" .LP .SH "Name" jrunscript \- command line script shell .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -38,8 +36,6 @@ jrunscript \- command line script shell .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -52,8 +48,6 @@ Arguments, if used, should follow immediately after options or command name. .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jrunscript\fP is a command line script shell. jrunscript supports both an interactive (read\-eval\-print) mode and a batch (\-f option) mode of script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the \-l option can be used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming" style. @@ -62,8 +56,6 @@ Arguments, if used, should follow immediately after options or command name. \f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -112,10 +104,8 @@ If [arguments...] are present and if no \f3\-e\fP or \f3\-f\fP option is used, t .LP .SH "EXAMPLES" .LP -\f3Executing inline scripts\fP -.LP -.RS 3 - +.SS +Executing inline scripts .LP .nf \f3 @@ -126,13 +116,10 @@ jrunscript \-e "cat('http://java.sun.com')" .fl \fP .fi -.RE .LP -\f3Use specified language and evaluate given script file\fP -.LP -.RS 3 - +.SS +Use specified language and evaluate given script file .LP .nf \f3 @@ -141,42 +128,42 @@ jrunscript \-l js \-f test.js .fl \fP .fi -.RE .LP -\f3Interactive mode\fP -.LP -.RS 3 - +.SS +Interactive mode .LP .nf \f3 .fl jrunscript .fl -js>print('hello world'); +js> print('Hello World\\n'); +.fl +Hello World +.fl +js> 34 + 55 +.fl +89.0 .fl -hello world +js> t = new java.lang.Thread(function() { print('Hello World\\n'); }) .fl -js>34 + 55 +Thread[Thread\-0,5,main] .fl -89 +js> t.start() .fl -js> thread(function() { print('hello world'); } +js> Hello World .fl -hello world + .fl js> .fl \fP .fi -.RE .LP -\f3Run script file with script arguments\fP -.LP -.RS 3 - +.SS +Run script file with script arguments .LP .nf \f3 @@ -185,13 +172,16 @@ jrunscript test.js arg1 arg2 arg3 .fl \fP .fi -.RE .LP test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "arguments" array. .SH "SEE ALSO" .LP .LP -If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in jsdocs. +If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in +.na +\f2jsdocs\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/tools/share/jsdocs/allclasses\-noframe.html. .LP diff --git a/src/linux/doc/man/jsadebugd.1 b/src/linux/doc/man/jsadebugd.1 index 8a94b110eb4a6277a09ecaf0813efbece441dc48..3d77b1d4113ab4b30014ed881399f4b3113cbf38 100644 --- a/src/linux/doc/man/jsadebugd.1 +++ b/src/linux/doc/man/jsadebugd.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jsadebugd 1 "02 Jun 2010" +.TH jsadebugd 1 "10 May 2011" .LP .SH "Name" jsadebugd \- Serviceability Agent Debug Daemon .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,36 +38,17 @@ jsadebugd \- Serviceability Agent Debug Daemon .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 pid process id of the process to which the debug server should attach. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. At most one instance of the debug server may be attached to a single process. -.RE - -.LP -.RS 3 .TP 3 executable -.RE - -.LP -.RS 3 -.TP 3 Java executable from which the core dump was produced -.RE - -.LP -.RS 3 .TP 3 core Core file to which the debug server should attach. -.RE - -.LP -.RS 3 .TP 3 server\-id Optional unique id, needed if multiple debug servers are started on the same machine. This ID must be used by remote clients to identify the particular debug server to attach. Within a single machine, this ID must be unique. @@ -77,18 +56,13 @@ Optional unique id, needed if multiple debug servers are started on the same mac .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jsadebugd\fP attaches to a Java process or core file and acts as a debug server. Remote clients such as jstack(1), jmap(1), and jinfo(1) can attach to the server using Java Remote Method Invocation (RMI). Before starting \f2jsadebugd\fP, .na \f2rmiregistry\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi must be started with: -.LP -.RS 3 - +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi must be started with: .LP .nf \f3 @@ -97,17 +71,16 @@ http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi must be started .fl \fP .fi -.RE .LP .LP where \f2$JAVA_HOME\fP is the JDK installation directory. If rmiregistry was not started, jsadebugd will start an rmiregistry in a standard (1099) port internally. Debug server may be stopped by sending SIGINT (pressing Ctrl\-C) to it. .LP .LP -\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP +\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced. .LP .LP -\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP +For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "SEE ALSO" .LP @@ -129,7 +102,7 @@ o .na \f2rmiregistry\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi .RE .LP diff --git a/src/linux/doc/man/jstack.1 b/src/linux/doc/man/jstack.1 index 34fdded3baf0662df9323cc3341419d95096c9e4..e70b10ed5e713ba41016cf6fdc910a2efadd4021 100644 --- a/src/linux/doc/man/jstack.1 +++ b/src/linux/doc/man/jstack.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jstack 1 "02 Jun 2010" +.TH jstack 1 "10 May 2011" .LP .SH "Name" @@ -28,8 +28,6 @@ jstack \- Stack Trace .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -44,8 +42,6 @@ jstack \- Stack Trace .LP .SH "PARAMETERS" -.LP - .LP .LP Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS. @@ -77,16 +73,11 @@ optional unique id, if multiple debug servers are running on the same remote hos .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jstack\fP prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, 'bci' (byte code index) and line number, if available, are printed. With the \-m option, jstack prints both Java and native frames of all threads along with the 'pc' (program counter). For each native frame, the closest native symbol to 'pc', if available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command may be piped to \f3c++filt\fP. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: .br -.LP -.RS 3 - .LP .nf \f3 @@ -95,7 +86,6 @@ jstack \-J\-d64 \-m pid .fl \fP .fi -.RE .LP .LP @@ -105,8 +95,6 @@ jstack \-J\-d64 \-m pid For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -118,7 +106,7 @@ Long listing. Prints additional information about locks such as list of owned ja .na \f2ownable synchronizers\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. +http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. .TP 3 \-m prints mixed mode (both Java and native C/C++ frames) stack trace. @@ -153,8 +141,6 @@ jsadebugd(1) .LP .SH "KNOWN BUGS" -.LP - .LP .LP Mixed mode stack trace, the \-m option, does not work with the remote debug server. diff --git a/src/linux/doc/man/jstat.1 b/src/linux/doc/man/jstat.1 index 1ecee640ac4850df63d449fb940ccc26439c79e9..c83d410bef09b29ecf6e61fadb2fd964ec4d23dc 100644 --- a/src/linux/doc/man/jstat.1 +++ b/src/linux/doc/man/jstat.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jstat 1 "02 Jun 2010" +.TH jstat 1 "10 May 2011" .LP .SH "Name" jstat \- Java Virtual Machine Statistics Monitoring Tool .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -38,8 +36,6 @@ jstat \- Java Virtual Machine Statistics Monitoring Tool .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -60,16 +56,14 @@ Virtual machine identifier, a string indicating the target Java virtual machine The syntax of the vmid string largely corresponds to the syntax of a URI. The \f2vmid\fP can vary from a simple integer representing a local JVM to a more complex construction specifying a communications protocol, port number, and other implementation\-specific values. See Virtual Machine Identifier for details. .TP 3 interval[s|ms] -Sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds.\ Must be a positive integer.\ If specified, \f3jstat\fP will produce its output at each interval. +Sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds. Must be a positive integer. If specified, \f3jstat\fP will produce its output at each interval. .TP 3 count -Number of samples to display. Default value is infinity; that is, \f3jstat\fP displays statistics until the target JVM terminates or the \f3jstat\fP command is terminated.\ Must be a positive integer. +Number of samples to display. Default value is infinity; that is, \f3jstat\fP displays statistics until the target JVM terminates or the \f3jstat\fP command is terminated. Must be a positive integer. .RE .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jstat\fP tool displays performance statistics for an instrumented HotSpot Java virtual machine (JVM). The target JVM is identified by its virtual machine identifier, or \f2vmid\fP option described below. @@ -81,9 +75,6 @@ The \f3jstat\fP tool displays performance statistics for an instrumented HotSpot .LP .SS VIRTUAL MACHINE IDENTIFIER -.LP -.RS 3 - .LP .LP The syntax of the \f2vmid\fP string largely corresponds to the syntax of a URI: @@ -115,10 +106,7 @@ The treatment of this parameter depends on implementation. For the optimized loc .RE .LP -.RE .SH "OPTIONS" -.LP - .LP .LP The \f3jstat\fP command supports two types of options, general options and output options. General options cause \f3jstat\fP to display simple usage and version information. Output options determine the content and format of the statistical output. @@ -149,15 +137,12 @@ Display list of statistics options. See the Output Options section below. .LP .SS OUTPUT OPTIONS -.LP -.RS 3 - .LP .LP -If you do not specify a general option, then you can specify output options. Output options determine the content and format of \f3jstat\fP's output, and consist of a single \f2statOption\fP, plus any of the other output options (\-h, \-t, and \-J).\ The \f2statOption\fP must come first. +If you do not specify a general option, then you can specify output options. Output options determine the content and format of \f3jstat\fP's output, and consist of a single \f2statOption\fP, plus any of the other output options (\-h, \-t, and \-J). The \f2statOption\fP must come first. .LP .LP -Output is formatted as a table, with columns are separated by spaces. A header row with titles describes the columns.\ Use the \f3\-h\fP option to set the frequency at which the header is displayed.\ Column header names are generally consistent between the different options. In general, if two options provide a column with the same name, then the data source for the two columns are the same. +Output is formatted as a table, with columns are separated by spaces. A header row with titles describes the columns. Use the \f3\-h\fP option to set the frequency at which the header is displayed. Column header names are generally consistent between the different options. In general, if two options provide a column with the same name, then the data source for the two columns are the same. .LP .LP Use the \f3\-t\fP option to display a time stamp column, labeled \f2Timestamp\fP as the first column of output. The \f2Timestamp\fP column contains the elapsed time, in seconds, since startup of the target JVM. The resolution of the time stamp is dependent on various factors and is subject to variation due to delayed thread scheduling on heavily loaded systems. @@ -171,11 +156,10 @@ Use the \f2interval\fP and \f2count\fP parameters to determine how frequently an .RS 3 .TP 3 \-statOption -Determines the statistics information that \f3jstat\fP displays. The following table lists the available options.\ Use the \f3\-options\fP general option to display the list of options for a particular platform installation. +Determines the statistics information that \f3jstat\fP displays. The following table lists the available options. Use the \f3\-options\fP general option to display the list of options for a particular platform installation. .br .br .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -457,7 +441,7 @@ HotSpot compilation method statistics. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 230 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 215 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -683,7 +667,6 @@ HotSpot compilation method statistics. .rm j+ .rm k+ .rm l+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-52 .TP 3 \-h n @@ -697,12 +680,8 @@ Pass \f2javaOption\fP to the \f3java\fP application launcher. For example, \f3\- .RE .LP -.RE .SS STATOPTIONS AND OUTPUT -.LP -.RS 3 - .LP .LP The following tables summarize the columns that \f3jstat\fP outputs for each \f2statOption\fP. @@ -713,7 +692,6 @@ The following tables summarize the columns that \f3jstat\fP outputs for each \f2 \-class Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -825,7 +803,7 @@ Time spent performing class load and unload operations. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 280 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 261 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -910,7 +888,6 @@ Time spent performing class load and unload operations. .rm a+ .rm b+ .rm c+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-21 .LP @@ -918,7 +895,6 @@ Time spent performing class load and unload operations. \-compiler Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -1082,7 +1058,7 @@ Class name and method for the last failed compilation. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 316 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 297 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1210,7 +1186,6 @@ Class name and method for the last failed compilation. .rm d+ .rm e+ .rm f+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-29 .LP @@ -1218,7 +1193,6 @@ Class name and method for the last failed compilation. \-gc Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -1546,7 +1520,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 386 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 367 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1814,7 +1788,6 @@ Total garbage collection time. .rm l+ .rm m+ .rm n+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-63 .LP @@ -1822,7 +1795,6 @@ Total garbage collection time. \-gccapacity Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -2170,7 +2142,7 @@ Number of Young generation GC Events. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 460 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 441 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2455,7 +2427,6 @@ Number of Young generation GC Events. .rm m+ .rm n+ .rm o+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-67 .LP @@ -2466,7 +2437,6 @@ Number of Young generation GC Events. This option displays the same summary of garbage collection statistics as the \f3\-gcutil\fP option, but includes the causes of the last garbage collection event and (if applicable) the current garbage collection event. In addition to the columns listed for \f3\-gcutil\fP, this option adds the following columns: .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -2550,7 +2520,7 @@ Cause of current Garbage Collection. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 483 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 464 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2610,7 +2580,6 @@ Cause of current Garbage Collection. .35 .rm a+ .rm b+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-13 .LP @@ -2618,7 +2587,6 @@ Cause of current Garbage Collection. \-gcnew Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -2866,7 +2834,7 @@ Young generation garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 537 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 518 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3066,7 +3034,6 @@ Young generation garbage collection time. .rm h+ .rm i+ .rm j+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-47 .LP @@ -3074,7 +3041,6 @@ Young generation garbage collection time. \-gcnewcapacity Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -3094,15 +3060,14 @@ Young generation garbage collection time. .rm 80 81 .nr 34 \n(.lu .eo -.am 80 +.am 81 .br .di a+ .35 .ft \n(.f .ll \n(34u*1u/3u -.if \n(.l<\n(80 .ll \n(80u +.if \n(.l<\n(81 .ll \n(81u .in 0 -NGCMN\ \ \ \ \ \ \ \ \ T}~T{ Minimum new generation capacity (KB). .br .di @@ -3262,9 +3227,11 @@ Number of young generation GC events. .if \n(80<\n(38 .nr 80 \n(38 .nr 38 \w\f3Column\fP .if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \wNGCMX \ \ \ +.nr 38 \wNGCMN +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \wNGCMX .if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \wNGC \ \ \ +.nr 38 \wNGC .if \n(80<\n(38 .nr 80 \n(38 .nr 38 \wS0CMX .if \n(80<\n(38 .nr 80 \n(38 @@ -3284,8 +3251,6 @@ Number of young generation GC events. .if \n(80<\n(38 .nr 80 \n(38 .80 .rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 .nr 81 0 .nr 38 \w\f3Description\fP .if \n(81<\n(38 .nr 81 \n(38 @@ -3293,6 +3258,8 @@ Number of young generation GC events. .if \n(81<\n(38 .nr 81 \n(38 .81 .rm 81 +.nr 38 \n(a- +.if \n(81<\n(38 .nr 81 \n(38 .nr 38 \n(b- .if \n(81<\n(38 .nr 81 \n(38 .nr 38 \n(c- @@ -3321,7 +3288,7 @@ Number of young generation GC events. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 593 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 572 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3348,11 +3315,11 @@ Number of young generation GC events. .ta \n(80u \n(81u .nr 31 \n(.f .nr 35 1m -\&\h'|\n(40u'\h'|\n(41u' +\&\h'|\n(40u'NGCMN\h'|\n(41u' .mk ## .nr 31 \n(## .sp |\n(##u-1v -.nr 37 \n(40u +.nr 37 \n(41u .in +\n(37u .a+ .in -\n(37u @@ -3364,7 +3331,7 @@ Number of young generation GC events. .ta \n(80u \n(81u .nr 31 \n(.f .nr 35 1m -\&\h'|\n(40u'NGCMX \ \ \\h'|\n(41u' +\&\h'|\n(40u'NGCMX\h'|\n(41u' .mk ## .nr 31 \n(## .sp |\n(##u-1v @@ -3380,7 +3347,7 @@ Number of young generation GC events. .ta \n(80u \n(81u .nr 31 \n(.f .nr 35 1m -\&\h'|\n(40u'NGC \ \ \\h'|\n(41u' +\&\h'|\n(40u'NGC\h'|\n(41u' .mk ## .nr 31 \n(## .sp |\n(##u-1v @@ -3521,15 +3488,13 @@ Number of young generation GC events. .rm h+ .rm i+ .rm j+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-49 +.if \n-(b.=0 .nr c. \n(.c-\n(d.-47 .LP .SS \-gcold Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -3717,7 +3682,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 635 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 614 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3866,7 +3831,6 @@ Total garbage collection time. .rm e+ .rm f+ .rm g+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-35 .LP @@ -3874,7 +3838,6 @@ Total garbage collection time. \-gcoldcapacity Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -4062,7 +4025,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 677 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 656 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -4211,7 +4174,6 @@ Total garbage collection time. .rm e+ .rm f+ .rm g+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-35 .LP @@ -4219,7 +4181,6 @@ Total garbage collection time. \-gcpermcapacity Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -4407,7 +4368,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 719 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 698 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -4556,7 +4517,6 @@ Total garbage collection time. .rm e+ .rm f+ .rm g+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-35 .LP @@ -4564,7 +4524,6 @@ Total garbage collection time. \-gcutil Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -4792,7 +4751,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 769 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 748 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -4975,7 +4934,6 @@ Total garbage collection time. .rm g+ .rm h+ .rm i+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-43 .LP @@ -4983,7 +4941,6 @@ Total garbage collection time. \-printcompilation Option .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -5091,7 +5048,7 @@ Class name and method name identifying the compiled method. Class name uses "/" .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 795 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 774 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -5172,14 +5129,10 @@ Class name and method name identifying the compiled method. Class name uses "/" .rm a+ .rm b+ .rm c+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-19 .LP -.SS - -.LP -.SH "" +.SH "EXAMPLES" .LP .LP This section presents some examples of monitoring a local JVM with a \f2lvmid\fP of 21891. @@ -5355,7 +5308,6 @@ This example attaches to \f2lvmid\fP 40496 on the system named \f2remote.domain\ .LP The \f2lvmid\fP is combined with the name of the remote host to construct a \f2vmid\fP of \f240496@remote.domain\fP. This \f2vmid\fP results in the use of the \f3rmi\fP protocol to communicate to the default \f3jstatd\fP server on the remote host. The \f3jstatd\fP server is located using the \f3rmiregistry\fP on \f2remote.domain\fP that is bound to the default \f3rmiregistry\fP port (port 1099). .LP -.RE .SH "SEE ALSO" .LP .RS 3 diff --git a/src/linux/doc/man/jstatd.1 b/src/linux/doc/man/jstatd.1 index 79b8b392fd6f2a19c8f79b3112b94f15fe234f88..fd9b0f7b1e2d7dd41a5389f1abfc2ef3a1a33896 100644 --- a/src/linux/doc/man/jstatd.1 +++ b/src/linux/doc/man/jstatd.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jstatd 1 "02 Jun 2010" +.TH jstatd 1 "10 May 2011" .LP .SH "Name" jstatd \- Virtual Machine jstat Daemon .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -41,8 +39,6 @@ jstatd [ \fP\f4options\fP\f3 ]\fP .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -52,8 +48,6 @@ Command\-line options. The options may be in any order. If there are redundant o .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jstatd\fP tool is an RMI server application that monitors for the creation and termination of instrumented HotSpot Java virtual machines (JVMs) and provides a interface to allow remote monitoring tools to attach to JVMs running on the local host. @@ -65,8 +59,6 @@ The \f3jstatd\fP server requires the presence of an RMI registry on the local ho \f3NOTE:\fP This utility is unsupported and may or may not be available in future versions of the JDK. It is not currently available on the Windows 98 and Windows ME platforms. .LP .SH "OPTIONS" -.LP - .LP .LP The \f3jstatd\fP command supports the following options: @@ -88,8 +80,6 @@ Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, .LP .SH "SECURITY" -.LP - .LP .LP The \f3jstatd\fP server can only monitor JVMs for which it has the appropriate native access permissions. Therefor the \f3jstatd\fP process must be running with the same user credentials as the target JVMs. Some user credentials, such as the \f2root\fP user in UNIX(TM) based systems, have permission to access the instrumentation exported by any JVM on the system. A \f3jstatd\fP process running with such credentials can monitor any JVM on the system, but introduces additional security concerns. @@ -102,7 +92,7 @@ The \f3jstatd\fP server installs an instance of RMISecurityPolicy if no other se .na \f2Policy File Syntax\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html. .LP .LP The following policy file will allow the \f3jstatd\fP server to run without any security exceptions. This policy is less liberal then granting all permissions to all codebases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fP server. @@ -144,15 +134,11 @@ jstatd \-J\-Djava.security.policy=jstatd.all.policy\fP For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP addreess spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fP server and use the \f3jstat\fP and \f3jps\fP tools locally. .LP .SH "REMOTE INTERFACE" -.LP - .LP .LP The interface exported by the \f3jstatd\fP process is proprietary and is guaranteed to change. Users and developers are discouraged from writing to this interface. .LP .SH "EXAMPLES" -.LP - .LP .LP Here are some examples of starting \f3jstatd\fP. Note that the \f3jstatd\fP scripts automatically start the server in the background. @@ -264,7 +250,7 @@ o .na \f2rmiregistry\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry .RE .LP diff --git a/src/linux/doc/man/jvisualvm.1 b/src/linux/doc/man/jvisualvm.1 new file mode 100644 index 0000000000000000000000000000000000000000..eae03edd804ae2f4a15be6d3758330e02cd45ff1 --- /dev/null +++ b/src/linux/doc/man/jvisualvm.1 @@ -0,0 +1,104 @@ +." Copyright (c) 2008, 2011, 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 +." under the terms of the GNU General Public License version 2 only, as +." published by the Free Software Foundation. +." +." This code is distributed in the hope that it will be useful, but WITHOUT +." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +." version 2 for more details (a copy is included in the LICENSE file that +." accompanied this code). +." +." You should have received a copy of the GNU General Public License version +." 2 along with this work; if not, write to the Free Software Foundation, +." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +." +." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +." or visit www.oracle.com if you need additional information or have any +." questions. +." +.TH jvisualvm 1 "10 May 2011" + +.LP +.SH "Name" +\f2jvisualvm\fP \- Java Virtual Machine Monitoring, Troubleshooting, and Profiling Tool +.LP +.SH "SYNOPSIS" +.LP +.nf +\f3 +.fl + \fP\f3jvisualvm\fP [ \f2options\fP ] +.fl +.fi + +.LP +.SH "PARAMETERS" +.LP +.LP +Options, if used, should follow immediately after the command name. Options may be in any order. For a discussion of parameters that apply to a specific option, see OPTIONS below. +.LP +.SH "DESCRIPTION" +.LP +.LP +Java VisualVM is an intuitive graphical user interface that provides detailed information about Java technology\-based applications (Java applications) while they are running on a given Java Virtual Machine (JVM(*)). The name Java VisualVM comes from the fact that Java VisualVM provides information about the JVM software \f2visually\fP. +.LP +.LP +Java VisualVM combines several monitoring, troubleshooting, and profiling utilities into a single tool. For example, most of the functionality offered by the standalone tools \f2jmap\fP, \f2jinfo\fP, \f2jstat\fP and \f2jstack\fP have been integrated into Java VisualVM. Other functionalities, such as some of those offered by the JConsole tool, can be added as optional plug\-ins. +.LP +.SH "OPTIONS" +.LP +.LP +The following option is possible when you launch Java VisualVM. +.LP +.RS 3 +.TP 3 +\-J<jvm_option>\ +Pass this \f2<jvm_option>\fP to the JVM software. +.RE + +.LP +.SH "USAGE" +.LP +.LP +Java VisualVM is useful to Java application developers to troubleshoot applications and to monitor and improve the applications' performance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, perform and monitor garbage collection, and perform lightweight memory and CPU profiling. Plug\-ins also exist that expand the functionality of Java VisualVM. For example, most of the functionality of the JConsole tool is available via the MBeans Tab and JConsole Plug\-in Wrapper plug\-ins. You can choose from a catalog of standard Java VisualVM plug\-ins by selecting 'Tools' | 'Plugins' in the Java VisualVM menus. +.LP +.LP +Start Java VisualVM with the following command: +.LP +.nf +\f3 +.fl +% jvisualvm \fP\f4<options>\fP\f3 +.fl +\fP +.fi + +.LP +.SH "SEE ALSO" +.LP +.LP +For more details about Java VisualVM see the following pages. +.LP +.RS 3 +.TP 2 +o +.na +\f2Java VisualVM developers' site\fP @ +.fi +http://visualvm.java.net +.TP 2 +o +.na +\f2Java VisualVM in Java SE platform documentation\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/visualvm/index.html +.RE + +.LP +.LP +\f2(* The terms "Java Virtual Machine" and "JVM" mean a Virtual Machine for the Java platform.)\fP +.LP + diff --git a/src/linux/doc/man/keytool.1 b/src/linux/doc/man/keytool.1 index 1b1cd8b0bc7b8fb62ae7bb48c6f4f363e09f5b03..fbb3da80708cbed1c59ae146ef4bf2b3ae1e6c87 100644 --- a/src/linux/doc/man/keytool.1 +++ b/src/linux/doc/man/keytool.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998-2011 keytool tool, 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,20 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH keytool 1 "02 Jun 2010" +.TH keytool 1 "10 May 2011" .LP .SH "Name" keytool \- Key and Certificate Management Tool .LP -.RS 3 - .LP Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates. -.RE -.SH "SYNOPSIS" .LP - +.SH "SYNOPSIS" .LP .nf \f3 @@ -46,8 +42,6 @@ Manages a keystore (database) of cryptographic keys, X.509 certificate chains, a The keytool command interface has changed in Java SE 6. See the Changes Section for a detailed description. Note that previously defined commands are still supported. .LP .SH "DESCRIPTION" -.LP - .LP \f3keytool\fP is a key and certificate management utility. It allows users to administer their own public/private key pairs and associated certificates for use in self\-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. It also allows users to cache the public keys (in the form of certificates) of their communicating peers. .LP @@ -57,14 +51,12 @@ A \f2certificate\fP is a digitally signed statement from one entity (person, com \f3keytool\fP also enables users to administer secret keys used in symmetric encryption/decryption (e.g. DES). .LP .LP -\f3keytool\fP stores the keys and certificates in a \f2keystore\fP. +\f3keytool\fP stores the keys and certificates in a \f2keystore\fP. .LP .SH "COMMAND AND OPTION NOTES" -.LP - .LP .LP -The various commands and their options are listed and described below . Note: +The various commands and their options are listed and described below. Note: .LP .RS 3 .TP 2 @@ -114,6 +106,7 @@ The \f2\-help\fP command is the default. Thus, the command line .fl \fP .fi +.LP is equivalent to .nf \f3 @@ -128,10 +121,9 @@ is equivalent to .SS Option Defaults .LP -.RS 3 - .LP -Below are the defaults for various option values. +Below are the defaults for various option values. +.LP .nf \f3 .fl @@ -152,12 +144,16 @@ Below are the defaults for various option values. 2048 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "RSA") .fl 1024 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "DSA") +.fl + 256 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "EC") .fl 56 (when using \fP\f3\-genseckey\fP\f3 and \-keyalg is "DES") .fl 168 (when using \fP\f3\-genseckey\fP\f3 and \-keyalg is "DESede") .fl +.fl + .fl \-validity 90 .fl @@ -169,7 +165,7 @@ Below are the defaults for various option values. .fl \-storetype the value of the "keystore.type" property in the security properties file, .fl - which is returned by the static \fP\f4getDefaultType\fP\f3 method in + which is returned by the static \fP\f4getDefaultType\fP\f3 method in .fl \fP\f4java.security.KeyStore\fP\f3 .fl @@ -180,26 +176,40 @@ Below are the defaults for various option values. .fl \-protected false -.fl - .fl \fP .fi .LP -In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", \f2\-sigalg\fP defaults to "SHA256withRSA". Please consult the +.LP +In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: +.LP +.RS 3 +.TP 2 +o +If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA" +.TP 2 +o +If the underlying private key is of type "RSA", the \f2\-sigalg\fP option defaults to "SHA256withRSA". +.TP 2 +o +If the underlying private key is of type "EC", the \f2\-sigalg\fP option defaults to "SHA256withECDSA". +.RE + +.LP +.LP +Please consult the .na \f2Java Cryptography Architecture API Specification & Reference\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA for a full list of \f2\-keyalg\fP and \f2\-sigalg\fP you can choose from. -.RE +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA for a full list of \f2\-keyalg\fP and \f2\-sigalg\fP you can choose from. +.LP .SS Common Options .LP -.RS 3 - .LP -The \f2\-v\fP option can appear for all commands except \f2\-help\fP. If it appears, it signifies "verbose" mode; more information will be provided in the output. +The \f2\-v\fP option can appear for all commands except \f2\-help\fP. If it appears, it signifies "verbose" mode; more information will be provided in the output. +.LP .LP There is also a \f2\-J\fP\f2javaoption\fP option that may appear for any command. If it appears, the specified \f2javaoption\fP string is passed through directly to the Java interpreter. This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type \f2java \-h\fP or \f2java \-X\fP at the command line. .LP @@ -209,46 +219,65 @@ These options may appear for all commands operating on a keystore: .RS 3 .TP 3 \-storetype storetype -This qualifier specifies the type of keystore to be instantiated. +.LP +This qualifier specifies the type of keystore to be instantiated. .TP 3 \-keystore keystore +.LP The keystore location. .LP If the JKS storetype is used and a keystore file does not yet exist, then certain \f3keytool\fP commands may result in a new keystore file being created. For example, if \f2keytool \-genkeypair\fP is invoked and the \f2\-keystore\fP option is not specified, the default keystore file named \f2.keystore\fP in the user's home directory will be created if it does not already exist. Similarly, if the \f2\-keystore \fP\f2ks_file\fP option is specified but \f2ks_file\fP does not exist, then it will be created .LP Note that the input stream from the \f2\-keystore\fP option is passed to the \f2KeyStore.load\fP method. If \f2NONE\fP is specified as the URL, then a null stream is passed to the \f2KeyStore.load\fP method. \f2NONE\fP should be specified if the \f2KeyStore\fP is not file\-based (for example, if it resides on a hardware token device). .TP 3 -\-storepass storepass +\-storepass[:env|:file] argument +.LP The password which is used to protect the integrity of the keystore. .LP -\f2storepass\fP must be at least 6 characters long. It must be provided to all commands that access the keystore contents. For such commands, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for it. +If the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP, which must be at least 6 characters long. Otherwise, the password is retrieved as follows: +.RS 3 +.TP 2 +o +\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP +.TP 2 +o +\f2file\fP: Retrieve the password from the file named \f2argument\fP +.RE +.LP +\f3Note\fP: All other options that require passwords, such as \f2\-keypass\fP, \f2\-srckeypass\fP, \f2\-destkeypass\fP \f2\-srcstorepass\fP, and \f2\-deststorepass\fP, accept the \f2env\fP and \f2file\fP modifiers. (Remember to separate the password option and the modifier with a colon, (\f2:\fP).) +.LP +The password must be provided to all commands that access the keystore contents. For such commands, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for it. .LP When retrieving information from the keystore, the password is optional; if no password is given, the integrity of the retrieved information cannot be checked and a warning is displayed. .TP 3 \-providerName provider_name -Used to identify a cryptographic service provider's name when listed in the security properties file. +.LP +Used to identify a cryptographic service provider's name when listed in the security properties file. .TP 3 \-providerClass provider_class_name -Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file. +.LP +Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file. .TP 3 \-providerArg provider_arg -Used in conjunction with \f2\-providerClass\fP. Represents an optional string input argument for the constructor of \f2provider_class_name\fP. +.LP +Used in conjunction with \f2\-providerClass\fP. Represents an optional string input argument for the constructor of \f2provider_class_name\fP. .TP 3 \-protected +.LP Either \f2true\fP or \f2false\fP. This value should be specified as \f2true\fP if a password must be given via a protected authentication path such as a dedicated PIN reader. .LP Note: Since there are two keystores involved in \f2\-importkeystore\fP command, two options, namely, \f2\-srcprotected\fP and \f2\-destprotected\fP are provided for the source keystore and the destination keystore respectively. .TP 3 \-ext {name{:critical}{=value}} -Denotes an X.509 certificate extension. The option can be used in \f2\-genkeypair\fP and \f2\-gencert\fP to embed extensions into the certificate generated, or in \f2\-certreq\fP to show what extensions are requested in the certificate request. The option can appear multiple times. name can be a supported extension name (see below) or an arbitrary OID number. value, if provided, denotes the parameter for the extension; if omitted, denotes the default value (if defined) of the extension or the extension requires no parameter. The \f2":critical"\fP modifier, if provided, means the extension's isCritical attribute is true; otherwise, false. -.RS 3 +.LP +Denotes an X.509 certificate extension. The option can be used in \-genkeypair and \-gencert to embed extensions into the certificate generated, or in \f2\-certreq\fP to show what extensions are requested in the certificate request. The option can appear multiple times. name can be a supported extension name (see below) or an arbitrary OID number. value, if provided, denotes the parameter for the extension; if omitted, denotes the default value (if defined) of the extension or the extension requires no parameter. The \f2:critical\fP modifier, if provided, means the extension's isCritical attribute is true; otherwise, false. You may use \f2:c\fP in place of \f2:critical\fP. +.RE .LP .LP Currently keytool supports these named extensions (case\-insensitive): .LP .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -478,7 +507,7 @@ same as SubjectInfoAccess. method can be "ocsp","caIssuers" or any OID. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 289 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 319 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -649,7 +678,6 @@ same as SubjectInfoAccess. method can be "ocsp","caIssuers" or any OID. .rm h+ .rm i+ .rm j+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-38 .LP @@ -657,7 +685,7 @@ same as SubjectInfoAccess. method can be "ocsp","caIssuers" or any OID. For name as OID, value is the HEX dumped DER encoding of the extnValue for the extension excluding the OCTET STRING type and length bytes. Any extra character other than standard HEX numbers (0\-9, a\-f, A\-F) are ignored in the HEX string. Therefore, both \f2"01:02:03:04"\fP and \f2"01020304"\fP are accepted as identical values. If there's no value, the extension has an empty value field then. .LP .LP -A special name \f2"honored"\fP, used in \-gencert only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma\-seperated list of \f2"all"\fP (all requested extensions are honored), \f2"name{:[critical|non\-critical]}"\fP (the named extension is honored, but using a different isCritical attribute) and \f2"\-name"\fP (used with all, denotes an exception). Requested extensions are not honored by default. +A special name \f2'honored'\fP, used in \f2\-gencert\fP only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma separated list of \f2"all"\fP (all requested extensions are honored), \f2"name{:[critical|non\-critical]}"\fP (the named extension is honored, but using a different isCritical attribute) and \f2"\-name"\fP (used with all, denotes an exception). Requested extensions are not honored by default. .LP .LP If, besides the \-ext honored option, another named or OID \-ext option is provided, this extension will be added to those already honored. However, if this name (or OID) also appears in the honored value, its value and criticality overrides the one in the request. @@ -668,32 +696,61 @@ The subjectKeyIdentifier extension is always created. For non self\-signed certi .LP \f3Note:\fP Users should be aware that some combinations of extensions (and other certificate fields) may not conform to the Internet standard. See Warning Regarding Certificate Conformance for details. .LP -.RE -.RE -.RE .SH "COMMANDS" -.LP - .LP .SS Creating or Adding Data to the Keystore -.LP -.RS 3 - .LP .RS 3 .TP 3 -\-gencert {\-infile infile} {\-outfile outfile} {\-dname dname} {\-ext ext}* {\-rfc} {\-alias alias} {\-sigalg sigalg} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] [\-keypass keypass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} +\-gencert {\-rfc} {\-infile infile} {\-outfile outfile} {\-alias alias} {\-sigalg sigalg} {\-dname dname} {\-startdate startdate {\-ext ext}* {\-validity valDays} [\-keypass keypass] {\-keystore keystore} [\-storepass storepass] {\-storetype storetype} {\-providername provider_name} {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} .LP -Generates a certificate as a response to a certificate request file (which can be created by the \f2keytool \-certreq\fP command). The command reads the request from infile (if omitted, from the standard input), signs it using alias's private key, and output the X.509 certificate into outfile (if omitted, to the standard output). If \f2\-rfc\fP is specified, output format is BASE64\-encoded PEM; otherwise, a binary DER is created. +Generates a certificate as a response to a certificate request file (which can be created by the \f2keytool \-certreq\fP command). The command reads the request from \f2infile\fP (if omitted, from the standard input), signs it using alias's private key, and output the X.509 certificate into \f2outfile\fP (if omitted, to the standard output). If \f2\-rfc\fP is specified, output format is BASE64\-encoded PEM; otherwise, a binary DER is created. .LP -\f2sigalg\fP specifies the algorithm that should be used to sign the certificate. valDays tells the number of days for which the certificate should be considered valid. +\f2sigalg\fP specifies the algorithm that should be used to sign the certificate. \f2startdate\fP is the start time/date that the certificate is valid. \f2valDays\fP tells the number of days for which the certificate should be considered valid. .LP If \f2dname\fP is provided, it's used as the subject of the generated certificate. Otherwise, the one from the certificate request is used. .LP -\f2ext\fP shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of \f2\-ext\fP. +\f2ext\fP shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of \f2\-ext\fP. +.LP +The \f2\-gencert\fP command enables you to create certificate chains. The following example creates a certificate, \f2e1\fP, that contains three certificates in its certificate chain. +.LP +The following commands creates four key pairs named \f2ca\fP, \f2ca1\fP, \f2ca2\fP, and \f2e1\fP: +.nf +\f3 +.fl +keytool \-alias ca \-dname CN=CA \-genkeypair +.fl +keytool \-alias ca1 \-dname CN=CA \-genkeypair +.fl +keytool \-alias ca2 \-dname CN=CA \-genkeypair +.fl +keytool \-alias e1 \-dname CN=E1 \-genkeypair +.fl +\fP +.fi +.LP +The following two commands create a chain of signed certificates; \f2ca\fP signs ca1 and \f2ca1 signs ca2\fP, all of which are self\-issued: +.nf +\f3 +.fl +keytool \-alias ca1 \-certreq | keytool \-alias ca \-gencert \-ext san=dns:ca1 | keytool \-alias ca1 \-importcert +.fl +keytool \-alias ca2 \-certreq | $KT \-alias ca1 \-gencert \-ext san=dns:ca2 | $KT \-alias ca2 \-importcert +.fl +\fP +.fi +.LP +The following command creates the certificate \f2e1\fP and stores it in the file \f2e1.cert\fP, which is signed by \f2ca2\fP. As a result, \f2e1\fP should contain \f2ca\fP, \f2ca1\fP, and \f2ca2\fP in its certificate chain: +.nf +\f3 +.fl +keytool \-alias e1 \-certreq | keytool \-alias ca2 \-gencert > e1.cert +.fl +\fP +.fi .TP 3 -\-genkeypair {\-alias alias} {\-keyalg keyalg} {\-keysize keysize} {\-sigalg sigalg} [\-dname dname] [\-keypass keypass] {\-startdate value} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} +\-genkeypair {\-alias alias} {\-keyalg keyalg} {\-keysize keysize} {\-sigalg sigalg} [\-dname dname] [\-keypass keypass] {\-startdate value} {\-ext ext}* {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} .LP Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v3 self\-signed certificate, which is stored as a single\-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by \f2alias\fP. .LP @@ -704,30 +761,18 @@ Generates a key pair (a public key and associated private key). Wraps the public \f2keypass\fP is a password used to protect the private key of the generated key pair. If no password is provided, the user is prompted for it. If you press RETURN at the prompt, the key password is set to the same password as that used for the keystore. \f2keypass\fP must be at least 6 characters long. .LP \f2startdate\fP specifies the issue time of the certificate, also known as the "Not Before" value of the X.509 certificate's Validity field. -.RS 3 - -.LP -.LP -The option value can be set in one of these two forms: .LP +The option value can be set in one of these two forms: .RS 3 .TP 3 1. -.LP -([+\-]\f2nnn\fP[ymdHMS])+ +([+\-]\f2nnn\fP[ymdHMS])+ .TP 3 2. -.LP -[yyyy/mm/dd] [HH:MM:SS] +[yyyy/mm/dd] [HH:MM:SS] .RE - -.LP -.LP -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 sub values. Inside each sub value, the plus sign ("+") means shifting forward, and the minus sign ("\-") means shifting backward. The time to be shifted is \f2nnn\fP units of years, months, days, hours, minutes, or seconds (denoted by a single character of "y", "m", "d", "H", "M", or "S" respectively). The exact value of the issue time is calculated using the \f2java.util.GregorianCalendar.add(int field, int amount)\fP method on each sub value, from left to right. For example, by specifying \f2"\-startdate \-1y+1m\-1d"\fP, the issue time will be: -.LP -.RS 3 - .LP +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 sub values. Inside each sub value, the plus sign ("+") means shifting forward, and the minus sign ("\-") means shifting backward. The time to be shifted is \f2nnn\fP units of years, months, days, hours, minutes, or seconds (denoted by a single character of "y", "m", "d", "H", "M", or "S" respectively). The exact value of the issue time is calculated using the \f2java.util.GregorianCalendar.add(int field, int amount)\fP method on each sub value, from left to right. For example, by specifying \f2"\-startdate \-1y+1m\-1d"\fP, the issue time will be: .nf \f3 .fl @@ -743,16 +788,10 @@ With the first form, the issue time is shifted by the specified value from the c .fl \fP .fi -.RE - -.LP .LP -With the second form, the user sets the exact issue time in two parts, year/month/day and hour:minute:second (using the local timezone). The user may provide only one part, which means the other part is the same as the current date (or time). User must provide the exact number of digits as shown in the format definition (padding with 0 if shorter). When both the 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. +With the second form, the user sets the exact issue time in two parts, year/month/day and hour:minute:second (using the local time zone). The user may provide only one part, which means the other part is the same as the current date (or time). User must provide the exact number of digits as shown in the format definition (padding with 0 if shorter). When both the 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. .LP -.LP -When the option is not provided, the start date is the current time. The option can be provided at most once. -.LP -.RE +When the option is not provided, the start date is the current time. The option can be provided at most once. .LP \f2valDays\fP specifies the number of days (starting at the date specified by \f2\-startdate\fP, or the current date if \f2\-startdate\fP is not specified) for which the certificate should be considered valid. .LP @@ -790,25 +829,17 @@ Which type of import is intended is indicated by the value of the \f2\-alias\fP \f3If the alias points to a key entry\fP, then \f3keytool\fP assumes you are importing a certificate reply. .RE \f3Importing a New Trusted Certificate\fP -.RS 3 .LP -Before adding the certificate to the keystore, \f3keytool\fP tries to verify it by attempting to construct a chain of trust from that certificate to a self\-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore. +Before adding the certificate to the keystore, \f3keytool\fP tries to verify it by attempting to construct a chain of trust from that certificate to a self\-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore. .LP +If the \f2\-trustcacerts\fP option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts". .LP -If the \f2\-trustcacerts\fP option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts". -.LP -.LP -If \f3keytool\fP fails to establish a trust path from the certificate to be imported up to a self\-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! \-\- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the \f2\-noprompt\fP option is given, however, there will be no interaction with the user. -.LP -.RE +If \f3keytool\fP fails to establish a trust path from the certificate to be imported up to a self\-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! \-\- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the \f2\-noprompt\fP option is given, however, there will be no interaction with the user. \f3Importing a Certificate Reply\fP -.RS 3 -.LP -When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the \f2\-trustcacerts\fP option was specified). .LP +When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the \f2\-trustcacerts\fP option was specified). .LP -The methods of determining whether the certificate reply is trusted are described in the following: -.LP +The methods of determining whether the certificate reply is trusted are described in the following: .RS 3 .TP 2 o @@ -817,12 +848,8 @@ o o \f3If the reply is a PKCS#7 formatted certificate chain or a sequence of X.509 certificates\fP, 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 \f2\-trustcacerts\fP option was specified, \f3keytool\fP will attempt to match it with any of the trusted certificates in the keystore or the "cacerts" keystore file. If the chain does not end with a self\-signed root CA certificate and the \f2\-trustcacerts\fP option was specified, \f3keytool\fP will try to find one from the trusted certificates in the keystore or the "cacerts" keystore file and add it to the end of the chain. If the certificate is not found and \f2\-noprompt\fP option is not specified, the information of the last certificate in the chain is printed out, and the user is prompted to verify it. .RE - .LP -.LP -If the public key in the certificate reply matches the user's public key already stored with under \f2alias\fP, the old certificate chain is replaced with the new certificate chain in the reply. The old chain can only be replaced if a valid \f2keypass\fP, 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. -.LP -.RE +If the public key in the certificate reply matches the user's public key already stored with under \f2alias\fP, the old certificate chain is replaced with the new certificate chain in the reply. The old chain can only be replaced if a valid \f2keypass\fP, 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. .LP This command was named \f2\-import\fP in previous releases. This old name is still supported in this release and will be supported in future releases, but for clarify the new name, \f2\-importcert\fP, is preferred going forward. .TP 3 @@ -842,12 +869,10 @@ Note that if \f2\-noprompt\fP is provided, the user will not be prompted for a n .LP Prints the content of a PKCS #10 format certificate request, which can be generated by the keytool \-certreq command. The command reads the request from file; if omitted, from the standard input. .RE -.RE + +.LP .SS Exporting Data -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -879,12 +904,8 @@ This command was named \f2\-export\fP in previous releases. This old name is sti .RE .LP -.RE .SS Displaying Data -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -896,25 +917,34 @@ This command by default prints the SHA1 fingerprint of a certificate. If the \f2 .LP You cannot specify both \f2\-v\fP and \f2\-rfc\fP. .TP 3 -\-printcert {\-file cert_file | \-sslserver host[:port]} {\-rfc} {\-v} {\-Jjavaoption} +\-printcert {\-file cert_file | \-sslserver host[:port]} {\-jarfile JAR_file {\-rfc} {\-v} {\-Jjavaoption} .LP +Reads the certificate from the file \f2cert_file\fP, the SSL server located at \f2host:port\fP, or the signed JAR file \f2JAR_file\fP (with the option \f2\-jarfile\fP and prints its contents in a human\-readable format. When no port is specified, the standard HTTPS port 443 is assumed. Note that \f2\-sslserver\fP and \f2\-file\fP options cannot be provided at the same time. Otherwise, an error is reported. If neither option is given, the certificate is read from stdin. .LP If \f2\-rfc\fP is specified, keytool prints the certificate in PEM mode as defined by the Internet RFC 1421 standard. .LP If the certificate is read from a file or stdin, it may be either binary encoded or in printable encoding format, as defined by the Internet RFC 1421 standard .LP -If the SSL server is behind a firewall, \f2\-J\-Dhttps.proxyHost=proxyhost\fP and \f2\-J\-Dhttps.proxyPort=proxyport\fP can be specified on the command line for proxy tunneling. See the JSSE Reference Guide for more information. +If the SSL server is behind a firewall, \f2\-J\-Dhttps.proxyHost=proxyhost\fP and \f2\-J\-Dhttps.proxyPort=proxyport\fP can be specified on the command line for proxy tunneling. See the +.na +\f2JSSE Reference Guide\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html for more information. +.LP +\f3Note\fP: This option can be used independently of a keystore. +.TP 3 +\-printcrl \-file crl_ {\-v} +.LP +Reads the certificate revocation list (CRL) from the file \f2crl_file\fP. +.LP +A Certificate Revocation List (CRL) is a list of digital certificates which have been revoked by the Certificate Authority (CA) that issued them. The CA generates \f2crl_file\fP. .LP \f3Note\fP: This option can be used independently of a keystore. .RE .LP -.RE .SS Managing the Keystore -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -940,34 +970,33 @@ Move an existing keystore entry from the specified \f2alias\fP to a new alias, \ .RE .LP -.RE .SS Getting Help -.LP -.RS 3 - .LP .RS 3 .TP 3 \-help .LP -Lists the basic commands and their options. +Lists the basic commands and their options. +.LP +For more information about a specific command, enter the following, where \f2command_name\fP is the name of the command: +.nf +\f3 +.fl + keytool \-\fP\f4command_name\fP\f3 \-help +.fl +\fP +.fi .RE .LP -.RE .SH "EXAMPLES" -.LP - .LP .LP Suppose you want to create a keystore for managing your public/private key pair and certificates from entities you trust. .LP .SS Generating Your Key Pair -.LP -.RS 3 - .LP .LP The first thing you need to do is create a keystore and generate the key pair. You could use a command such as the following: @@ -975,11 +1004,11 @@ The first thing you need to do is create a keystore and generate the key pair. Y .nf \f3 .fl - keytool \-genkeypair \-dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" + keytool \-genkeypair \-dname "cn=Mark Jones, ou=Java, o=Oracle, c=US" .fl - \-alias business \-keypass kpi135 \-keystore /working/mykeystore + \-alias business \-keypass \fP\f4<new password for private key>\fP\f3 \-keystore /working/mykeystore .fl - \-storepass ab987c \-validity 180 + \-storepass \fP\f4<new password for keystore>\fP\f3 \-validity 180 .fl \fP .fi @@ -989,10 +1018,10 @@ The first thing you need to do is create a keystore and generate the key pair. Y (Please note: This must be typed as a single line. Multiple lines are used in the examples just for legibility purposes.) .LP .LP -This command creates the keystore named "mykeystore" in the "working" directory (assuming it doesn't already exist), and assigns it the password "ab987c". It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "JavaSoft", organization of "Sun" and two\-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long. +This command creates the keystore named "mykeystore" in the "working" directory (assuming it doesn't already exist), and assigns it the password specified by \f2<new password for keystore>\fP. It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "Java", organization of "Oracle" and two\-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long. .LP .LP -It creates a self\-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password "kpi135". +It creates a self\-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password specified by \f2<new password for private key>\fP. .LP .LP The command could be significantly shorter if option defaults were accepted. As a matter of fact, no options are required; defaults are used for unspecified options that have default values, and you are prompted for any required values. Thus, you could simply have the following: @@ -1006,16 +1035,14 @@ The command could be significantly shorter if option defaults were accepted. As .fi .LP -In this case, a keystore entry with alias "mykey" is created, with a newly\-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password. .LP -The rest of the examples assume you executed the \f2\-genkeypair\fP command without options specified, and that you responded to the prompts with values equal to those given in the first \f2\-genkeypair\fP command, above (a private key password of "kpi135", etc.) +In this case, a keystore entry with alias "mykey" is created, with a newly\-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password. +.LP +.LP +The rest of the examples assume you executed the \f2\-genkeypair\fP command without options specified, and that you responded to the prompts with values equal to those given in the first \f2\-genkeypair\fP command, above (for example, a distinguished name of "cn=Mark Jones, ou=Java, o=Oracle, c=US"). .LP -.RE .SS Requesting a Signed Certificate from a Certification Authority -.LP -.RS 3 - .LP .LP So far all we've got is a self\-signed certificate. A certificate is more likely to be trusted by others if it is signed by a Certification Authority (CA). To get such a signature, you first generate a Certificate Signing Request (CSR), via the following: @@ -1028,14 +1055,12 @@ So far all we've got is a self\-signed certificate. A certificate is more likely \fP .fi +.LP .LP This creates a CSR (for the entity identified by the default alias "mykey") and puts the request in the file named "MarkJ.csr". Submit this file to a CA, such as VeriSign, Inc. The CA will authenticate you, the requestor (usually off\-line), and then will return a certificate, signed by them, authenticating your public key. (In some cases, they will actually return a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.) -.RE +.LP .SS Importing a Certificate for the CA -.LP -.RS 3 - .LP .LP You need to replace your 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. @@ -1054,7 +1079,7 @@ If the certificate reply is a single certificate, you need a certificate for the .LP .LP -The "cacerts" keystore file ships with five VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate". +The "cacerts" keystore file ships with several VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate". .LP .LP A certificate from a CA is usually either self\-signed, or signed by another CA (in which case you also need a certificate authenticating that CA's public key). Suppose company ABC, Inc., is a CA, and you obtain a file named "ABCCA.cer" that is purportedly a self\-signed certificate from ABC, authenticating that CA's public key. @@ -1073,14 +1098,12 @@ If you trust that the certificate is valid, then you can add it to your keystore \fP .fi +.LP .LP This creates a "trusted certificate" entry in the keystore, with the data from the file "ABCCA.cer", and assigns the alias "abc" to the entry. -.RE +.LP .SS Importing the Certificate Reply from the CA -.LP -.RS 3 - .LP .LP Once you've imported a certificate authenticating the public key of the CA you submitted your certificate signing request to (or there's already such a certificate in the "cacerts" file), you can import the certificate reply and thereby replace your self\-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (if the CA reply is a chain), or one constructed (if the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the "cacerts" keystore file. @@ -1095,16 +1118,14 @@ For example, suppose you sent your certificate signing request to VeriSign. You .fl \fP .fi -.RE .LP .SS Exporting a Certificate Authenticating Your Public Key .LP -.RS 3 - .LP -Suppose you have used the jarsigner(1) tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature. +Suppose you have used the jarsigner(1) tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature. +.LP .LP One way they can do this is by first importing your public key certificate into their keystore as a "trusted" entry. You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named \f2MJ.cer\fP via the following, assuming the entry is aliased by "mykey": .LP @@ -1116,14 +1137,12 @@ One way they can do this is by first importing your public key certificate into \fP .fi +.LP .LP Given that certificate, and the signed JAR file, a client can use the \f3jarsigner\fP tool to authenticate your signature. -.RE +.LP .SS Importing Keystore -.LP -.RS 3 - .LP .LP The command "importkeystore" is used to import an entire keystore into another keystore, which means all entries from the source keystore, including keys and certificates, are all imported to the destination keystore within a single command. You can use this command to import entries from a different type of 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 \f3keytool\fP has difficulties recover the private keys or secret keys from the source keystore, it will prompt you for a password. If it detects alias duplication, it will ask you for a new one, you can specify a new alias or simply allow \f3keytool\fP to overwrite the existing one. @@ -1134,128 +1153,108 @@ For example, to import entries from a normal JKS type keystore key.jks into a PK .nf \f3 .fl -keytool \-importkeystore + keytool \-importkeystore .fl \-srckeystore key.jks \-destkeystore NONE .fl \-srcstoretype JKS \-deststoretype PKCS11 .fl - \-srcstorepass changeit \-deststorepass topsecret + \-srcstorepass \fP\f4<source keystore password>\fP\f3 \-deststorepass \fP\f4<destination keystore password>\fP\f3 .fl \fP .fi .LP .LP -The importkeystore 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 see in the above example, you need to specify the alias you want to import. With the srcalias option given, you can also specify the desination alias name in the command line, as well as protection password for a secret/private key and the destination protection password you want. In this way, you can issue a \f3keytool\fP command that will never ask you a question. This makes it very convenient to include a \f3keytool\fP command into a script file, like this: +The importkeystore 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 see in the above example, you need to specify the alias you want to import. With the srcalias option given, you can also specify the destination alias name in the command line, as well as protection password for a secret/private key and the destination protection password you want. The following command demonstrates this: .LP .nf \f3 .fl -keytool \-importkeystore + keytool \-importkeystore .fl \-srckeystore key.jks \-destkeystore NONE .fl \-srcstoretype JKS \-deststoretype PKCS11 .fl - \-srcstorepass changeit \-deststorepass topsecret + \-srcstorepass \fP\f4<source keystore password>\fP\f3 \-deststorepass \fP\f4<destination keystore password>\fP\f3 .fl \-srcalias myprivatekey \-destalias myoldprivatekey .fl - \-srckeypass oldkeypass \-destkeypass mynewkeypass + \-srckeypass \fP\f4<source entry password>\fP\f3 \-destkeypass \fP\f4<destination entry password>\fP\f3 .fl \-noprompt .fl \fP .fi -.RE .LP .SS -Generating Certificates for a typical SSL Server -.LP -.RS 3 - +Generating Certificates for a Typical SSL Server .LP .LP -Keytool commands to generate keypairs and certificates for three entities, namely, Root CA (root), Intermadiate CA (ca), and SSL server (server) are as follows: +The following are keytool commands to generate keypairs and certificates for three entities, namely, Root CA (root), Intermediate CA (ca), and SSL server (server). Ensure that you store all the certificates in the same keystore. In these examples, it is recommended that you specify RSA as the key algorithm. .LP .nf \f3 .fl -keytool \-keystore root.jks \-genkeypair \-alias root \-ext bc:c +keytool \-genkeypair \-keystore root.jks \-alias root \-ext bc:c .fl -keytool \-keystore ca.jks \-alias ca +keytool \-genkeypair \-keystore ca.jks \-alias ca \-ext bc:c .fl -keytool \-keystore server.jks \-alias server +keytool \-genkeypair \-keystore server.jks \-alias server .fl - + .fl -keytool \-keystore root.jks \-alias root \-exportcert > root.pem +keytool \-keystore root.jks \-alias root \-exportcert \-rfc > root.pem .fl - + .fl -keytool \-keystore ca.jks \-certreq \-alias ca | keytool \-keystore root.jks \-gencert \-alias root \-ext BC=0 > ca.pem +keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore ca.jks \-certreq \-alias ca | keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore root.jks \-gencert \-alias root \-ext BC=0 \-rfc > ca.pem .fl keytool \-keystore ca.jks \-importcert \-alias ca \-file ca.pem .fl - + .fl -keytool \-keystore server.jks \-certreq \-alias server | keytool \-keystore ca.jks \-gencert \-alias ca \-ext ku:c=dig,kE >server.pem +keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore server.jks \-certreq \-alias server | keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore ca.jks \-gencert \-alias ca \-ext ku:c=dig,kE \-rfc > server.pem .fl cat root.pem ca.pem server.pem | keytool \-keystore server.jks \-importcert \-alias server .fl \fP .fi -.RE .LP .SH "TERMINOLOGY and WARNINGS" -.LP - .LP .SS KeyStore .LP -.RS 3 - .LP A keystore is a storage facility for cryptographic keys and certificates. -.RE +.LP .RS 3 .TP 2 o -.TP 2 -o \f3KeyStore Entries\fP -.RS 3 - .LP Keystores may have different types of entries. The two most applicable entry types for \f3keytool\fP include: .RS 3 .TP 3 1. -\f3key entries\fP \- each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. 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. The \f3keytool\fP can handle both types od entry, while \f3jarsigner\fP tool only handle the latter type of entry, that is private keys and their associated certificate chains. +\f3key entries\fP \- each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. 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. The \f3keytool\fP can handle both types of entries, while the \f3jarsigner\fP tool only handle the latter type of entry, that is private keys and their associated certificate chains. .TP 3 2. \f3trusted certificate entries\fP \- each contains a single public key certificate belonging to another party. It is called a "trusted certificate" because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the "subject" (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate. .RE - -.LP -.RE .TP 2 o \f3KeyStore Aliases\fP -.RS 3 .LP -All keystore entries (key and trusted certificate entries) are accessed via unique \f2aliases\fP. +All keystore entries (key and trusted certificate entries) are accessed via unique \f2aliases\fP. .LP +An alias is specified when you add an entity to the keystore using the \-genseckey command to generate a secret key, \-genkeypair command to generate a key pair (public and private key) or the \-importcert command to add a certificate or certificate chain to the list of trusted certificates. Subsequent \f3keytool\fP commands must use this same alias to refer to the entity. .LP -An alias is specified when you add an entity to the keystore using the \-genseckey command to generate a secret key, \-genkeypair command to generate a key pair (public and private key) or the \-importcert command to add a certificate or certificate chain to the list of trusted certificates. Subsequent \f3keytool\fP commands must use this same alias to refer to the entity. -.LP -.LP -For example, suppose you use the alias \f2duke\fP to generate a new public/private key pair and wrap the public key into a self\-signed certificate (see Certificate Chains) via the following command: -.LP +For example, suppose you use the alias \f2duke\fP to generate a new public/private key pair and wrap the public key into a self\-signed certificate (see Certificate Chains) via the following command: .nf \f3 .fl @@ -1263,9 +1262,8 @@ For example, suppose you use the alias \f2duke\fP to generate a new public/priva .fl \fP .fi - .LP -This specifies an inital password of "dukekeypasswd" required by subsequent commands to access the private key assocated with the alias \f2duke\fP. If you later want to change duke's private key password, you use a command like the following: +This specifies an initial password of "dukekeypasswd" required by subsequent commands to access the private key associated with the alias \f2duke\fP. If you later want to change duke's private key password, you use a command like the following: .nf \f3 .fl @@ -1273,49 +1271,37 @@ This specifies an inital password of "dukekeypasswd" required by subsequent comm .fl \fP .fi - .LP This changes the password from "dukekeypasswd" to "newpass". .LP -Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. -.LP -.RE +Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. .TP 2 o \f3KeyStore Implementation\fP -.RS 3 -The \f2KeyStore\fP class provided in the \f2java.security\fP 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 \f2type\fP of keystore. -.LP -Currently, two command\-line tools (\f3keytool\fP and \f3jarsigner\fP) and a GUI\-based tool named \f3Policy Tool\fP make use of keystore implementations. Since \f2KeyStore\fP is publicly available, users can write additional security applications that use it. .LP +The \f2KeyStore\fP class provided in the \f2java.security\fP 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 \f2type\fP of keystore. .LP -There is a built\-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. +Currently, two command\-line tools (\f3keytool\fP and \f3jarsigner\fP) and a GUI\-based tool named \f3Policy Tool\fP make use of keystore implementations. Since \f2KeyStore\fP is publicly available, users can write additional security applications that use it. .LP +There is a built\-in default implementation, provided by Oracle. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. .LP Keystore implementations are provider\-based. More specifically, the application interfaces supplied by \f2KeyStore\fP are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract \f2KeystoreSpi\fP class, also in the \f2java.security\fP package, which 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.) Thus, to provide a keystore implementation, clients must implement a "provider" and supply a KeystoreSpi subclass implementation, as described in .na \f2How to Implement a Provider for the Java Cryptography Architecture\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html. -.LP +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/HowToImplAProvider.html. .LP -Applications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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 itself. Keystore implementations of different types are not compatible. +Applications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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 itself. Keystore implementations of different types are not compatible. .LP +\f3keytool\fP works on any file\-based keystore implementation. (It treats the keystore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. .LP -\f3keytool\fP works on any file\-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. +For \f3keytool\fP and \f3jarsigner\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Keystore" menu. .LP +If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the \f2keystore.type\fP property specified in the security properties file. The security properties file is called \f2java.security\fP, and it resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). .LP -For \f3keytool\fP and \f3jarsigner\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Keystore" menu. -.LP -.LP -If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the \f2keystore.type\fP property specified in the security properties file. The security properties file is called \f2java.security\fP, and it resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). -.LP -.LP -Each tool gets the \f2keystore.type\fP value and then examines all the currently\-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider. -.LP -.LP -The \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that lets applications and applets retrieve the value of the \f2keystore.type\fP property. The following line of code creates an instance of the default keystore type (as specified in the \f2keystore.type\fP property): +Each tool gets the \f2keystore.type\fP value and then examines all the currently\-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider. .LP +The \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that lets applications and applets retrieve the value of the \f2keystore.type\fP property. The following line of code creates an instance of the default keystore type (as specified in the \f2keystore.type\fP property): .nf \f3 .fl @@ -1323,11 +1309,8 @@ The \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that .fl \fP .fi - -.LP -.LP -The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file: .LP +The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Oracle). This is specified by the following line in the security properties file: .nf \f3 .fl @@ -1335,14 +1318,10 @@ The default keystore type is "jks" (the proprietary type of the keystore impleme .fl \fP .fi - -.LP -.LP -To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. .LP +To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. .LP -For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to -.LP +For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to .nf \f3 .fl @@ -1350,50 +1329,45 @@ For example, if you have a provider package that supplies a keystore implementat .fl \fP .fi - .LP -Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks". -.RE +Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks". .RE + +.LP .SS Certificate .LP +A \f3certificate\fP (also known as a \f3public\-key certificate\fP) is a digitally signed statement from one entity (the \f2issuer\fP), saying that the public key (and some other information) of another entity (the \f2subject\fP) has some specific value. .RS 3 - -.LP -A \f3certificate\fP (also known as a \f3public\-key certificate\fP) is a digitally signed statement from one entity (the \f2issuer\fP), saying that the public key (and some other information) of another entity (the \f2subject\fP) has some specific value. -.RE -.RS 3 -.TP 2 -o .TP 2 o \f3Certificate Terms\fP .RS 3 - -.LP -.RS 3 .TP 3 Public Keys -These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures. +.LP +These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures. .TP 3 Digitally Signed -If some data is \f2digitally signed\fP it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key. +.LP +If some data is \f2digitally signed\fP it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key. .TP 3 Identity -A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name. +.LP +A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name. .TP 3 Signature -A signature is computed over some data using the private key of an entity (the \f2signer\fP, which in the case of a certificate is also known as the \f2issuer\fP). +.LP +A signature is computed over some data using the private key of an entity (the \f2signer\fP, which in the case of a certificate is also known as the \f2issuer\fP). .TP 3 Private Keys -These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures. +.LP +These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures. .TP 3 Entity -An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree. -.RE - .LP +An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree. +.RE .LP Basically, public key cryptography requires access to users' public keys. In a large\-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a \f2Certification Authority\fP (CA) can act as a trusted third party. CAs are entities (for example, businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates, as they are bound by legal agreements. There are many public Certification Authorities, such as .na @@ -1407,26 +1381,22 @@ http://www.thawte.com/, .na \f2Entrust\fP @ .fi -http://www.entrust.com/, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization. -.LP +http://www.entrust.com/, 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. .LP -Using \f3keytool\fP, it is possible to display, import, and export certificates. It is also possible to generate self\-signed certificates. +Using \f3keytool\fP, it is possible to display, import, and export certificates. It is also possible to generate self\-signed certificates. .LP -.LP -\f3keytool\fP currently handles X.509 certificates. -.LP -.RE +\f3keytool\fP currently handles X.509 certificates. .TP 2 o \f3X.509 Certificates\fP -.RS 3 -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 using two related standards called ASN.1/DER. \f2Abstract Syntax Notation 1\fP describes data. The \f2Definite Encoding Rules\fP describe a single way to store and transfer that data. .LP -All X.509 certificates have the following data, in addition to the signature: +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 using two related standards called ASN.1/DER. \f2Abstract Syntax Notation 1\fP describes data. The \f2Definite Encoding Rules\fP describe a single way to store and transfer that data. .LP +All X.509 certificates have the following data, in addition to the signature: .RS 3 .TP 3 Version +.LP 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. \f3keytool\fP can import and export v1, v2, and v3 certificates. It generates v3 certificates. .LP \f2X.509 Version 1\fP has been available since 1988, is widely deployed, and is the most generic. @@ -1436,475 +1406,86 @@ This identifies which version of the X.509 standard applies to this certificate, \f2X.509 Version 3\fP is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: \f2KeyUsage\fP (limits the use of the keys to particular purposes such as "signing\-only") and \f2AlternativeNames\fP (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked \f2critical\fP to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use. .TP 3 Serial Number -The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL). +.LP +The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL). .TP 3 Signature Algorithm Identifier -This identifies the algorithm used by the CA to sign the certificate. +.LP +This identifies the algorithm used by the CA to sign the certificate. .TP 3 Issuer Name -The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as \f2root or top\-level\fP CA certificates, the issuer signs its own certificate.) +.LP +The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as \f2root or top\-level\fP CA certificates, the issuer signs its own certificate.) .TP 3 Validity Period -Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised. +.LP +Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised. .TP 3 Subject Name +.LP The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity, for example, .nf \f3 .fl - CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US + CN=Java Duke, OU=Java Software Division, O=Oracle Corporation, C=US .fl \fP .fi -(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.) +.LP +(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.) .TP 3 Subject Public Key Information -This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters. -.RE - .LP +This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters. .RE .TP 2 o \f3Certificate Chains\fP -.RS 3 -.LP -\f3keytool\fP 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 corresponding to the private key. -.LP -.LP -When keys are first generated (see the \-genkeypair command), the chain starts off containing a single element, a \f2self\-signed certificate\fP. A self\-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the \f2\-genkeypair\fP command is called to generate a new public/private key pair, it also wraps the public key into a self\-signed certificate. -.LP .LP -Later, after a Certificate Signing Request (CSR) has been generated (see the \-certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see \-importcert), 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's public key. The next certificate in the chain is one that authenticates the \f2CA\fP's public key. +\f3keytool\fP 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 corresponding to the private key. .LP +When keys are first generated (see the \-genkeypair command), the chain starts off containing a single element, a \f2self\-signed certificate\fP. A self\-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the \f2\-genkeypair\fP command is called to generate a new public/private key pair, it also wraps the public key into a self\-signed certificate. .LP -In many cases, this is a self\-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may 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 entry), but the second certificate in the chain is a certificate signed by a \f2different\fP CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self\-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain. +Later, after a Certificate Signing Request (CSR) has been generated (see the \-certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see \-importcert), 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's public key. The next certificate in the chain is one that authenticates the \f2CA\fP's public key. .LP +In many cases, this is a self\-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may 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 entry), but the second certificate in the chain is a certificate signed by a \f2different\fP CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self\-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain. .LP -Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore. +Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore. .LP +A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by \f3keytool\fP. .LP -A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by \f3keytool\fP. -.LP -.LP -The top\-level (root) CA certificate is self\-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self\-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. 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's public key. Before you add the root CA certificate to your keystore, you should view it (using the \f2\-printcert\fP option) and compare the displayed fingerprint with the well\-known fingerprint (obtained from a newspaper, the root CA's webpage, etc.). -.LP -.RE +The top\-level (root) CA certificate is self\-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self\-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. 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's public key. Before you add the root CA certificate to your keystore, you should view it (using the \f2\-printcert\fP option) and compare the displayed fingerprint with the well\-known fingerprint (obtained from a newspaper, the root CA's Web page, etc.). .TP 2 o \f3The cacerts Certificates File\fP -.RS 3 -.LP -A certificates file named \f3"cacerts"\fP resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). .LP +A certificates file named \f3"cacerts"\fP resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). .LP -The "cacerts" file represents a system\-wide keystore with CA certificates. System administrators can configure and manage that file using \f3keytool\fP, specifying "jks" as the keystore type. The "cacerts" keystore file ships with several root CA certificates with the following aliases and X.500 owner distinguished names: -.LP -.RS 3 -.TP 2 -* -\f3Alias\fP: thawtepersonalfreemailca -.br -\f3Owner DN\fP: EmailAddress=personal\-freemail@thawte.com, -.br -CN=Thawte Personal Freemail CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawtepersonalbasicca -.br -\f3Owner DN\fP: EmailAddress=personal\-basic@thawte.com, -.br -CN=Thawte Personal Basic CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawtepersonalpremiumca -.br -\f3Owner DN\fP: EmailAddress=personal\-premium@thawte.com, -.br -CN=Thawte Personal Premium CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawteserverca -.br -\f3Owner DN\fP: EmailAddress=server\-certs@thawte.com, -.br -CN=Thawte Server CA, OU=Certification Services Division, -.br -O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawtepremiumserverca -.br -\f3Owner DN\fP: EmailAddress=premium\-server@thawte.com, -.br -CN=Thawte Premium Server CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: verisignclass1ca -.br -\f3Owner DN\fP: OU=Class 1 Public Primary Certification Authority, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass2ca -.br -\f3Owner DN\fP: OU=Class 2 Public Primary Certification Authority, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass3ca -.br -\f3Owner DN\fP: OU=Class 3 Public Primary Certification Authority, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignserverca -.br -\f3Owner DN\fP: OU=Secure Server Certification Authority, -.br -O="RSA Data Security, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass1g2ca -.br -\f3Owner DN\fP: OU=VeriSign Trust Network, -.br -OU="(c) 1998 VeriSign, Inc. \- For authorized use only", -.br -OU=Class 1 Public Primary Certification Authority \- G2, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass1g3ca -.br -\f3Owner DN\fP: CN=VeriSign Class 1 Public Primary Certification Authority \- G3, OU="(c) 1999 VeriSign, Inc. \- For authorized use only", -.br -OU=VeriSign Trust Network, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass2g2ca -.br -\f3Owner DN\fP: OU=VeriSign Trust Network, -.br -OU="(c) 1998 VeriSign, Inc. \- For authorized use only", -.br -OU=Class 2 Public Primary Certification Authority \- G2, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass2g3ca -.br -\f3Owner DN\fP: CN=VeriSign Class 2 Public Primary Certification Authority \- G3, -.br -OU="(c) 1999 VeriSign, Inc. \- For authorized use only", -.br -OU=VeriSign Trust Network, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass3g2ca -.br -\f3Owner DN\fP: OU=VeriSign Trust Network, -.br -OU="(c) 1998 VeriSign, Inc. \- For authorized use only", -.br -OU=Class 3 Public Primary Certification Authority \- G2, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass3g3ca -.br -\f3Owner DN\fP: CN=VeriSign Class 3 Public Primary Certification Authority \- G3, -.br -OU="(c) 1999 VeriSign, Inc. \- For authorized use only", -.br -OU=VeriSign Trust Network, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: baltimorecodesigningca -.br -\f3Owner DN\fP: CN=Baltimore CyberTrust Code Signing Root, -.br -OU=CyberTrust, O=Baltimore, C=IE -.TP 2 -* -\f3Alias\fP: gtecybertrustglobalca -.br -\f3Owner DN\fP: CN=GTE CyberTrust Global Root, -.br -OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US -.TP 2 -* -\f3Alias\fP: baltimorecybertrustca -.br -\f3Owner DN\fP: CN=Baltimore CyberTrust Root, -.br -OU=CyberTrust, O=Baltimore, C=IE -.TP 2 -* -\f3Alias\fP: gtecybertrust5ca -.br -\f3Owner DN\fP: CN=GTE CyberTrust Root 5, -.br -OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US -.TP 2 -* -\f3Alias\fP: entrustclientca -.br -\f3Owner DN\fP: CN=Entrust.net Client Certification Authority, -.br -OU=(c) 1999 Entrust.net Limited, -.br -OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., -.br -O=Entrust.net, C=US -.TP 2 -* -\f3Alias\fP: entrustglobalclientca -.br -\f3Owner DN\fP: CN=Entrust.net Client Certification Authority, -.br -OU=(c) 2000 Entrust.net Limited, -.br -OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), -.br -O=Entrust.net -.TP 2 -* -\f3Alias\fP: entrust2048ca -.br -\f3Owner DN\fP: CN=Entrust.net Certification Authority (2048), -.br -OU=(c) 1999 Entrust.net Limited, -.br -OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), -.br -O=Entrust.net -.TP 2 -* -\f3Alias\fP: entrustsslca -.br -\f3Owner DN\fP: CN=Entrust.net Secure Server Certification Authority, -.br -OU=(c) 1999 Entrust.net Limited, -.br -OU=www.entrust.net/CPS incorp. by ref. (limits liab.), -.br -O=Entrust.net, C=US -.TP 2 -* -\f3Alias\fP: entrustgsslca -.br -\f3Owner DN\fP: CN=Entrust.net Secure Server Certification Authority, -.br -OU=(c) 2000 Entrust.net Limited, -.br -OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), -.br -O=Entrust.net -.TP 2 -* -\f3Alias\fP: godaddyclass2ca -.br -\f3Owner DN\fP: OU=Go Daddy Class 2 Certification Authority, -.br -O="The Go Daddy Group, Inc.", C=US -.TP 2 -* -\f3Alias\fP: starfieldclass2ca -.br -\f3Owner DN\fP: OU=Starfield Class 2 Certification Authority, -.br -O="Starfield Technologies, Inc.", C=US -.TP 2 -* -\f3Alias\fP: valicertclass2ca -.br -\f3Owner DN\fP: EMAILADDRESS=info@valicert.com, -.br -CN=http://www.valicert.com/, -.br -OU=ValiCert Class 2 Policy Validation Authority, -.br -O="ValiCert, Inc.", L=ValiCert Validation Network -.TP 2 -* -\f3Alias\fP: geotrustglobalca -.br -\f3Owner DN\fP: CN=GeoTrust Global CA, -.br -O=GeoTrust Inc., C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureca -.br -\f3Owner DN\fP: OU=Equifax Secure Certificate Authority, -.br -O=Equifax, C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureebusinessca1 -.br -\f3Owner DN\fP: CN=Equifax Secure eBusiness CA\-1, -.br -O=Equifax Secure Inc., C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureebusinessca2 -.br -\f3Owner DN\fP: OU=Equifax Secure eBusiness CA\-2, -.br -O=Equifax Secure, C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureglobalebusinessca1 -.br -\f3Owner DN\fP: CN=Equifax Secure Global eBusiness CA\-1, -.br -O=Equifax Secure Inc., C=US -.TP 2 -* -\f3Alias\fP: soneraclass1ca -.br -\f3Owner DN\fP: CN=Sonera Class1 CA, O=Sonera, C=FI -.TP 2 -* -\f3Alias\fP: soneraclass2ca -.br -\f3Owner DN\fP: CN=Sonera Class2 CA, O=Sonera, C=FI -.TP 2 -* -\f3Alias\fP: comodoaaaca -.br -\f3Owner DN\fP: CN=AAA Certificate Services, -.br -O=Comodo CA Limited, L=Salford, ST=Greater Manchester, C=GB -.TP 2 -* -\f3Alias\fP: addtrustclass1ca -.br -\f3Owner DN\fP: CN=AddTrust Class 1 CA Root, -.br -OU=AddTrust TTP Network, O=AddTrust AB, C=SE -.TP 2 -* -\f3Alias\fP: addtrustexternalca -.br -\f3Owner DN\fP: CN=AddTrust External CA Root, -.br -OU=AddTrust External TTP Network, O=AddTrust AB, C=SE -.TP 2 -* -\f3Alias\fP: addtrustqualifiedca -.br -\f3Owner DN\fP: CN=AddTrust Qualified CA Root, -.br -OU=AddTrust TTP Network, O=AddTrust AB, C=SE -.TP 2 -* -\f3Alias\fP: utnuserfirsthardwareca -.br -\f3Owner DN\fP: CN=UTN\-USERFirst\-Hardware, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.TP 2 -* -\f3Alias\fP: utnuserfirstclientauthemailca -.br -\f3Owner DN\fP: CN=UTN\-USERFirst\-Client Authentication and Email, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.TP 2 -* -\f3Alias\fP: utndatacorpsgcca -.br -\f3Owner DN\fP: CN=UTN \- DATACorp SGC, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.TP 2 -* -\f3Alias\fP: utnuserfirstobjectca -.br -\f3Owner DN\fP: CN=UTN\-USERFirst\-Object, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.RE - -.LP -.LP -The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the SDK. -.LP -.RS 3 - -.LP - -.LP -\f3IMPORTANT: Verify Your \fP\f4cacerts\fP\f3 File\fP -.br - -.LP -Since you trust the CAs in the \f2cacerts\fP file as entities for signing and issuing certificates to other entities, you must manage the \f2cacerts\fP file carefully. The \f2cacerts\fP file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the \f2cacerts\fP file and make your own trust decisions. To remove an untrusted CA certificate from the \f2cacerts\fP file, use the delete option of the \f2keytool\fP command. You can find the \f2cacerts\fP file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file. -.br - +The "cacerts" file represents a system\-wide keystore with CA certificates. System administrators can configure and manage that file using \f3keytool\fP, specifying "jks" as the keystore type. The "cacerts" keystore file ships with a default set of root CA certificates; list them with the following command: +.nf +\f3 +.fl +keytool \-list \-keystore \fP\f4java.home\fP\f3/lib/security/cacerts +.fl +\fP +.fi .LP -.RE - +The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the SDK. .LP -.RE +\f3IMPORTANT: Verify Your \fP\f4cacerts\fP\f3 File\fP: Since you trust the CAs in the \f2cacerts\fP file as entities for signing and issuing certificates to other entities, you must manage the \f2cacerts\fP file carefully. The \f2cacerts\fP file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the \f2cacerts\fP file and make your own trust decisions. To remove an untrusted CA certificate from the \f2cacerts\fP file, use the delete option of the \f2keytool\fP command. You can find the \f2cacerts\fP file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file. .TP 2 o \f3The Internet RFC 1421 Certificate Encoding Standard\fP -.RS 3 -.LP -Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism. -.LP -.LP -Certificates read by the \f2\-importcert\fP and \f2\-printcert\fP commands can be in either this format or binary encoded. -.LP -.LP -The \f2\-exportcert\fP command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the \f2\-rfc\fP option is specified. .LP +Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism. .LP -The \f2\-list\fP command by default prints the SHA1 fingerprint of a certificate. If the \f2\-v\fP option is specified, the certificate is printed in human\-readable format, while if the \f2\-rfc\fP option is specified, the certificate is output in the printable encoding format. +Certificates read by the \f2\-importcert\fP and \f2\-printcert\fP commands can be in either this format or binary encoded. .LP +The \f2\-exportcert\fP command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the \f2\-rfc\fP option is specified. .LP -In its printable encoding format, the encoded certificate is bounded at the beginning by +The \f2\-list\fP command by default prints the SHA1 fingerprint of a certificate. If the \f2\-v\fP option is specified, the certificate is printed in human\-readable format, while if the \f2\-rfc\fP option is specified, the certificate is output in the printable encoding format. .LP +In its printable encoding format, the encoded certificate is bounded at the beginning by .nf \f3 .fl @@ -1912,11 +1493,8 @@ In its printable encoding format, the encoded certificate is bounded at the begi .fl \fP .fi - -.LP -.LP -and at the end by .LP +and at the end by .nf \f3 .fl @@ -1925,23 +1503,21 @@ and at the end by \fP .fi .RE -.RE .LP .SS X.500 Distinguished Names .LP -.RS 3 - .LP -X.500 Distinguished Names are used to identify entities, such as those which are named by the \f2subject\fP and \f2issuer\fP (signer) fields of X.509 certificates. \f3keytool\fP supports the following subparts: +X.500 Distinguished Names are used to identify entities, such as those which are named by the \f2subject\fP and \f2issuer\fP (signer) fields of X.509 certificates. \f3keytool\fP supports the following subparts: +.LP .RS 3 .TP 2 o \f2commonName\fP \- common name of a person, e.g., "Susan Jones" .TP 2 o -\f2organizationUnit\fP \- small organization (e.g, department or division) name, e.g., "Purchasing" +\f2organizationUnit\fP \- small organization (e.g., department or division) name, e.g., "Purchasing" .TP 2 o \f2organizationName\fP \- large organization name, e.g., "ABCSystems, Inc." @@ -1975,7 +1551,7 @@ where all the italicized items represent actual values and the above keywords ar .nf \f3 .fl - CN=commonName + CN=commonName .fl OU=organizationUnit .fl @@ -1997,17 +1573,19 @@ A sample distinguished name string is .nf \f3 .fl -CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US +CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US .fl \fP .fi .LP -and a sample command using such a string is +.LP +and a sample command using such a string is +.LP .nf \f3 .fl -keytool \-genkeypair \-dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, +keytool \-genkeypair \-dname "CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, .fl S=California, C=US" \-alias mark .fl @@ -2024,7 +1602,7 @@ Order matters; each subcomponent must appear in the designated order. However, i .nf \f3 .fl -CN=Steve Meier, OU=SunSoft, O=Sun, C=US +CN=Steve Meier, OU=Java, O=Oracle, C=US .fl \fP .fi @@ -2036,7 +1614,7 @@ If a distinguished name string value contains a comma, the comma must be escaped .nf \f3 .fl - cn=peter schuster, o=Sun Microsystems\\, Inc., o=sun, c=us + cn=Peter Schuster, ou=Java\\, Product Development, o=Oracle, c=US .fl \fP .fi @@ -2045,14 +1623,12 @@ If a distinguished name string value contains a comma, the comma must be escaped .LP It is never necessary to specify a distinguished name string on a command line. If it 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 does not need to be escaped by a "\\". .LP -.RE .SS WARNING Regarding Importing Trusted Certificates .LP -.RS 3 - .LP -IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate! +IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate! +.LP .LP View it first (using the \f2\-printcert\fP command, or the \f2\-importcert\fP command without the \f2\-noprompt\fP option), and make sure that the displayed certificate fingerprint(s) match the expected ones. For example, suppose someone sends or emails you a certificate, and you put it in a file named \f2/tmp/cert\fP. Before you consider adding the certificate to your list of trusted certificates, you can execute a \f2\-printcert\fP command to view its fingerprints, as in .LP @@ -2083,16 +1659,14 @@ View it first (using the \f2\-printcert\fP command, or the \f2\-importcert\fP co .fi .LP -Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside). +.LP +Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside). +.LP .LP Note: it is not required that you execute a \f2\-printcert\fP command prior to importing a certificate, since before adding a certificate to the list of trusted certificates in the keystore, the \f2\-importcert\fP command prints out the certificate information and prompts you to verify it. You then have the option of aborting the import operation. Note, however, this is only the case if you invoke the \f2\-importcert\fP command without the \f2\-noprompt\fP option. If the \f2\-noprompt\fP option is given, there is no interaction with the user. .LP -.RE .SS Warning Regarding Passwords -.LP -.RS 3 - .LP .LP Most commands operating on a keystore require the store password. Some commands require a private/secret key password. @@ -2103,12 +1677,8 @@ Passwords can be specified on the command line (in the \f2\-storepass\fP and \f2 .LP If you don't specify a required password option on a command line, you will be prompted for it. .LP -.RE .SS Warning Regarding Certificate Conformance -.LP -.RS 3 - .LP .LP The Internet standard @@ -2117,38 +1687,30 @@ The Internet standard .fi http://tools.ietf.org/rfc/rfc5280.txt has defined a profile on conforming X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. \f3keytool\fP has not enforced all these rules so it can generate certificates which do not conform to the standard, and these certificates might be rejected by JRE or other applications. Users should make sure that they provide the correct options for \f2\-dname\fP, \f2\-ext\fP, etc. .LP -.RE .SH "SEE ALSO" -.LP - .LP .RS 3 .TP 2 o -.LP -jar(1) tool documentation +jar(1) tool documentation .TP 2 o -.LP -jarsigner(1) tool documentation +jarsigner(1) tool documentation .TP 2 o -.LP the .na \f4Security\fP @ .fi -http://java.sun.com/docs/books/tutorial/security/index.html trail of the +http://download.oracle.com/javase/tutorial/security/index.html trail of the .na \f4Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial for examples of the use of \f3keytool\fP +http://download.oracle.com/javase/tutorial/ for examples of the use of \f3keytool\fP .RE .LP .SH "CHANGES" -.LP - .LP .LP The command interface for keytool changed in Java SE 6. @@ -2184,19 +1746,19 @@ o .na \f2\-keyclone\fP @ .fi -http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#keycloneCmd +http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#keycloneCmd .TP 2 o .na \f2\-identitydb\fP @ .fi -http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#identitydbCmd +http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#identitydbCmd .TP 2 o .na \f2\-selfcert\fP @ .fi -http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#selfcertCmd +http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#selfcertCmd .RE .LP diff --git a/src/linux/doc/man/native2ascii.1 b/src/linux/doc/man/native2ascii.1 index f455eaf01f308bb7304838c73eb21224370169a2..54beff1d0ab83ce5e7664b151377b5728f191d8e 100644 --- a/src/linux/doc/man/native2ascii.1 +++ b/src/linux/doc/man/native2ascii.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH native2ascii 1 "02 Jun 2010" +.TH native2ascii 1 "10 May 2011" .LP .SH "Name" native2ascii \- Native\-to\-ASCII Converter -.LP -.RS 3 - .LP .LP -Converts a file with native\-encoded characters (characters which are non\-Latin 1 and non\-Unicode) to one with Unicode\-encoded characters. +Converts a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes, or visa versa. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -45,32 +39,30 @@ Converts a file with native\-encoded characters (characters which are non\-Latin .LP .SH "DESCRIPTION" -.LP - .LP .LP -The Java compiler and other Java tools can only process files which contain Latin\-1 and/or Unicode\-encoded (\\udddd notation) characters. \f2native2ascii\fP converts files which contain other character encodings into files containing Latin\-1 and/or Unicode\-encoded charaters. +\f2native2ascii\fP converts files that are encoded to any character encoding that is supported by the Java runtime environment to files encoded in ASCII, using Unicode escapes ("\\uxxxx" notation) for all characters that are not part of the ASCII character set. This process is required for properties files containing characters not in ISO\-8859\-1 character sets. The tool can also perform the reverse conversion. .LP .LP If \f2outputfile\fP is omitted, standard output is used for output. If, in addition, \f2inputfile\fP is omitted, standard input is used for input. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 \-reverse -Perform the reverse operation: convert a file with Latin\-1 and/or Unicode encoded characters to one with native\-encoded characters. +Perform the reverse operation: Convert a file encoded in ISO\-8859\-1 with Unicode escapes to a file in any character encoding supported by the Java runtime environment. .br .br .TP 3 \-encoding encoding_name -Specify the encoding name which is used by the conversion procedure. The default encoding is taken from System property \f2file.encoding\fP. The \f2encoding_name\fP string must be taken from the first column of the table of supported encodings in the +Specifies the name of the character encoding to be used by the conversion procedure. If this option is not present, the default character encoding (as determined by the \f2java.nio.charset.Charset.defaultCharset\fP method) is used. The \f2encoding_name\fP string must be the name of a character encoding that is supported by the Java runtime environment \- see the .na \f4Supported Encodings\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html document. +http://download.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html document. +.br +.br .TP 3 \-Joption Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. diff --git a/src/linux/doc/man/orbd.1 b/src/linux/doc/man/orbd.1 index 0c2b5bbbe3060a07b182eef334c5df9c3989ac1c..108ad9e1ce2eede9c9c400a360f4da697490c84d 100644 --- a/src/linux/doc/man/orbd.1 +++ b/src/linux/doc/man/orbd.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,14 +19,11 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH orbd 1 "02 Jun 2010" +.TH orbd 1 "10 May 2011" .LP .SH "Name" orbd \- The Object Request Broker Daemon -.LP -.RS 3 - .LP .LP \f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. @@ -36,12 +33,9 @@ orbd \- The Object Request Broker Daemon .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -53,8 +47,6 @@ orbd <\fP\f3options\fP\f3> .LP .SH "DESCRIPTION" -.LP - .LP .LP The Server Manager included with the \f3orbd\fP tool is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. The persistent servers, while publishing the persistent object references in the Naming Service, include the port number of the ORBD in the object reference instead of the port number of the Server. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages: @@ -77,7 +69,7 @@ When \f2orbd\fP starts up, it also starts a naming service. For more information .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html. .LP .SH "OPTIONS" .LP @@ -141,11 +133,11 @@ A Naming Service is a CORBA service that allows .na \f2CORBA objects\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The .na \f2name binding\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. .LP .LP Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service. @@ -224,7 +216,7 @@ For more information on the Naming Service included with ORBD, see .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html. .LP .SH "Server Manager" .LP @@ -239,7 +231,7 @@ Using the .na \f2sample tutorial\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application: +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application: .LP .LP Start \f2orbd\fP. @@ -362,7 +354,7 @@ o .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html .br .TP 2 o diff --git a/src/linux/doc/man/pack200.1 b/src/linux/doc/man/pack200.1 index 299a96f5a22b5d986c889ee558793f1cfe172c22..8f34d6dd51a51982d962dded9a7e98a9c4bd173f 100644 --- a/src/linux/doc/man/pack200.1 +++ b/src/linux/doc/man/pack200.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,24 +19,19 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH pack200 1 "02 Jun 2010" +.TH pack200 1 "10 May 2011" .LP .SH "Name" pack200 \- JAR Packing tool .LP .SH "SYNOPSIS" -.LP - .LP .LP \f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP .LP .LP Options may be in any order. The last option on the command line or in a properties file supersedes all previously specified options. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -51,10 +46,7 @@ Name of the input file. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The \f2pack200\fP tool is a Java application that transforms a JAR file into a compressed \f2pack200\fP file using the Java \f2gzip\fP compressor. The \f2pack200\fP files are highly compressed files that can be directly deployed, saving bandwidth and reducing download time. @@ -64,32 +56,20 @@ The \f2pack200\fP tool uses several options to fine\-tune and set the compressio .LP .SS Typical usage: -.LP -.RS 3 - .LP .LP \f2% pack200 myarchive.pack.gz myarchive.jar\fP .LP -.RE .LP In this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings. .LP .SH "OPTIONS" -.LP - .LP .LP \f4\-r \-\-repack\fP -.LP -.RS 3 - .LP .LP Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. The resulting file can be used as an input to the \f2jarsigner(1)\fP tool. -.LP -.RS 3 - .LP .LP \f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP @@ -97,50 +77,35 @@ Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. Th .LP \f2% pack200 \-\-repack myarchive.jar\fP .LP -.RE -.RE .LP \f4\-g \-\-no\-gzip\fP -.LP -.RS 3 - .LP .LP Produces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser. -.LP -.RS 3 - .LP .LP \f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP .LP -.RE -.RE .LP \f4\-G \-\-strip\-debug\fP -.LP -.RS 3 - .LP .LP Strips attributes used for debugging from the output. These include \f2SourceFile\fP, \f2LineNumberTable\fP, \f2LocalVariableTable\fP and \f2LocalVariableTypeTable\fP. Removing these attributes reduces the size of both downloads and installations but reduces the usefulness of debuggers. .LP -.RE .LP -\f4\-O \-\-no\-keep\-file\-order\fP +\f4\-\-keep\-file\-order\fP .LP -.RS 3 - +.LP +Preserve the order of files in the input file; this is the default behavior. +.LP +.LP +\f4\-O \-\-no\-keep\-file\-order\fP .LP .LP The packer will reorder and transmit all elements. Additionally, the packer may remove JAR directory names. This will reduce the download size; however, certain JAR file optimizations, such as indexing, may not work correctly. .LP -.RE .LP \f4\-Svalue \-\-segment\-limit=\fP\f2value\fP -.LP -.RS 3 - .LP .LP The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires @@ -151,17 +116,13 @@ more than N bytes, it will be given its own archive segment. As a special case, The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties. .LP .LP -The default is \f21000000\fP (a million bytes). This allows input JAR files of moderate size to be transmitted in one segment. It also puts a limit on memory requirements for packers and unpackers. +The default is \-1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs. .LP .LP A 10MB JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit). .LP -.RE .LP \f4\-Evalue \-\-effort=\fP\f2value\fP -.LP -.RS 3 - .LP .LP If the value is set to a single decimal digit, the packer will use the indicated amount of effort in compressing the archive. Level \f21\fP may produce somewhat larger size and faster compression speed, while level \f29\fP will take much longer but may produce better compression. The special value \f20\fP instructs the packer to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass\-through of the entire archive. @@ -169,12 +130,8 @@ If the value is set to a single decimal digit, the packer will use the indicated .LP The default is \f25\fP, investing a modest amount of time to produce reasonable compression. .LP -.RE .LP \f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP -.LP -.RS 3 - .LP .LP Overrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are: @@ -195,12 +152,8 @@ Preserve deflation hints observed in the input JAR. (This is the default.) .RE .LP -.RE .LP \f4\-mvalue \-\-modification\-time=\fP\f2value\fP -.LP -.RS 3 - .LP .LP The possible values are: @@ -215,22 +168,14 @@ Preserves modification times observed in the input JAR. (This is the default.) .RE .LP -.RE .LP \f4\-Pfile \-\-pass\-file=\fP\f2file\fP -.LP -.RS 3 - .LP .LP Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files may be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator "\f2/\fP". The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, all files under that directory will be passed. .LP -.RE .LP \f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP -.LP -.RS 3 - .LP .LP Overrides the default behavior; i.e., the classfile containing the unknown attribute will be passed through with the specified action. The possible values for actions are: @@ -248,7 +193,6 @@ Upon encountering this attribute, the entire class will be transmitted as though .RE .LP -.RE .LP \f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP .br @@ -257,9 +201,6 @@ Upon encountering this attribute, the entire class will be transmitted as though \f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP .br \f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP -.LP -.RS 3 - .LP .LP With the above four options, the attribute layout can be specified for a class entity, such as Class attribute, Field attribute, Method attribute, and Code attribute. The attribute\-name is the name of the attribute for which the layout or action is being defined. The possible values for action are: @@ -282,18 +223,11 @@ Upon encountering this attribute, the attribute will be removed from the output. .LP Example: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing this attribute to be passed through without further action by the packer. .LP -.RE .LP \f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP -.LP -.RS 3 - .LP .LP A configuration file, containing Java properties to initialize the packer, may be specified on the command line. -.LP -.RS 3 - .LP .LP \f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP @@ -317,62 +251,47 @@ A configuration file, containing Java properties to initialize the packer, may b \f2# Change the segment limit to be unlimited.\fP .br \f2segment.limit=\-1\fP -.LP -.RE -.RE -.RS 3 - .LP .LP \f4\-v \-\-verbose\fP -.LP -.RS 3 - .LP .LP Outputs minimal messages. Multiple specification of this option will output more verbose messages. .LP -.RE .LP \f4\-q \-\-quiet\fP -.LP -.RS 3 - .LP .LP Specifies quiet operation with no messages. .LP -.RE .LP \f4\-lfilename \-\-log\-file=\fP\f2filename\fP -.LP -.RS 3 - .LP .LP Specifies a log file to output messages. .LP -.RE .LP -\f4\-Joption\fP +\f4\-? \-h \-\-help\fP .LP -.RS 3 - .LP +Prints help information about this command. .LP -Passes option to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java. .LP -.RE -.RE -.SH "EXIT STATUS" +\f4\-V \-\-version\fP .LP - .LP +Prints version information about this command. .LP -The following exit values are returned: .LP -.RS 3 - +\f4\-J\fP\f2option\fP +.LP +.LP +Passes \f2option\fP to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java. +.LP +.SH "EXIT STATUS" +.LP +.LP +The following exit values are returned: .LP .LP \f2\ 0\fP for successful completion; @@ -380,7 +299,6 @@ The following exit values are returned: .LP \f2>0\fP if an error occurs. .LP -.RE .SH "SEE ALSO" .LP .RS 3 @@ -392,13 +310,13 @@ o .na \f2Java SE Documentation\fP @ .fi -http://java.sun.com/javase/6/docs/index.html +http://download.oracle.com/javase/7/docs/index.html .TP 2 o .na \f2Java Deployment Guide \- Pack200\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/pack200.html +http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html .TP 2 o jar(1) \- Java Archive Tool @@ -412,8 +330,6 @@ o .LP .SH "NOTES" -.LP - .LP .LP This command should not be confused with \f2pack(1)\fP. They are distinctly separate products. diff --git a/src/linux/doc/man/policytool.1 b/src/linux/doc/man/policytool.1 index 5d339637f3977b030600614120dab4a21f6482e6..8fd33bcdbf427c324934bfe34f3e4aa62546a68c 100644 --- a/src/linux/doc/man/policytool.1 +++ b/src/linux/doc/man/policytool.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH policytool 1 "02 Jun 2010" +.TH policytool 1 "10 May 2011" .LP .SH "Name" @@ -27,8 +27,6 @@ policytool \- PolicyTool Administration GUI Utility .LP \f3policytool\fP reads and writes a plain text policy file based on user input via the utility GUI. .SH "SYNOPSIS" -.LP - .LP .RS 3 .TP 3 @@ -57,7 +55,7 @@ The file name .na \f2the Policytool Users Guide\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyGuide.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html. .SH "OPTIONS" .RS 3 .TP 3 @@ -67,22 +65,22 @@ Loads \f2filename\fP. .na \f2Default Policy Implementation and Syntax\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html .br .na \f2Policy Tool Users' Guide\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyGuide.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html .br .na \f2Security Permissions\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/permissions.html .br .na \f2Security Overview\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/overview/jsoverview.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html .br .RE .RE diff --git a/src/linux/doc/man/rmic.1 b/src/linux/doc/man/rmic.1 index ffe0b1c04fcdbcf013bf6d7afd89ee06bfeb20a9..95f166206f2506fe8ba158533c6d3a29da30a9ea 100644 --- a/src/linux/doc/man/rmic.1 +++ b/src/linux/doc/man/rmic.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH rmic 1 "02 Jun 2010" +.TH rmic 1 "10 May 2011" .LP .SH "Name" rmic \- The Java RMI Compiler -.LP -.RS 3 - .LP .LP \f3rmic\fP generates stub, skeleton, and tie classes for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,8 +40,6 @@ rmic [ \fP\f3options\fP\f3 ] \fP\f4package\-qualified\-class\-name(s)\fP\f3 .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3rmic\fP compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface \f2java.rmi.Remote\fP. The class names in the \f3rmic\fP command must be for classes that have been compiled successfully with the \f3javac\fP command and must be fully package qualified. For example, running \f3rmic\fP on the class file name \f2HelloImpl\fP as shown here: @@ -80,8 +72,6 @@ By default, \f3rmic\fP generates stub classes that use the 1.2 JRMP stub protoco A stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built\-in operators for casting and type checking. For IIOP, the \f2PortableRemoteObject.narrow\fP method must be used. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -90,9 +80,6 @@ Overrides location of bootstrap class files .TP 3 \-classpath path Specifies the path \f3rmic\fP uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is: -.RS 3 - -.LP .nf \f3 .fl @@ -100,11 +87,7 @@ Specifies the path \f3rmic\fP uses to look up classes. This option overrides the .fl \fP .fi -.RE For example: -.RS 3 - -.LP .nf \f3 .fl @@ -112,13 +95,9 @@ For example: .fl \fP .fi -.RE .TP 3 \-d directory Specifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the command -.RS 3 - -.LP .nf \f3 .fl @@ -126,7 +105,6 @@ Specifies the root destination directory for the generated class hierarchy. You .fl \fP .fi -.RE would place the stub and skeleton classes derived from \f2MyClass\fP into the directory \f2/java/classes/foo\fP. If the \f2\-d\fP option is not specified, the default behavior is as if \f2"\-d\ ."\fP were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. (Note that in some previous versions of \f3rmic\fP, if \f2\-d\fP was not specified, then the package hierarchy was \f2not\fP created, and all of the output files were placed directly in the current directory.) .br \ @@ -136,16 +114,16 @@ Overrides location of installed extensions .TP 3 \-g Enables generation of all debugging information, including local variables. By default, only line number information is generated. -.LP .TP 3 \-idl Causes \f2rmic\fP to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language\-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the .na \f2Java Language to IDL Mapping\fP @ .fi -http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description. -.LP -When the \f2\-idl\fP option is used, other options also include: +http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description. +.br +.br +When the \f2\-idl\fP option is used, other options also include: .RS 3 .TP 3 \-always or \-alwaysgenerate @@ -160,31 +138,22 @@ Specifies IDLEntity package mapping. For example:\ \f2\-idlModule foo.bar my::r \-idlFile\ fromJavaPackage[.class]\ toIDLFile Specifies IDLEntity file mapping. For example:\ \f2\-idlFile test.pkg.X TEST16.idl\fP.\ .RE -.LP .TP 3 \-iiop -Causes \f2rmic\fP to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class. -.LP +Causes \f2rmic\fP to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class. +.br +.br Invoking \f2rmic\fP with the \f2\-iiop\fP generates stubs and ties that conform to this naming convention: -.RS 3 - -.LP .nf \f3 .fl _<implementationName>_stub.class .fl -\fP -.br -\f3 -.fl _<interfaceName>_tie.class .fl \fP .fi -.RE -.LP -When the \f2\-iiop\fP option is used, other options also include: +When the \f2\-iiop\fP option is used, other options also include: .RS 3 .TP 3 \-always or \-alwaysgenerate @@ -197,13 +166,11 @@ Do not create stubs optimized for same\-process clients and servers. Must be used with the \f2\-idl\fP option. Prevents addition of \f2valuetype\fP methods and initializers to emitted IDL. These methods and initializers are optional for \f2valuetype\fPs, and are generated unless the \f2\-noValueMethods\fP option is specified when using the \f2\-idl\fP option. .TP 3 \-poa -Changes the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. -.LP -The \f2PortableServer\fP module for the +Changes the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. The \f2PortableServer\fP module for the .na \f2Portable Object Adapter\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf. .RE .TP 3 \-J @@ -214,18 +181,18 @@ Retains the generated \f2.java\fP source files for the stub, skeleton, and/or ti .TP 3 \-nowarn Turns off warnings. If used the compiler does not print out any warnings. -.LP +.TP 3 +\-nowrite +Does not write compiled classes to the file system. .TP 3 \-vcompat Generates stub and skeleton classes compatible with both the 1.1 and 1.2 JRMP stub protocol versions. (This option was the default in releases prior to 5.0.) The generated stub classes will use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and will use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes will support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large in order to support both modes of operation. .TP 3 \-verbose Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded. -.LP .TP 3 \-v1.1 Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. Note that this option is only useful for generating stub classes that are serialization\-compatible with pre\-existing, statically\-deployed stub classes that were generated by the \f3rmic\fP tool from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used). -.LP .TP 3 \-v1.2 (default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated with this option because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes will not work if they are loaded into a JDK 1.1 virtual machine. @@ -233,16 +200,11 @@ Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. .LP .SH "ENVIRONMENT VARIABLES" -.LP - .LP .RS 3 .TP 3 CLASSPATH Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example, -.RS 3 - -.LP .nf \f3 .fl @@ -251,18 +213,15 @@ Used to provide the system a path to user\-defined classes. Directories are sepa \fP .fi .RE -.RE .LP .SH "SEE ALSO" -.LP - .LP .LP java(1), javac(1), .na \f2CLASSPATH\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath .LP diff --git a/src/linux/doc/man/rmid.1 b/src/linux/doc/man/rmid.1 index 20171febd0e026db20b798180576075fe6796588..763ee378af94f6fc196f26e71056cf30f7b5e737 100644 --- a/src/linux/doc/man/rmid.1 +++ b/src/linux/doc/man/rmid.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH rmid 1 "02 Jun 2010" +.TH rmid 1 "10 May 2011" .LP .SH "Name" rmid \- The Java RMI Activation System Daemon -.LP -.RS 3 - .LP .LP \f3rmid\fP starts the activation system daemon that allows objects to be registered and activated in a virtual machine (VM). .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,19 +40,17 @@ rmid [options] .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3rmid\fP tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a VM. See the .na \f2Java RMI Specification\fP @ .fi -http://java.sun.com/javase/6/docs/platform/rmi/spec/rmiTOC.html and +http://download.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.html and .na \f2Activation tutorials\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects. +http://download.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects. .LP .LP The daemon can be started by executing the \f2rmid\fP command, and specifying a security policy file, as follows: @@ -132,8 +124,6 @@ The \f2\-log\fP option is required. If this option is not specified, \f2rmid\fP See the man pages for \f2inetd\fP (Solaris) or \f2xinetd\fP (Linux) for details on how to configure services to be started on demand. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -169,7 +159,6 @@ Specifies an option that is passed to the \f2java\fP interpreter running \f2rmid .TP 3 \-J\-Dsun.rmi.activation.execPolicy=<policy> Specifies the policy that \f2rmid\fP employs to check commands and command\-line options used to launch the VM in which an activation group runs. Please note that this option exists only in Sun's implementation of the Java RMI activation daemon. If this property is not specified on the command line, the result is the same as if \f2\-J\-Dsun.rmi.activation.execPolicy=default\fP were specified. The possible values of \f2<policy>\fP can be \f2default\fP, \f2<policyClassName>\fP, or \f2none\fP: -.LP .RS 3 .TP 2 o @@ -255,19 +244,11 @@ The first permission granted allow \f2rmid\fP to execute the 1.7.0 version of th The third permission granted, an \f2ExecOptionPermission\fP, allows \f2rmid\fP to launch an activation group that defines the security policy file to be \f2/files/policies/group.policy\fP. The next permission allows the \f2java.security.debug\fP property to be used by an activation group. The last permission allows any property in the \f2sun.rmi\fP property name hierarchy to be used by activation groups. .LP To start \f2rmid\fP with a policy file, the \f2java.security.policy\fP property needs to be specified on \f2rmid\fP's command line, for example: -.RS 3 - -.LP -.LP -\f2rmid \-J\-Djava.security.policy=rmid.policy\fP .LP -.RE +\f2rmid \-J\-Djava.security.policy=rmid.policy\fP .RE .TP 2 o -.LP -.TP 2 -o \f4<policyClassName>\fP .LP If the default behavior is not flexible enough, an administrator can provide, when starting \f2rmid\fP, the name of a class whose \f2checkExecCommand\fP method is executed in order to check commands to be executed by rmid. @@ -285,7 +266,6 @@ The \f2policyClassName\fP specifies a public class with a public, no\-argument c \fP .fi Before launching an activation group, \f2rmid\fP calls the policy's \f2checkExecCommand\fP method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the \f2checkExecCommand\fP throws a \f2SecurityException\fP, \f2rmid\fP will not launch the activation group and an \f2ActivationException\fP will be thrown to the caller attempting to activate the object. -.LP .TP 2 o \f3none\fP @@ -318,9 +298,9 @@ Specifies the port \f2rmid\fP's registry uses. The activation system daemon bind \-stop Stops the current invocation of \f2rmid\fP, for a port specified by the \f2\-port\fP option. If no port is specified, it will stop the \f2rmid\fP running on port 1098. .RE -.SH "ENVIRONMENT VARIABLES" -.LP +.LP +.SH "ENVIRONMENT VARIABLES" .LP .RS 3 .TP 3 @@ -337,14 +317,12 @@ Used to provide the system a path to user\-defined classes. Directories are sepa .LP .SH "SEE ALSO" -.LP - .LP .LP rmic(1), .na \f2CLASSPATH\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath, java(1) +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath, java(1) .LP diff --git a/src/linux/doc/man/rmiregistry.1 b/src/linux/doc/man/rmiregistry.1 index f3bc87b0b39735a0e662520a1fbe2daeca89332d..c94d270d623c99c80524581e230e7b436d0554ef 100644 --- a/src/linux/doc/man/rmiregistry.1 +++ b/src/linux/doc/man/rmiregistry.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,18 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH rmiregistry 1 "02 Jun 2010" +.TH rmiregistry 1 "10 May 2011" .LP .SH "Name" rmiregistry \- The Java Remote Object Registry .LP .RS 3 +The \f3rmiregistry\fP command starts a remote object registry on the specified port on the current host. +.RE .LP -.LP -The \f3rmiregistry\fP command starts a remote object registry on the specified port on the current host. -.LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,8 +42,6 @@ rmiregistry [\fP\f4port\fP\f3] .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3rmiregistry\fP command creates and starts a remote object registry on the specified \f2port\fP on the current host. If \f2port\fP is omitted, the registry is started on port 1099. The \f3rmiregistry\fP command produces no output and is typically run in the background. For example: @@ -68,8 +62,6 @@ The methods of the \f2java.rmi.registry.LocateRegistry\fP class are used to get The URL\-based methods of the \f2java.rmi.Naming\fP class operate on a registry and can be used to look up a remote object on any host, and on the local host: bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -80,17 +72,12 @@ Used in conjunction with any \f2java\fP option, it passes the option following t .LP .SH "SEE ALSO" .LP - -.LP -.LP java(1), .na \f2java.rmi.registry.LocateRegistry\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/rmi/registry/LocateRegistry.html and +http://download.oracle.com/javase/7/docs/api/java/rmi/registry/LocateRegistry.html and .na \f2java.rmi.Naming\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/rmi/Naming.html -.LP - +http://download.oracle.com/javase/7/docs/api/java/rmi/Naming.html diff --git a/src/linux/doc/man/schemagen.1 b/src/linux/doc/man/schemagen.1 index f23cae2052f0804c9249875af738e235e82a661c..59c4c97ea58ae8236bf1986d8b4b7ee2f4f12ffd 100644 --- a/src/linux/doc/man/schemagen.1 +++ b/src/linux/doc/man/schemagen.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH schemagen 1 "02 Jun 2010" +.TH schemagen 1 "10 May 2011" .LP .SH "Name" @@ -30,8 +30,7 @@ schemagen \- Java(TM) Architecture for XML Binding Schema Generator .br \f3Implementation Version:\fP 2.1.3 .LP -.SS -Launching schemagen +.SH "Launching schemagen" .LP .LP The schema generator can be launched using the appropriate \f2schemagen\fP shell script in the \f2bin\fP directory for your platform. @@ -45,9 +44,6 @@ We also provide an Ant task to run the schema generator \- see the instructions \f2using schemagen with Ant\fP @ .fi https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html. -.LP -.RS 3 - .LP .nf \f3 @@ -58,19 +54,13 @@ Note: Writing schema1.xsd .fl \fP .fi -.RE .LP .LP If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need to be given to the tool by using the \f2\-classpath\fP/\f2\-cp\fP options. Otherwise you will see errors when generating your schema. .LP -.RS 3 - -.LP -\f3Command Line Options\fP -.LP -.RS 3 - +.SS +Command Line Options .LP .nf \f3 @@ -79,24 +69,29 @@ Usage: schemagen [\-options ...] <java files> .fl .fl -Options: +Options: +.fl + \-d <path> : specify where to place processor and javac generated class files +.fl + \-cp <path> : specify where to find user specified files +.fl + \-classpath <path> : specify where to find user specified files +.fl + \-encoding <encoding> : specify encoding to be used for apt/javac invocation .fl - \-d <path> : Specify where to place processor and javac generated class files + .fl - \-cp <path> : Specify where to find user specified files + \-episode <file> : generate episode file for separate compilation .fl - \-classpath <path> : Specify where to find user specified files + \-version : display version information .fl - \-help : Display this usage message + \-help : display this usage message .fl \fP .fi -.RE .LP -.RE -.SS -Generated Resource Files +.SH "Generated Resource Files" .LP .LP The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control the name of the generated schema files at this time. For that purpose, use @@ -105,7 +100,8 @@ The current schema generator simply creates a schema file for each namespace ref .fi https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html. .LP -.SH "See Also" +.SH "Name" +See Also .LP .RS 3 .TP 2 @@ -124,7 +120,7 @@ o .na \f2Java Architecture for XML Binding (JAXB)\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/xml/jaxb/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/xml/jaxb/index.html .RE .LP diff --git a/src/linux/doc/man/serialver.1 b/src/linux/doc/man/serialver.1 index 5b15b5423a81e910469e840f0cca0cdcfc737049..cb653146ba7bcb959e97c3db2ab935c354199d33 100644 --- a/src/linux/doc/man/serialver.1 +++ b/src/linux/doc/man/serialver.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH serialver 1 "02 Jun 2010" +.TH serialver 1 "10 May 2011" .LP .SH "Name" serialver \- The Serial Version Command -.LP -.RS 3 - .LP .LP The \f3serialver\fP command returns the \f2serialVersionUID\fP. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -43,9 +37,6 @@ The \f3serialver\fP command returns the \f2serialVersionUID\fP. .fl .fi -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -57,17 +48,12 @@ One or more class names .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP \f3serialver\fP returns the \f2serialVersionUID\fP for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -87,37 +73,25 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "NOTES" -.LP - .LP .LP The \f3serialver\fP command loads and initializes the specified classes in its virtual machine, and by default, it does not set a security manager. If \f3serialver\fP is to be run with untrusted classes, a security manager can be set with the following option: -.LP -.RS 3 - .LP .LP \f2\-J\-Djava.security.manager\fP .LP -.RE .LP and, if necessary, a security policy can be specified with the following option: -.LP -.RS 3 - .LP .LP \f2\-J\-Djava.security.policy=<policy file>\fP .LP -.RE .SH "SEE ALSO" -.LP - .LP .LP .na \f2java.io.ObjectStreamClass\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/io/ObjectStreamClass.html +http://download.oracle.com/javase/7/docs/api/java/io/ObjectStreamClass.html .LP diff --git a/src/linux/doc/man/servertool.1 b/src/linux/doc/man/servertool.1 index 5606aa1b7ab9e0293cacefd29b5972d257162450..fbb0829a124f15e75714af4162ccfa891d5c2ceb 100644 --- a/src/linux/doc/man/servertool.1 +++ b/src/linux/doc/man/servertool.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,20 +19,14 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH servertool 1 "02 Jun 2010" +.TH servertool 1 "10 May 2011" .LP .SH "Name" servertool \- The Java(TM) IDL Server Tool .LP -.RS 3 - -.LP -\f3servertool\fP provides a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. -.RE +\f3servertool\fP provides a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -53,15 +47,11 @@ If you enter a command when starting \f2servertool\fP, the Java IDL Server Tool The \f2\-ORBInitialPort\fP \f2nameserverport\fP option is \f3required\fP. The value for \f2nameserverport\fP must specify the port on which \f2orbd\fP is running and listening for incoming requests. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024 for the \f2nameserverport\fP. .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f2servertool\fP provides the command\-line interface for the application programmers to register, unregister, startup, and shutdown a persistent server. Other commands are provided to obtain various statistical information about the server. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -74,8 +64,6 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "COMMANDS" -.LP - .LP .RS 3 .TP 3 @@ -121,7 +109,5 @@ Exit the server tool. .LP .SH "SEE ALSO" -.LP - .LP orbd(1) diff --git a/src/linux/doc/man/tnameserv.1 b/src/linux/doc/man/tnameserv.1 index bdafd440d25c19844d536d113f9a27a2a7152725..2279b17520e1edfca5408dac6bb80f6dc543b2a4 100644 --- a/src/linux/doc/man/tnameserv.1 +++ b/src/linux/doc/man/tnameserv.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1999, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH tnameserv 1 "02 Jun 2010" +.TH tnameserv 1 "10 May 2011" .LP .SH "Name" @@ -30,7 +30,7 @@ This document discusses using the Java IDL Transient Naming Service, \f2tnameser .na \f2Java IDL Naming Service Included with ORBD\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html topic. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html topic. .LP .LP Topics in this section include: @@ -120,11 +120,11 @@ For the client and server to find the Naming Service, they must be made aware of .na \f2The Hello World Example Using RMI\-IIOP\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/rmi\-iiop/rmiiiopexample.html. You could also use the command line options \f2\-ORBInitialPort\fP \f2nameserverport#\fP and \f2\-ORBInitialHost\fP \f2nameserverhostname\fP to tell the client and server where to find the Naming Service. +http://download.oracle.com/javase/7/docs/technotes/guides/rmi\-iiop/rmiiiopexample.html. You could also use the command line options \f2\-ORBInitialPort\fP \f2nameserverport#\fP and \f2\-ORBInitialHost\fP \f2nameserverhostname\fP to tell the client and server where to find the Naming Service. .na \f2Java IDL: Running the Hello World Example on TWO Machines\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/tutorial/jidl2machines.html shows one way of doing this using the command line option. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/tutorial/jidl2machines.html shows one way of doing this using the command line option. .LP .LP For example, suppose the Transient Naming Service, \f2tnameserv\fP is running on port 1050 on host \f2nameserverhost\fP. The client is running on host \f2clienthost\fP and the server is running on host \f2serverhost\fP. @@ -170,16 +170,12 @@ The \-J option .LP This command\-line option is available for use with \f2tnameserve\fP: .RS 3 - -.LP -.RS 3 .TP 3 \-Joption Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine. .RE .LP -.RE .SH "Stopping the Java\ IDL Transient Naming Service" .LP .LP @@ -190,28 +186,27 @@ To stop the Java\ IDL naming service, use the relevant operating system command, .LP The following sample program illustrates how to add names to the namespace. It is a self\-contained Transient Naming Service client that creates the following simple tree. .LP -.nf -\f3 -.fl -\fP\f3 -.fl - \fP\f4Initial\fP\f3 -.fl - \fP\f4Naming Context\fP\f3 -.fl - / \\ -.fl - / \\ -.fl - plans \fP\f4Personal\fP\f3 -.fl - / \\ -.fl - / \\ -.fl - calendar schedule\fP -.fl -.fi +.RS 3 +.TP 2 +o +\f4Initial Naming Context\fP +.RS 3 +.TP 2 +* +\f3plans\fP +.TP 2 +* +\f4Personal\fP +.RS 3 +.TP 2 +- +\f3calendar\fP +.TP 2 +- +\f3schedule\fP +.RE +.RE +.RE .LP .LP diff --git a/src/linux/doc/man/unpack200.1 b/src/linux/doc/man/unpack200.1 index 13ec2b19667d2e119ff956fafd5fe4fb6c892f51..ff6eb2240909a6be6e40ef3379f8db1e2347483e 100644 --- a/src/linux/doc/man/unpack200.1 +++ b/src/linux/doc/man/unpack200.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,24 +19,19 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH unpack200 1 "02 Jun 2010" +.TH unpack200 1 "10 May 2011" .LP .SH "Name" unpack200 \- JAR Unpacking tool .LP .SH "SYNOPSIS" -.LP - .LP .LP \f4unpack200\fP\f2 [ \fP\f2options\fP ] \f2input\-file\fP \f2JAR\-file\fP .LP .LP Options may be in any order. The last option on the command line supersedes all previously specified options. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -48,99 +43,71 @@ Name of the output JAR file. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP \f2unpack200\fP is a native implementation that transforms a packed file produced by \f2pack200\fP(1) into a JAR file. Typical usage: -.LP -.RS 3 - .LP .LP \f2% unpack200 myarchive.pack.gz myarchive.jar\fP .LP -.RE .LP In this example, the \f2myarchive.jar\fP is produced from \f2myarchive.pack.gz\fP using the default \f2unpack200\fP settings. .LP .SH "OPTIONS" -.LP -.SS -Standard Options -.LP -.RS 3 - .LP .LP \f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP -.LP -.RS 3 - .LP .LP Sets the deflation to be \f2true\fP, \f2false\fP, or \f2keep\fP on all entries within a JAR file. The default mode is \f2keep\fP. If \f2true\fP or \f2false\fP, overrides the default behavior and sets the deflation mode on all entries within the output JAR file. -.LP -.RE -.RE -.SS -Non\-Standard Options -.LP -.RS 3 - .LP .LP \f4\-r \-\-remove\-pack\-file\fP -.LP -.RS 3 - .LP .LP Removes the input packed file. .LP -.RE .LP \f4\-v \-\-verbose\fP -.LP -.RS 3 - .LP .LP Outputs minimal messages. Multiple specification of this option will output more verbose messages. .LP -.RE .LP \f4\-q \-\-quiet\fP -.LP -.RS 3 - .LP .LP Specifies quiet operation with no messages. .LP -.RE .LP \f4\-lfilename \-\-log\-file=\fP\f2filename\fP -.LP -.RS 3 - .LP .LP Specifies a log file to output messages. .LP -.RE -.RE -.SH "EXIT STATUS" .LP - +\f4\-? \-h \-\-help\fP .LP .LP -The following exit values are returned: +Prints help information about this command. .LP -.RS 3 - +.LP +\f4\-V \-\-version\fP +.LP +.LP +Prints version information about this command. +.LP +.LP +\f4\-J\fP\f2option\fP +.LP +.LP +Passes \f2option\fP to the Java launcher called by \f2unpack200\fP. +.LP +.SH "EXIT STATUS" +.LP +.LP +The following exit values are returned: .LP .LP \f2\ 0\fP if successful completion; @@ -148,7 +115,6 @@ The following exit values are returned: .LP \f2>0\fP if an error occurred. .LP -.RE .SH "SEE ALSO" .LP .RS 3 @@ -160,13 +126,13 @@ o .na \f2Java SE Documentation\fP @ .fi -http://java.sun.com/javase/6/docs/index.html +http://download.oracle.com/javase/7/docs/index.html .TP 2 o .na \f2Java Deployment Guide \- Pack200\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/pack200.html +http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html .TP 2 o jar(1) \- Java Archive Tool @@ -180,8 +146,6 @@ o .LP .SH "NOTES" -.LP - .LP .LP This command should not be confused with \f2unpack(1)\fP. They are distinctly separate products. diff --git a/src/linux/doc/man/wsgen.1 b/src/linux/doc/man/wsgen.1 index e210f1c2364a2c1f216271c4b0659ab16da8fda5..b9f7d596a30dfb2eb2faf635ed2c1c64646c1e59 100644 --- a/src/linux/doc/man/wsgen.1 +++ b/src/linux/doc/man/wsgen.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,21 +19,15 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH wsgen 1 "02 Jun 2010" +.TH wsgen 1 "10 May 2011" .SH "Name" wsgen \- Java(TM) API for XML Web Services (JAX\-WS) 2.0 -.RS 3 - -.LP .LP \f3Specification Version:\fP 2.1 .br \f3Implementation Version:\fP 2.1.1 .LP -.LP The \f2wsgen\fP tool generates JAX\-WS portable artifacts used in JAX\-WS web services. The tool reads a web service endpoint implementation class (SEI) and generates all the required artifacts for web service deployment, and invocation -.LP -.RE .SH "Overview" .LP The \f2wsgen\fP tool generates JAX\-WS portable artifacts used in JAX\-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment, and invocation. JAXWS 2.1.1 RI also provides a wsgen ant task, see @@ -83,7 +77,6 @@ wsgen [options] <SEI>\fP The following table lists the \f2wsgen\fP options. .br .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -354,7 +347,7 @@ Used only in conjunction with the \f2\-wsdl\fP option. Used to specify a particu .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 139 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 133 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -571,7 +564,6 @@ Used only in conjunction with the \f2\-wsdl\fP option. Used to specify a particu .rm i+ .rm j+ .rm k+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-53 .LP diff --git a/src/linux/doc/man/wsimport.1 b/src/linux/doc/man/wsimport.1 index 6e10e4177aa37c8c874f19966e29e6d0b528f75d..153b4986beb9fdec4b8b664175c17c46ad2ac111 100644 --- a/src/linux/doc/man/wsimport.1 +++ b/src/linux/doc/man/wsimport.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH wsimport 1 "02 Jun 2010" +.TH wsimport 1 "10 May 2011" .SH "Name" wsimport \- Java(TM) API for XML Web Services (JAX\-WS) 2.0 .LP @@ -88,7 +88,6 @@ wsimport [options] <wsdl> .LP The following table lists the \f2wsimport\fP options. .LP -.TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 .ps \n(.s @@ -676,7 +675,6 @@ Generate code as per the given JAX\-WS specification version. version 2.0 will g .rm l+ .rm m+ .rm n+ -.TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-66 .LP Multiple JAX\-WS and JAXB binding files can be specified using \f2\-b\fP option and they can be used to customize various things like package names, bean names, etc. More information on JAX\-WS and JAXB binding files can be found in the @@ -684,15 +682,294 @@ Multiple JAX\-WS and JAXB binding files can be specified using \f2\-b\fP option \f2customization documentation\fP @ .fi https://jax\-ws.dev.java.net/nonav/2.1.1/docs/customizations.html. +.LP +The following table lists \f2wsimport\fP non\-standard options: +.LP +.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 +.de 35 +.ps \n(.s +.vs \n(.vu +.in \n(.iu +.if \n(.u .fi +.if \n(.j .ad +.if \n(.j=0 .na +.. +.nf +.nr #~ 0 +.if n .nr #~ 0.6n +.ds #d .d +.if \(ts\n(.z\(ts\(ts .ds #d nl +.fc +.nr 33 \n(.s +.rm 80 81 +.nr 34 \n(.lu +.eo +.am 81 +.br +.di a+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Map headers not bound to request or response message to Java method parameters. +.br +.di +.nr a| \n(dn +.nr a- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di b+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +WSDL URI that specifies the file that contains authorization information; this URI is in the following format: http://\f2<user name>\fP:\f2<password>\fP@\f2<host name>\fP/\f2<Web service name>\fP?wsdl +.br +.di +.nr b| \n(dn +.nr b- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di c+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Print debugging information. +.br +.di +.nr c| \n(dn +.nr c- \n(dl +.. +.ec \ +.eo +.am 80 +.br +.di d+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(80 .ll \n(80u +.in 0 +\f3\-Xno\-addressing\-databinding\fP +.br +.di +.nr d| \n(dn +.nr d- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di e+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Enable binding of W3C \f2EndpointReferenceType\fP to Java. +.br +.di +.nr e| \n(dn +.nr e- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di f+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Do not compile generated Java files. +.br +.di +.nr f| \n(dn +.nr f- \n(dl +.. +.ec \ +.35 +.nf +.ll \n(34u +.nr 80 0 +.nr 38 \w\f3Option\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-XadditionalHeaders\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-Xauthfile <file>\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-Xdebug\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-Xnocompile\fP +.if \n(80<\n(38 .nr 80 \n(38 +.80 +.rm 80 +.nr 38 \n(d- +.if \n(80<\n(38 .nr 80 \n(38 +.nr 81 0 +.nr 38 \w\f3Description\fP +.if \n(81<\n(38 .nr 81 \n(38 +.81 +.rm 81 +.nr 38 \n(a- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(b- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(c- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(e- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(f- +.if \n(81<\n(38 .nr 81 \n(38 +.35 +.nf +.ll \n(34u +.nr 38 1n +.nr 79 0 +.nr 40 \n(79+(0*\n(38) +.nr 80 +\n(40 +.nr 41 \n(80+(3*\n(38) +.nr 81 +\n(41 +.nr TW \n(81 +.if t .if \n(TW>\n(.li .tm Table at line 193 file Input is too wide - \n(TW units +.fc   +.nr #T 0-1 +.nr #a 0-1 +.eo +.de T# +.ds #d .d +.if \(ts\n(.z\(ts\(ts .ds #d nl +.mk ## +.nr ## -1v +.ls 1 +.ls +.. +.ec +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3Option\fP\h'|\n(41u'\f3Description\fP +.ne \n(a|u+\n(.Vu +.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-XadditionalHeaders\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.a+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(b|u+\n(.Vu +.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-Xauthfile <file>\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.b+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(c|u+\n(.Vu +.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-Xdebug\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.c+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(d|u+\n(.Vu +.ne \n(e|u+\n(.Vu +.if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v) +.if (\n(e|+\n(#^-1v)>\n(#- .nr #- +(\n(e|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(40u +.in +\n(37u +.d+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.e+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(f|u+\n(.Vu +.if (\n(f|+\n(#^-1v)>\n(#- .nr #- +(\n(f|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-Xnocompile\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.f+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.fc +.nr T. 1 +.T# 1 +.35 +.rm a+ +.rm b+ +.rm c+ +.rm d+ +.rm e+ +.rm f+ +.if \n-(b.=0 .nr c. \n(.c-\n(d.-26 + .LP .SH "Example" .nf \f3 .fl -\fP\f3wsimport \-p stockquote http://stockquote.xyz/quote?wsdl\fP +\fP\f3wsimport \-p stockquote http://stockquote.example.com/quote?wsdl\fP .fl .fi .LP -This will generate the Java artifacts and compile them by importing the \f2http://stockquote.xyz/quote?wsdl\fP. +This will generate the Java artifacts and compile them by importing the \f2http://stockquote.example.com/quote?wsdl\fP. .br diff --git a/src/linux/doc/man/xjc.1 b/src/linux/doc/man/xjc.1 index a739d7d7acb89f37d86eab059f987797af2c6444..0425ba6480c0f99cb42955fb0c629d5bb24207c4 100644 --- a/src/linux/doc/man/xjc.1 +++ b/src/linux/doc/man/xjc.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,19 +19,18 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH xjc 1 "02 Jun 2010" +.TH xjc 1 "10 May 2011" .LP -.ad c .SH "Name" xjc \- Java(TM) Architecture for XML Binding .br -Binding Compiler +Binding Compiler +.LP .LP \f3Specification Version:\fP 2.1 .br -\f3Reference Implementation (RI) Version:\fP 2.1.3 .ad l - +\f3Reference Implementation (RI) Version:\fP 2.1.3 .LP .SH "Launching xjc" .LP @@ -41,84 +40,87 @@ The binding compiler can be launched using the appropriate \f2xjc\fP shell scrip \f2using the XJC Ant task\fP @ .fi https://jaxb.dev.java.net/nonav/2.1.3/docs/xjcTask.html. -.LP -.RS 3 - .LP .LP \f2% xjc \-help\fP .LP -.RE -\f3Output\fP -.LP -.RS 3 - +.SS +Output .LP .nf \f3 .fl -Usage: xjc [\-options ...] <schema_file/URL/dir> ... [\-b <bindinfo>] ... +Usage: xjc [\-options ...] <schema file/URL/dir/jar> ... [\-b <bindinfo>] ... +.fl +If dir is specified, all schema files in it will be compiled. +.fl +If jar is specified, /META\-INF/sun\-jaxb.episode binding file will be compiled. .fl Options: .fl - \-nv : do not perform strict validation of the input schema(s) + \-nv : do not perform strict validation of the input schema(s) +.fl + \-extension : allow vendor extensions \- do not strictly follow the Compatibility Rules and App E.2 from the JAXB Spec +.fl + \-b <file/dir> : specify external bindings files (each <file> must have its own \-b); if a directory is given, **/*.xjb is searched .fl - \-extension : allow vendor extensions \- do not strictly follow the + \-d <dir> : generated files will go into this directory .fl - Compatibility Rules and App E.2 from the JAXB Spec + \-p <pkg> : specifies the target package .fl - \-b <file/dir> : specify external bindings files (each <file> must have its own \-b) + \-httpproxy <proxy> : set HTTP/HTTPS proxy; format is [user[:password]@]proxyHost:proxyPort .fl - If a directory is given, **/*.xjb is searched + \-httpproxyfile <f> : works like \-httpproxy but takes the argument in a file to protect password .fl - \-d <dir> : generated files will go into this directory + \-classpath <arg> : specify where to find user class files .fl - \-p <pkg> : specifies the target package + \-catalog <file> : specify catalog files to resolve external entity references; support TR9401, XCatalog, and OASIS XML Catalog format .fl - \-httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort + \-readOnly : generated files will be in read\-only mode .fl - \-httpproxyfile <file>: set the proxy string (same format as above). + \-npa : suppress generation of package level annotations (**/package\-info.java) .fl - \-classpath <arg> : specify where to find user class files + \-no\-header : suppress generation of a file header with timestamp .fl - \-catalog <file> : specify catalog files to resolve external entity references + \-target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features .fl - support TR9401, XCatalog, and OASIS XML Catalog format. + \-xmlschema : treat input as W3C XML Schema (default) .fl - \-readOnly : generated files will be in read\-only mode + \-relaxng : treat input as RELAX NG (experimental,unsupported) .fl - \-npa : suppress generation of package level annotations (**/package\-info.java) + \-relaxng\-compact : treat input as RELAX NG compact syntax (experimental,unsupported) .fl - \-no\-header : suppress generation of a file header with timestamp + \-dtd : treat input as XML DTD (experimental,unsupported) .fl - \-target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features. + \-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported) .fl - \-xmlschema : treat input as W3C XML Schema (default) + \-verbose : be extra verbose .fl - \-relaxng : treat input as RELAX NG (experimental,unsupported) + \-quiet : suppress compiler output .fl - \-relaxng\-compact : treat input as RELAX NG compact syntax (experimental,unsupported) + \-help : display this help message .fl - \-dtd : treat input as XML DTD (experimental,unsupported) + \-version : display version information +.fl + +.fl + .fl - \-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported) +Extensions: .fl - \-verbose : be extra verbose + \-Xlocator : enable source location support for generated code .fl - \-quiet : suppress compiler output + \-Xsync\-methods : generate accessor methods with the 'synchronized' keyword .fl - \-help : display this help message + \-mark\-generated : mark the generated code as @javax.annotation.Generated .fl - \-version : display version information + \-episode <FILE> : generate the episode file for separate compilation .fl \fP .fi -.RE .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -129,15 +131,9 @@ By default, the XJC binding compiler performs strict validation of the source sc By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification. Appendix E.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1.0. In some cases, you may be allowed to use them in the "\-extension" mode enabled by this switch. In the default (strict) mode, you are also limited to using only the binding customizations defined in the specification. By using the "\-extension" switch, you will be allowed to use the JAXB Vendor Extensions .TP 3 \-b <file> -Specify one or more external binding files to process. (Each binding file must have its own \f2"\-b"\fP switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizations into multiple bindings files: -.RS 3 - -.LP -\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings123.xjb\fP +Specify one or more external binding files to process. (Each binding file must have its own \f2"\-b"\fP switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizations into multiple bindings files: \f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings123.xjb\fP .br -\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings1.xjb \-b bindings2.xjb \-b bindings3.xjb\fP -.RE -In addition, the ordering of the schema files and binding files on the command line does not matter. +\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings1.xjb \-b bindings2.xjb \-b bindings3.xjb\fP In addition, the ordering of the schema files and binding files on the command line does not matter. .TP 3 \-d <dir> By default, the XJC binding compiler will generate the Java content classes in the current directory. Use this option to specify an alternate output directory. The output directory must already exist, the XJC binding compiler will not create it for you. @@ -199,11 +195,29 @@ Display the compiler version information. <schema file/URL/dir> Specify one or more schema files to compile. If you specify a directory, then xjc will scan it for all schema files and compile them. .RE + +.LP .SS -Summary of Deprecated and Removed Command Line Options +Non\-Standard Command Line Options .LP .RS 3 +.TP 3 +\-Xlocator +Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling. +.TP 3 +\-Xsync\-methods +Causes all of the generated method signatures to include the \f2synchronized\fP keyword. +.TP 3 +\-mark\-generated +Mark the generated code with the annotation \f2@javax.annotation.Generated\fP. +.TP 3 +\-episode <file> +Generate the specified episode file for separate compilation. +.RE +.LP +.SS +Deprecated and Removed Command Line Options .LP .RS 3 .TP 3 @@ -215,13 +229,9 @@ Since the JAXB 2.0 specification has defined a portable runtime, it is no longer .TP 3 \-source The \-source compatibility switch was introduced in the first JAXB 2.0 Early Access release. We have decided to remove this switch from future releases of JAXB 2.0. If you need to generate 1.0.x code, please use an installation of the 1.0.x codebase. -.TP 3 -\-Xlocator & \-Xsync\-methods -These switches have been disabled for now. We plan on releasing this functionality as a separate download in the future. .RE .LP -.RE .SS Compiler Restrictions .LP @@ -280,7 +290,7 @@ o .na \f2Java Architecture for XML Binding (JAXB)\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/xml/jaxb/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/xml/jaxb/index.html .RE .LP diff --git a/src/solaris/doc/sun/man/man1/appletviewer.1 b/src/solaris/doc/sun/man/man1/appletviewer.1 index 6f31c4565e2736dba7a6915413d3acf1171cd01a..887abbd66e37a7e26b7a9f262672162778af1d99 100644 --- a/src/solaris/doc/sun/man/man1/appletviewer.1 +++ b/src/solaris/doc/sun/man/man1/appletviewer.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1995, 2011, 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,43 +19,33 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH appletviewer 1 "02 Jun 2010" +.TH appletviewer 1 "10 May 2011" .LP .SH "Name" appletviewer \- The Java Applet Viewer. -.LP -.RS 3 - .LP .LP The \f3appletviewer\fP command allows you to run applets outside of a web browser. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .LP \f4appletviewer\fP \f2[\fP \f2options\fP \f2] \fP\f2urls\fP ... .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3appletviewer\fP command connects to the documents or resources designated by \f2urls\fP and displays each applet referenced by the documents in its own window. Note: if the documents referred to by \f2urls\fP do not reference any applets with the \f2OBJECT\fP, \f2EMBED\fP, or \f2APPLET\fP tag, then \f3appletviewer\fP does nothing. For details on the HTML tags that \f3appletviewer\fP supports, see .na \f2AppletViewer Tags\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/appletviewertags.html. +http://download.oracle.com/javase/7/docs/technotes/tools/appletviewertags.html. .LP .LP \f3Note:\fP The \f3appletviewer\fP requires encoded URLs according to the escaping mechanism defined in RFC2396. Only encoded URLs are supported. However, file names must be unencoded, as specified in RFC2396. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 diff --git a/src/solaris/doc/sun/man/man1/apt.1 b/src/solaris/doc/sun/man/man1/apt.1 index 5a7c8b3c9f0edc383b515fe35f1e7883c2377064..2d77108a5d4f9799b8efd3a45b1283b1e8ae0c08 100644 --- a/src/solaris/doc/sun/man/man1/apt.1 +++ b/src/solaris/doc/sun/man/man1/apt.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH apt 1 "02 Jun 2010" +.TH apt 1 "10 May 2011" .LP .SH "NAME" @@ -50,21 +50,17 @@ One or more files that list source files or other options .SH "DESCRIPTION" .LP .LP -The tool \f2apt\fP, annotation processing tool, includes a set of new reflective APIs and supporting infrastructure to process program annotations. The \f2apt\fP reflective APIs provide a build\-time, source\-based, read\-only view of program structure. These reflective APIs are designed to cleanly model the Java(TM) programming language's type system after the addition of generics. First, \f2apt\fP runs annotation processors that can produce new source code and other files. Next, \f2apt\fP can cause compilation of both original and generated source files, easing development. The reflective APIs and other APIs used to interact with the tool are subpackages of \f2com.sun.mirror\fP. +\f3Note\fP: The \f2apt\fP tool and its associated API contained in the package \f2com.sun.mirror\fP have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the \f2javac(1)\fP tool and the APIs contained in the packages \f2javax.annotation.processing\fP and \f2javax.lang.model\fP to process annotations. +.LP +.LP +The tool \f2apt\fP, annotation processing tool, includes reflective APIs and supporting infrastructure to process program annotations. The \f2apt\fP reflective APIs provide a build\-time, source\-based, read\-only view of program structure. These reflective APIs are designed to cleanly model the Java(TM) programming language's type system after the addition of generics. First, \f2apt\fP runs annotation processors that can produce new source code and other files. Next, \f2apt\fP can cause compilation of both original and generated source files, easing development. The reflective APIs and other APIs used to interact with the tool are subpackages of \f2com.sun.mirror\fP. .LP .LP A fuller discussion of how the tool operates as well as instructions for developing with \f2apt\fP are in .na \f4Getting Started with \fP\f4apt\fP. @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/apt/GettingStarted.html -.LP -.RS 3 -.TP 3 -Note: -\f2The functionality of \fP\f2apt\fP has been subsumed by the annotation\-processing infrastructure that is now part of the \f2javac(1)\fP tool and standardized for use by all Java compilers. This new infrastructure relies on the language model and annotation\-processing APIs that are now part of the Java Platform. It is recommended that new annotation processor development be based on the new APIs and the \f2javac\fP tool. -.RE - +http://download.oracle.com/javase/7/docs/technotes/guides/apt/GettingStarted.html .LP .SH "OPTIONS" .LP @@ -90,6 +86,12 @@ Specify where to find annotation processor factories; if this option is used, th .TP 3 \-factory classname Name of annotation processor factory to use; bypasses default discovery process +.TP 3 +\-version +Print version information. +.TP 3 +\-X +Display information about non\-standard options. .RE .LP @@ -109,10 +111,35 @@ Specify where to find user class files and annotation processor factories. If \f .LP Consult the javac(1) man page for information on \f2javac\fP options. .LP +.SS +Non\-Standard Options +.LP +.RS 3 +.TP 3 +\-XListAnnotationTypes +List found annotation types. +.TP 3 +\-XListDeclarations +List specified and included declarations. +.TP 3 +\-XPrintAptRounds +Print information about initial and recursive \f2apt\fP rounds. +.TP 3 +\-XPrintFactoryInfo +Print information about which annotations a factory is asked to process. +.TP 3 +\-XclassesAsDecls +Treat both class and source files as declarations to process. +.RE + +.LP +.LP +\f3Note\fP: Because these options are non\-standard, they are subject to change without notice. +.LP .SH "NOTES" .LP .LP -The functionality of \f2apt\fP has been subsumed by the standard annotation\-processing infrastructure now offered by \f2javac\fP. Support for \f2apt\fP and its associated APIs may be discontinued in some future JDK release. +The \f2apt\fP tool and its associated API contained in the package \f2com.sun.mirror\fP have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the \f2javac(1)\fP tool and the APIs contained in the packages \f2javax.annotation.processing\fP and \f2javax.lang.model\fP to process annotations. .LP .SH "SEE ALSO" .LP diff --git a/src/solaris/doc/sun/man/man1/extcheck.1 b/src/solaris/doc/sun/man/man1/extcheck.1 index 3b1a03ee3fe059336cfbd77ac448b8c94b884f57..9dfe6472adf0949ab564865dd7a4dddd172164a0 100644 --- a/src/solaris/doc/sun/man/man1/extcheck.1 +++ b/src/solaris/doc/sun/man/man1/extcheck.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH extcheck 1 "02 Jun 2010" +.TH extcheck 1 "10 May 2011" .LP .SH "Name" extcheck \- A utility to detect jar conflicts -.LP -.RS 3 - .LP .LP \f3extcheck\fP detects version conflicts between a target jar file and currently installed extension jar files. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,8 +40,6 @@ extcheck [ \-verbose ] targetfile.jar .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3extcheck\fP utility checks a specified Jar file for title and version conflicts with any extensions installed in the Java(TM) SDK. Before installing an extension, you can use this utility to see if the same or a more recent version of the extension is already installed. @@ -62,8 +54,6 @@ If no conflict is detected, the return code is \f20\fP. If the manifest of any jar file in the extensions directory has the same \f2Specification\-title\fP and the same or a newer \f2Specification\-version\fP number, a non\-zero error code is returned. A non\-zero error code is also returned if \f2targetfile.jar\fP does not have the \f2Specification\-title\fP or \f2Specification\-version\fP attributes in its manifest. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -76,8 +66,6 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "SEE ALSO" -.LP - .LP .LP jar(1) diff --git a/src/solaris/doc/sun/man/man1/idlj.1 b/src/solaris/doc/sun/man/man1/idlj.1 index 4b6ab0ccb0919bc6f97a6e8d5b5660e8a3def88f..2ed5652bc63abea77775104efdf54c892518be3b 100644 --- a/src/solaris/doc/sun/man/man1/idlj.1 +++ b/src/solaris/doc/sun/man/man1/idlj.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,20 +19,14 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH idlj 1 "02 Jun 2010" +.TH idlj 1 "10 May 2011" .LP .SH "Name" idlj \- The IDL\-to\-Java Compiler .LP -.RS 3 - -.LP -\f3idlj\fP generates Java bindings from a given IDL file. -.RE +\f3idlj\fP generates Java bindings from a given IDL file. .SH "Synopsis" -.LP - .LP .nf \f3 @@ -48,28 +42,62 @@ where \f2idl\-file\fP is the name of a file containing Interface Definition Lang .LP .SH "Description" .LP - .LP The IDL\-to\-Java Compiler generates the Java bindings for a given IDL file.\ For binding details, see the .na \f2OMG IDL to Java Language Language Mapping Specification\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/mapping/jidlMapping.html. Some previous releases of the IDL\-to\-Java compiler were named \f2idltojava\fP. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/mapping/jidlMapping.html. Some previous releases of the IDL\-to\-Java compiler were named \f2idltojava\fP. +.LP .SS Emitting Client and Server Bindings .LP -.RS 3 +.LP +To generate Java bindings for an IDL file named My.idl: +.LP +.nf +\f3 +.fl +idlj My.idl +.fl +\fP +.fi .LP -To generate Java bindings for an IDL file named My.idl: \f2idlj My.idl\fP .LP -This generates the client\-side bindings and is equivalent to: \f2idlj \fP\f4\-fclient\fP\f2 My.idl\fP +This generates the client\-side bindings and is equivalent to: .LP -The client\-side bindings do not include the server\-side skeleton. If you want to generate the server\-side bindings for the interfaces: \f2idlj \fP\f4\-fserver\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-fclient\fP My.idl +.fl +.fi + .LP -Server\-side bindings include the client\-side bindings plus the skeleton, all of which are \f2POA\fP (that is, Inheritance Model) classes. If you want to generate both client and server\-side bindings, use one of the following (equivalent) commands: \f2idlj \fP\f4\-fclient \-fserver\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-fall\fP\f2 My.idl\fP +.LP +The client\-side bindings do not include the server\-side skeleton. If you want to generate the server\-side bindings for the interfaces: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-fserver\fP My.idl +.fl +.fi + +.LP +.LP +Server\-side bindings include the client\-side bindings plus the skeleton, all of which are \f2POA\fP (that is, Inheritance Model) classes. If you want to generate both client and server\-side bindings, use one of the following (equivalent) commands: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-fclient \-fserver\fP My.idl +.fl +idlj \f3\-fall\fP My.idl +.fl +.fi + .LP .LP There are two possible server\-side models: the Inheritance Model and the Tie Delegation Model. @@ -82,31 +110,47 @@ The default server\-side model is the \f2Portable Servant Inheritance Model\fP. .na \f2org.omg.PortableServer.Servant\fP @ .fi -http://java.sun.com/javase/6/docs/api/org/omg/PortableServer/Servant.html and implements the \f2InvokeHandler\fP interface and the operations interface associated with the IDL interface the skeleton implements. +http://download.oracle.com/javase/7/docs/api/org/omg/PortableServer/Servant.html and implements the \f2InvokeHandler\fP interface and the operations interface associated with the IDL interface the skeleton implements. .LP .LP The \f2PortableServer\fP module for the .na \f2Portable Object Adapter (POA)\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/POA.html defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. .LP .LP Another option for the Inheritance Model is to use the \f2\-oldImplBase\fP flag in order to generate server\-side bindings that are compatible with versions of the Java programming language prior to J2SE 1.4. Note that using the \f2\-oldImplBase\fP flag is non\-standard: these APIs are being deprecated. You would use this flag ONLY for compatibility with existing servers written in J2SE 1.3. In that case, you would need to modify an existing MAKEFILE to add the \f2\-oldImplBase\fP flag to the \f2idlj\fP compiler, otherwise POA\-based server\-side mappings will be generated. To generate server\-side bindings that are backwards compatible: .LP -\f2idlj \fP\f4\-fclient \-fserver\fP\f2 \fP\f4\-oldImplBase\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-fall\fP\f2 \fP\f4\-oldImplBase\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-fclient \-fserver\fP \f3\-oldImplBase\fP My.idl +.fl +idlj \f3\-fall\fP \f3\-oldImplBase\fP My.idl +.fl +.fi + +.LP +.LP +Given an interface \f2My\fP defined in \f2My.idl\fP, the file \f2_MyImplBase.java\fP is generated. You must provide the implementation for \f2My\fP and it must inherit from \f2_MyImplBase\fP. .LP -Given an interface \f2My\fP defined in \f2My.idl\fP, the file \f2_MyImplBase.java\fP is generated. You must provide the implementation for \f2My\fP and it must inherit from \f2_MyImplBase\fP. .LP The other server\-side model is called the Tie Model. This is a delegation model. Because it is not possible to generate ties and skeletons at the same time, they must be generated separately. The following commands generate the bindings for the Tie Model: .LP -\f2idlj \fP\f4\-fall\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-fallTIE\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-fall\fP My.idl +.fl +idlj \f3\-fallTIE\fP My.idl +.fl +.fi + +.LP +.LP +For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. The constructor to \f2MyPOATie\fP takes a \f2delegate\fP. In this example, using the default POA model, the constructor also needs a \f2poa\fP. You must provide the implementation for \f2delegate\fP, but it does not have to inherit from any other class, only the interface \f2MyOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2MyPOATie\fP. For instance: .LP -For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. The constructor to \f2MyPOATie\fP takes a \f2delegate\fP. In this example, using the default POA model, the constructor also needs a \f2poa\fP. You must provide the implementation for \f2delegate\fP, but it does not have to inherit from any other class, only the interface \f2MyOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2MyPOATie\fP. For instance: .nf \f3 .fl @@ -144,13 +188,21 @@ For the interface \f2My\fP, the second command generates \f2MyPOATie.java\fP. Th .fi .LP -You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method. +.LP +You might want to use the Tie model instead of the typical Inheritance model if your implementation must inherit from some other implementation. Java allows any number of interface inheritance, but there is only one slot for class inheritance. If you use the inheritance model, that slot is used up . By using the Tie Model, that slot is freed up for your own use. The drawback is that it introduces a level of indirection: one extra method call occurs when invoking a method. +.LP .LP To generate server\-side, Tie model bindings that are compatible with versions of the IDL to Java language mapping in versions prior to J2SE 1.4. .LP -\f2idlj \fP\f4\-oldImplBase\fP\f2 \fP\f4\-fall\fP\f2 My.idl\fP -.br -\f2idlj \fP\f4\-oldImplBase\fP\f2 \fP\f4\-fallTIE\fP\f2 My.idl\fP +.nf +\f3 +.fl +idlj \fP\f3\-oldImplBase\fP \f3\-fall\fP My.idl +.fl +idlj \f3\-oldImplBase\fP \f3\-fallTIE\fP My.idl +.fl +.fi + .LP .LP For the interface \f2My\fP, this will generate \f2My_Tie.java\fP. The constructor to \f2My_Tie\fP takes a \f2impl\fP. You must provide the implementation for \f2impl\fP, but it does not have to inherit from any other class, only the interface \f2HelloOperations\fP. But to use it with the ORB, you must wrap your implementation within \f2My_Tie\fP. For instance: @@ -184,201 +236,383 @@ For the interface \f2My\fP, this will generate \f2My_Tie.java\fP. The constructo .fi .LP -.RE .SS Specifying Alternate Locations for Emitted Files .LP -.RS 3 - .LP -If you want to direct the emitted files to a directory other than the current directory, invoke the compiler as: -.RS 3 +If you want to direct the emitted files to a directory other than the current directory, invoke the compiler as: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-td /altdir\fP My.idl +.fl +.fi .LP -\f2idlj \fP\f4\-td /altdir\fP\f2 My.idl\fP -.RE +.LP For the interface \f2My\fP, the bindings will be emitted to \f2/altdir/My.java\fP, etc., instead of \f2./My.java\fP. -.RE +.LP .SS Specifying Alternate Locations for Include Files .LP -.RS 3 +.LP +If \f2My.idl\fP included another idl file, \f2MyOther.idl\fP, the compiler assumes that \f2MyOther.idl\fP resides in the local directory. If it resides in \f2/includes\fP, for example, then you would invoke the compiler with the following command: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-i /includes\fP My.idl +.fl +.fi .LP -If \f2My.idl\fP included another idl file, \f2MyOther.idl\fP, the compiler assumes that \f2MyOther.idl\fP resides in the local directory. If it resides in \f2/includes\fP, for example, then you would invoke the compiler with the following command: \f2idlj \fP\f4\-i /includes\fP\f2 My.idl\fP .LP -If \f2My.idl\fP also included \f2Another.idl\fP that resided in \f2/moreIncludes\fP, for example, then you would invoke the compiler with the following command: \f2idlj \fP\f4\-i /includes \-i /moreIncludes\fP\f2 My.idl\fP +If \f2My.idl\fP also included \f2Another.idl\fP that resided in \f2/moreIncludes\fP, for example, then you would invoke the compiler with the following command: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-i /includes \-i /moreIncludes\fP My.idl +.fl +.fi + +.LP +.LP +Since this form of include can become irritatingly long, another means of indicating to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named \f2idl.config\fP in a directory that is listed in your CLASSPATH. Inside of \f2idl.config\fP, provide a line with the following form: +.LP +.nf +\f3 +.fl +includes=/includes;/moreIncludes +.fl +\fP +.fi + .LP -Since this form of include can become irritatingly long, another means of indicating to the compiler where to search for included files is provided. This technique is similar to the idea of an environment variable. Create a file named \f2idl.config\fP in a directory that is listed in your CLASSPATH. Inside of \f2idl.config\fP, provide a line with the following form: \f2includes=/includes;/moreIncludes\fP .LP The compiler will find this file and read in the includes list. Note that in this example the separator character between the two directories is a semicolon (;). This separator character is platform dependent. On the Windows platform, use a semicolon, on the Unix platform, use a colon, etc. For more information on \f2includes\fP, see the .na \f2Setting the Classpath\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#general. -.RE +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general. +.LP .SS Emitting Bindings for Include Files .LP -.RS 3 +.LP +By default, only those interfaces, structs, etc, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files: +.LP .LP -By default, only those interfaces, structs, etc, that are defined in the idl file on the command line have Java bindings generated for them. The types defined in included files are not generated. For example, assume the following two idl files: \f4My.idl\fP .LP -\f2#include <MyOther.idl>\fP -.br -\f2interface My\fP -.br -\f2{\fP -.br -\f2};\fP -.br -\f4MyOther.idl\fP +\f4My.idl\fP .LP -\f2interface MyOther\fP -.br -\f2{\fP -.br -\f2};\fP\ +.nf +\f3 +.fl +#include <MyOther.idl> +.fl +interface My +.fl +{ +.fl +}; +.fl +\fP +.fi + .LP -The following command will only generate the java bindings for \f2My\fP: \f2idlj My.idl\fP + .LP -To generate all of the types in \f2My.idl\fP and all of the types in the files that \f2My.idl\fP includes (in this example, \f2MyOther.idl\fP), use the following command: \f2idlj \fP\f4\-emitAll\fP\f2 My.idl\fP .LP -There is a caveat to the default rule. \f2#include\fP statements which appear at global scope are treated as described. These \f2#include\fP statements can be thought of as import statements. \f2#include\fP statements which appear within some enclosing scope are treated as true \f2#include\fP statements, meaning that the code within the included file is treated as if it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example: \f4My.idl\fP +\f4MyOther.idl\fP .LP -\f2#include <MyOther.idl>\fP -.br -\f2interface My\fP -.br -\f2{\fP -.br -\f2\ #include <Embedded.idl>\fP -.br -\f2};\ \fP \f4MyOther.idl\fP +.nf +\f3 +.fl +interface MyOther +.fl +{ +.fl +}; +.fl +\fP +.fi + .LP -\f2interface MyOther\fP -.br -\f2{\fP -.br -\f2};\ \fP \f4Embedded.idl\fP + .LP -\f2enum E {one, two, three};\fP\ .LP -Running the following command: \f2idlj My.idl\fP +The following command will only generate the java bindings for \f2My\fP: +.LP +.nf +\f3 +.fl +idlj My.idl +.fl +\fP +.fi + +.LP +.LP +To generate all of the types in \f2My.idl\fP and all of the types in the files that \f2My.idl\fP includes (in this example, \f2MyOther.idl\fP), use the following command: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-emitAll\fP My.idl +.fl +.fi + .LP -will generate the following list of Java files: \f2./MyHolder.java\fP -.br -\f2./MyHelper.java\fP -.br -\f2./_MyStub.java\fP -.br -\f2./MyPackage\fP -.br -\f2./MyPackage/EHolder.java\fP -.br -\f2./MyPackage/EHelper.java\fP -.br -\f2./MyPackage/E.java\fP -.br -\f2./My.java\fP .LP -Notice that \f2MyOther.java\fP was not generated because it is defined in an import\-like \f2#include\fP. But \f2E.java\fP \f2was\fP generated because it was defined in a true \f2#include\fP. Also notice that since \f2Embedded.idl\fP was included within the scope of the interface \f2My\fP, it appears within the scope of \f2My\fP (that is,in \f2MyPackage\fP). +There is a caveat to the default rule. \f2#include\fP statements which appear at global scope are treated as described. These \f2#include\fP statements can be thought of as import statements. \f2#include\fP statements which appear within some enclosing scope are treated as true \f2#include\fP statements, meaning that the code within the included file is treated as if it appeared in the original file and, therefore, Java bindings are emitted for it. Here is an example: +.LP + +.LP +.LP +\f4My.idl\fP +.LP +.nf +\f3 +.fl +#include <MyOther.idl> +.fl +interface My +.fl +{ +.fl + #include <Embedded.idl> +.fl +}; +.fl +\fP +.fi + +.LP + +.LP +.LP +\f4MyOther.idl\fP +.LP +.nf +\f3 +.fl +interface MyOther +.fl +{ +.fl +}; +.fl +\fP +.fi + +.LP + +.LP +.LP +\f4Embedded.idl\fP +.LP +.nf +\f3 +.fl +enum E {one, two, three}; +.fl +\fP +.fi + +.LP + +.LP +.LP +Running the following command: +.LP +.nf +\f3 +.fl +idlj My.idl +.fl +\fP +.fi + +.LP +.LP +will generate the following list of Java files: +.LP +.nf +\f3 +.fl +./MyHolder.java +.fl +./MyHelper.java +.fl +./_MyStub.java +.fl +./MyPackage +.fl +./MyPackage/EHolder.java +.fl +./MyPackage/EHelper.java +.fl +./MyPackage/E.java +.fl +./My.java +.fl +\fP +.fi + +.LP +.LP +Notice that \f2MyOther.java\fP was not generated because it is defined in an import\-like \f2#include\fP. But \f2E.java\fP \f2was\fP generated because it was defined in a true \f2#include\fP. Also notice that since \f2Embedded.idl\fP was included within the scope of the interface \f2My\fP, it appears within the scope of \f2My\fP (that is,in \f2MyPackage\fP). +.LP .LP If the \f2\-emitAll\fP flag had been used in the previous example, then all types in all included files would be emitted. .LP -.RE .SS Inserting Package Prefixes .LP -.RS 3 +.LP +Suppose that you work for a company named ABC that has constructed the following IDL file: +.LP .LP -Suppose that you work for a company named ABC that has constructed the following IDL file: -.br -\f4Widgets.idl\fP .LP -\f2module Widgets\fP -.br -\f2{\fP -.br -\f2\ interface W1 {...};\fP -.br -\f2\ interface W2 {...};\fP -.br -\f2};\fP\ +\f4Widgets.idl\fP .LP -Running this file through the IDL\-to\-Java compiler will place the Java bindings for \f2W1\fP and \f2W2\fP within the package \f2Widgets\fP. But there is an industry convention that states that a company's packages should reside within a package named \f2com.<company name>\fP. The \f2Widgets\fP package is not good enough. To follow convention, it should be \f2com.abc.Widgets\fP. To place this package prefix onto the \f2Widgets\fP module, execute the following: \f2idlj \fP\f4\-pkgPrefix Widgets com.abc\fP\f2 Widgets.idl\fP +.nf +\f3 +.fl +module Widgets +.fl +{ +.fl + interface W1 {...}; +.fl + interface W2 {...}; +.fl +}; +.fl +\fP +.fi + +.LP + +.LP +.LP +Running this file through the IDL\-to\-Java compiler will place the Java bindings for \f2W1\fP and \f2W2\fP within the package \f2Widgets\fP. But there is an industry convention that states that a company's packages should reside within a package named \f2com.<company name>\fP. The \f2Widgets\fP package is not good enough. To follow convention, it should be \f2com.abc.Widgets\fP. To place this package prefix onto the \f2Widgets\fP module, execute the following: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-pkgPrefix Widgets com.abc\fP Widgets.idl +.fl +.fi + +.LP +.LP +If you have an IDL file which includes \f2Widgets.idl\fP, the \f2\-pkgPrefix\fP flag must appear in that command also. If it does not, then your IDL file will be looking for a \f2Widgets\fP package rather than a \f2com.abc.Widgets\fP package. .LP -If you have an IDL file which includes \f2Widgets.idl\fP, the \f2\-pkgPrefix\fP flag must appear in that command also. If it does not, then your IDL file will be looking for a \f2Widgets\fP package rather than a \f2com.abc.Widgets\fP package. .LP If you have a number of these packages that require prefixes, it might be easier to place them into the \f2idl.config\fP file described above. Each package prefix line should be of the form: .LP -\f2PkgPrefix.<type>=<prefix>\fP +.nf +\f3 +.fl +PkgPrefix.<type>=<prefix> +.fl +\fP +.fi + .LP -So the line for the above example would be: \f2PkgPrefix.Widgets=com.abc\fP +So the line for the above example would be: +.nf +\f3 +.fl +PkgPrefix.Widgets=com.abc +.fl +\fP +.fi + .LP .LP The use of this option does not affect the Repository ID. .LP -.RE .SS Defining Symbols Before Compilation .LP -.RS 3 +.LP +You may need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command +.LP +.nf +\f3 +.fl +idlj \fP\f3\-d\fP MYDEF My.idl +.fl +.fi .LP -You may need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings. The command \f2idlj \fP\f4\-d\fP\f2 MYDEF My.idl\fP .LP is the equivalent of putting the line \f2#define MYDEF\fP inside \f2My.idl\fP. -.RE +.LP .SS Preserving Pre\-Existing Bindings .LP -.RS 3 +.LP +If the Java binding files already exist, the \f2\-keep\fP flag will keep the compiler from overwriting them. The default is to generate all files without considering if they already exist. If you've customized those files (which you should not do unless you are very comfortable with their contents), then the \f2\-keep\fP option is very useful. The command +.LP +.nf +\f3 +.fl +idlj \fP\f3\-keep\fP My.idl +.fl +.fi .LP -If the Java binding files already exist, the \f2\-keep\fP flag will keep the compiler from overwriting them. The default is to generate all files without considering if they already exist. If you've customized those files (which you should not do unless you are very comfortable with their contents), then the \f2\-keep\fP option is very useful. The command \f2idlj \fP\f4\-keep\fP\f2 My.idl\fP .LP -emit all client\-side bindings that do not already exist. -.RE +emits all client\-side bindings that do not already exist. +.LP .SS Viewing Progress of Compilation .LP -.RS 3 +.LP +The IDL\-to\-Java compiler will generate status messages as it progresses through its phases of execution. Use the \f2\-v\fP option to activate this "verbose" mode: +.LP +.nf +\f3 +.fl +idlj \fP\f3\-v\fP My.idl +.fl +.fi .LP -The IDL\-to\-Java compiler will generate status messages as it progresses through its phases of execution. Use the \f2\-v\fP option to activate this "verbose" mode: \f2idlj \fP\f4\-v\fP\f2 My.idl\fP .LP By default the compiler does not operate in verbose mode. -.RE +.LP .SS Displaying Version Information -.LP -.RS 3 - .LP .LP To display the build version of the IDL\-to\-Java compiler, specify the \f2\-version\fP option on the command\-line: .LP -.LP -\f2idlj \-version\fP +.nf +\f3 +.fl +idlj \-version +.fl +\fP +.fi + .LP .LP Version information also appears within the bindings generated by the compiler. Any additional options appearing on the command\-line are ignored. .LP -.RE .SH "Options" -.LP - .LP .RS 3 .TP 3 \-d symbol This is equivalent to the following line in an IDL file: -.RS 3 - -.LP .nf \f3 .fl @@ -386,7 +620,6 @@ This is equivalent to the following line in an IDL file: .fl \fP .fi -.RE .TP 3 \-emitAll Emit all types, including those found in \f2#include\fP files. @@ -410,8 +643,9 @@ Generates skeletons compatible with pre\-1.4 JDK ORBs. By default, the POA Inher Wherever \f2type\fP is encountered at file scope, prefix the generated Java package name with \f2prefix\fP for all files generated for that type. The \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module. .TP 3 \-pkgTranslate type package -Whenever the module name \f2type\fP is encountered in an identifier, replace it in the identifier with \f2package\fP for all files in the generated Java package. Note that \f2pkgPrefix\fP changes are made first. \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module, and must match the full package name exactly. -.LP +Whenever the module name \f2type\fP is encountered in an identifier, replace it in the identifier with \f2package\fP for all files in the generated Java package. Note that \f2pkgPrefix\fP changes are made first. \f2type\fP is the simple name of either a top\-level module, or an IDL type defined outside of any module, and must match the full package name exactly. +.br +.br If more than one translation matches an identifier, the longest match is chosen. For example, if the arguments include: .nf \f3 @@ -420,7 +654,6 @@ If more than one translation matches an identifier, the longest match is chosen. .fl \fP .fi -.LP The following translations would occur: .nf \f3 @@ -435,7 +668,6 @@ foo.baz.bar => buzz.fizz.bar .fl \fP .fi -.LP The following package names cannot be translated: .RS 3 .TP 2 @@ -445,8 +677,7 @@ o o \f2org.omg\fP or any subpackages of \f2org.omg\fP .RE -.LP -Any attempt to translate these packages will result in uncompilable code, and the use of these packages as the first argument after \f2\-pkgTranslate\fP will be treated as an error. +Any attempt to translate these packages will result in uncompilable code, and the use of these packages as the first argument after \f2\-pkgTranslate\fP will be treated as an error. .TP 3 \-skeletonName xxx%yyy Use \f2xxx%yyy\fP as the pattern for naming the skeleton. The defaults are: @@ -481,10 +712,10 @@ Display version information and terminate. .RE .LP -See the Description section for more option information. -.SH "Restrictions:" .LP - +See the Description section for more option information. +.LP +.SH "Restrictions:" .LP .RS 3 .TP 2 @@ -497,8 +728,6 @@ The \f2fixed\fP IDL type is not supported. .LP .SH "Known Problems:" -.LP - .LP .RS 3 .TP 2 diff --git a/src/solaris/doc/sun/man/man1/jar.1 b/src/solaris/doc/sun/man/man1/jar.1 index acf3ba727e1550e5d7235b17b9562bbe997cf9ff..cd59f0aa1d3b41179901288c4e4cb4ba931252d9 100644 --- a/src/solaris/doc/sun/man/man1/jar.1 +++ b/src/solaris/doc/sun/man/man1/jar.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,16 +19,14 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jar 1 "02 Jun 2010" +.TH jar 1 "10 May 2011" .LP .SH "Name" jar\-The Java Archive Tool .LP -\f3jar\fP combines multiple files into a single JAR archive file. +\f3jar\fP combines multiple files into a single JAR archive file. .SH "SYNOPSIS" -.LP - .LP .RS 3 .TP 3 @@ -51,9 +49,6 @@ Add index to jar file .LP .LP where: -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -80,10 +75,7 @@ Option to be passed into the Java runtime environment. (There must be no space b .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP The \f3jar\fP tool combines multiple files into a single JAR archive file. \f3jar\fP is a general\-purpose archiving and compression tool, based on ZIP and the .na @@ -92,9 +84,6 @@ The \f3jar\fP tool combines multiple files into a single JAR archive file. \f3ja http://www.gzip.org/zlib/ compression format. However, \f3jar\fP was designed mainly package java applets or applications into a single archive. When the components of an applet or application (files, images and sounds) are combined into a single archive, they can be downloaded by a java agent (like a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. \f3jar\fP also compresses files and so further improves download time. In addition, it allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. The syntax for the jar tool is almost identical to the syntax for the \f2tar\fP command. A \f3jar\fP archive can be used as a class path entry, whether or not it is compressed. .LP Typical usage to combine files into a jar file is: -.LP -.RS 3 - .LP .nf \f3 @@ -103,19 +92,15 @@ Typical usage to combine files into a jar file is: .fl \fP .fi -.RE .LP In this example, all the class files in the current directory are placed into the file named \f2myFile.jar\fP. The jar tool automatically generates a manifest file entry named \f2META\-INF/MANIFEST.MF\fP. It is always the first entry in the jar file. The manifest file declares meta\-information about the archive, and stores that data as \f2name\ :\ value\fP pairs. Refer to the .na \f2JAR file specification\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest for details explaining how the jar tool stores meta\-information in the manifest file. +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR%20Manifest for details explaining how the jar tool stores meta\-information in the manifest file. .LP If a jar file should include \f2name\ :\ value\fP pairs contained in an existing manifest file, specify that file using the \f2\-m\fP option: -.LP -.RS 3 - .LP .nf \f3 @@ -124,7 +109,6 @@ If a jar file should include \f2name\ :\ value\fP pairs contained in an existing .fl \fP .fi -.RE .LP An existing manifest file must end with a new line character.\ \f3jar\fP does not parse the last line of a manifest file if it does not end with a new line character. @@ -135,9 +119,6 @@ An existing manifest file must end with a new line character.\ \f3jar\fP does n .LP \f3Note:\ \fP A jar command that specifies \f2cfm\fP on the command line instead of \f2cmf\fP (the order of the m and \-f options are reversed), the \f3jar\fP command line must specify the name of the jar archive first, followed by the name of the manifest file: -.RS 3 - -.LP .nf \f3 .fl @@ -145,15 +126,11 @@ An existing manifest file must end with a new line character.\ \f3jar\fP does n .fl \fP .fi -.RE .LP The manifest is in a text format inspired by RFC822 ASCII format, so it is easy to view and process manifest\-file contents. .LP To extract the files from a jar file, use \f2x\fP: -.LP -.RS 3 - .LP .nf \f3 @@ -162,14 +139,10 @@ To extract the files from a jar file, use \f2x\fP: .fl \fP .fi -.RE .LP .LP To extract individual files from a jar file, supply their filenames: -.LP -.RS 3 - .LP .nf \f3 @@ -178,7 +151,6 @@ To extract individual files from a jar file, supply their filenames: .fl \fP .fi -.RE .LP .LP @@ -186,10 +158,7 @@ Beginning with version 1.3 of the JDK, the \f2jar\fP utility supports .na \f2JarIndex\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index, which allows application class loaders to load classes more efficiently from jar files. If an application or applet is bundled into multiple jar files,\ only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running \f2jar\fP with the \f2\-i\fPoption. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the \f2Class\-Path\fP attribute of the main jar file's manifest. -.LP -.RS 3 - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Index, which allows application class loaders to load classes more efficiently from jar files. If an application or applet is bundled into multiple jar files,\ only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running \f2jar\fP with the \f2\-i\fPoption. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the \f2Class\-Path\fP attribute of the main jar file's manifest. .LP .nf \f3 @@ -198,7 +167,6 @@ http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index, whi .fl \fP .fi -.RE .LP .LP @@ -209,9 +177,6 @@ The application class loader uses the information stored in this file for effici .br .br To copy directories, first compress files in \f2dir1\fP to \f2stdout\fP, then extract from \f2stdin\fP to \f2dir2\fP (omitting the \f2\-f\fP option from both \f2jar\fP commands): -.LP -.RS 3 - .LP .nf \f3 @@ -220,7 +185,6 @@ To copy directories, first compress files in \f2dir1\fP to \f2stdout\fP, then ex .fl \fP .fi -.RE .LP .LP @@ -228,11 +192,9 @@ To review command samples which use \f2jar\fP to opeate on jar files and jar fil .na \f2Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar. +http://download.oracle.com/javase/tutorial/deployment/jar. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -241,9 +203,6 @@ Creates a new archive file named \f2jarfile\fP (if \f2f\fP is specified) or to s .TP 3 u Updates an existing file \f2jarfile\fP (when \f2f\fP is specified) by adding to it files and directories specified by \f2inputfiles\fP. For example: -.RS 3 - -.LP .nf \f3 .fl @@ -251,11 +210,7 @@ jar uf foo.jar foo.class .fl \fP .fi -.RE would add the file \f2foo.class\fP to the existing jar file \f2foo.jar\fP. The \f2\-u\fP option can also update the manifest entry, as given by this example: -.RS 3 - -.LP .nf \f3 .fl @@ -263,7 +218,6 @@ jar umf manifest foo.jar .fl \fP .fi -.RE updates the \f2foo.jar\fP manifest with the \f2name : value\fP pairs in \f2manifest\fP. .TP 3 x @@ -274,9 +228,6 @@ Lists the table of contents from \f2jarfile\fP (if \f2f\fP is specified) or stan .TP 3 i Generate index information for the specified \f2jarfile\fP and its dependent jar files. For example: -.RS 3 - -.LP .nf \f3 .fl @@ -284,9 +235,8 @@ jar i foo.jar .fl \fP .fi -.RE .LP -would generate an \f2INDEX.LIST\fP file in \f2foo.jar\fP which contains location information for each package in \f2foo.jar\fP and all the jar files specified in the \f2Class\-Path\fP attribute of \f2foo.jar\fP. See the index example. +would generate an \f2INDEX.LIST\fP file in \f2foo.jar\fP which contains location information for each package in \f2foo.jar\fP and all the jar files specified in the \f2Class\-Path\fP attribute of \f2foo.jar\fP. See the index example. .TP 3 f Specifies the file \f2jarfile\fP to be created (\f2c\fP), updated (\f2u\fP), extracted (\f2x\fP), indexed (\f2i\fP), or viewed (\f2t\fP). The \f2\-f\fP option and filename \f2jarfile\fP are a pair \-\- if present, they must both appear. Omitting \f2f\fP and \f2jarfile\fP accepts a jar file name from \f2stdin\fP(for x and t) or sends jar file to \f2stdout\fP (for c and u). @@ -301,12 +251,10 @@ M Do not create a manifest file entry (for c and u), or delete a manifest file entry if one exists (for u). .TP 3 m -Includes \f2name : value\fP attribute pairs from the specified manifest file \f2manifest\fP in the file at \f2META\-INF/MANIFEST.MF\fP. \f2jar\fP adds a \f2name\ :\ value\fP pair unless an entry already exists with the same name, in which case \f2jar\fP updates its value. -.LP +Includes \f2name : value\fP attribute pairs from the specified manifest file \f2manifest\fP in the file at \f2META\-INF/MANIFEST.MF\fP. \f2jar\fP adds a \f2name\ :\ value\fP pair unless an entry already exists with the same name, in which case \f2jar\fP updates its value. +.br +.br On the command line, the letters \f3m\fP and \f3f\fP must appear in the same order that \f2manifest\fP and \f2jarfile\fP appear. Example use: -.RS 3 - -.LP .nf \f3 .fl @@ -314,22 +262,18 @@ jar cmf myManifestFile myFile.jar *.class .fl \fP .fi -.RE You can add special\-purpose \f2name\ :\ value\fP attribute pairs to the manifest that aren't contained in the default manifest. For example, you can add attributes specifying vendor information, version information, package sealing, or to make JAR\-bundled applications executable. See the .na \f2JAR Files\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar/ trail in the Java Tutorial for examples of using the \f4\-m\fP option. -.LP +http://download.oracle.com/javase/tutorial/deployment/jar/ trail in the Java Tutorial for examples of using the \f4\-m\fP option. .TP 3 e Sets \f2entrypoint\fP as the application entry point for stand\-alone applications bundled into executable jar file. The use of this option creates or overrides the \f2Main\-Class\fP attribute value in the manifest file. This option can be used during creation of jar file or while updating the jar file. This option specifies the application entry point without editing or creating the manifest file. .br .br +.br For example, this command creates \f2Main.jar\fP where the \f2Main\-Class\fP attribute value in the manifest is set to \f2Main\fP: -.RS 3 - -.LP .nf \f3 .fl @@ -337,12 +281,7 @@ jar cfe Main.jar Main Main.class .fl \fP .fi -.RE -.LP The java runtime can directly invoke this application by running the following command: -.RS 3 - -.LP .nf \f3 .fl @@ -350,11 +289,7 @@ java \-jar Main.jar .fl \fP .fi -.RE If the entrypoint class name is in a package it may use either a dot (".") or slash ("/") character as the delimiter. For example, if \f2Main.class\fP is in a package called \f2foo\fP the entry point can be specified in the following ways: -.RS 3 - -.LP .nf \f3 .fl @@ -362,11 +297,7 @@ jar \-cfe Main.jar foo/Main foo/Main.class .fl \fP .fi -.RE or -.RS 3 - -.LP .nf \f3 .fl @@ -374,18 +305,13 @@ jar \-cfe Main.jar foo.Main foo/Main.class .fl \fP .fi -.RE -\f3Note:\ \fP specifying both \f2\-m\fP and \f2\-e\fP options together when the given manifest also contains the \f2Main\-Class\fP attribute results in an ambigous \f2Main.class\fP specification, leading to an error and the jar creation or update operation is aborted. -.LP +\f3Note:\ \fP specifying both \f2\-m\fP and \f2\-e\fP options together when the given manifest also contains the \f2Main\-Class\fP attribute results in an ambigous \f2Main.class\fP specification, leading to an error and the jar creation or update operation is aborted. .TP 3 -\-C \ dir +\-C\ dir Temporarily changes directories (\f2cd\fP\ \f2dir\fP) during execution of the \f2jar\fP command while processing the following \f2inputfiles\fP argument. Its operation is intended to be similar to the \f2\-C\fP option of the UNIX \f2tar\fP utility. .br .br For example, this command changes to the \f2classes\fP directory and adds the \f2bar.class\fP from that directory to \f2foo.jar\fP: -.RS 3 - -.LP .nf \f3 .fl @@ -393,11 +319,7 @@ jar uf foo.jar \-C classes bar.class .fl \fP .fi -.RE This command changes to the \f2classes\fP directory and adds to \f2foo.jar\fP all files within the \f2classes\fP directory (without creating a classes directory in the jar file), then changes back to the original directory before changing to the \f2bin\fP directory to add \f2xyz.class\fP to \f2foo.jar\fP. -.RS 3 - -.LP .nf \f3 .fl @@ -405,11 +327,7 @@ jar uf foo.jar \-C classes . \-C bin xyz.class .fl \fP .fi -.RE If \f2classes\fP holds files \f2bar1\fP and \f2bar2\fP, then here's what the jar file will contain using \f2jar tf foo.jar\fP: -.RS 3 - -.LP .nf \f3 .fl @@ -425,7 +343,6 @@ xyz.class .fl \fP .fi -.RE .LP .TP 3 \-Joption @@ -434,8 +351,6 @@ Pass \f2option\fP to the Java runtime environment, where \f2option\fP is one of .LP .SH "COMMAND LINE ARGUMENT FILES" -.LP - .LP To shorten or simplify the jar command line, you can specify one or more files that themselves contain arguments to the \f2jar\fP command (except \f2\-J\fP options). This enables you to create jar commands of any length, overcoming command line limits imposed by the operating system. .LP @@ -446,9 +361,6 @@ When executing \f2jar\fP, pass in the path and name of each argument file with t .br .br The example below, \f2classes.list\fP holds the names of files output by a \f2find\fP command: -.LP -.RS 3 - .LP .nf \f3 @@ -456,14 +368,10 @@ The example below, \f2classes.list\fP holds the names of files output by a \f2fi % find \fP\f3.\fP \-name '*.class' \-print > classes.list .fl .fi -.RE .LP .LP You can then execute the \f2jar\fP command on \f2Classes.list\fP by passing it to \f2jar\fP using argfile syntax: -.LP -.RS 3 - .LP .nf \f3 @@ -472,13 +380,9 @@ You can then execute the \f2jar\fP command on \f2Classes.list\fP by passing it t .fl \fP .fi -.RE .LP An argument file can specify a path, but any filenames inside the argument file that have relative paths are relative to the current working directory, not to the path passed in. Here is an example: -.RS 3 - -.LP .nf \f3 .fl @@ -486,20 +390,14 @@ An argument file can specify a path, but any filenames inside the argument file .fl \fP .fi -.RE .LP .LP .LP .SH "EXAMPLES" -.LP - .LP To add all the files in a particular directory to an archive (overwriting contents if the archive already exists). Enumerating verbosely (with the \f2\-v\fP option) will tell you more information about the files in the archive, such as their size and last modified date. -.RS 3 - -.LP .nf \f3 .fl @@ -535,13 +433,9 @@ adding: spacemusic.au(in = 3079) (out= 73)(deflated 97%) .fl \fP .fi -.RE .LP If you already have separate subdirectories for images, audio files and classes, you can combine them into a single jar file: -.RS 3 - -.LP .nf \f3 .fl @@ -585,13 +479,9 @@ audio/ bundle.jar classes/ images/ .fl \fP .fi -.RE .LP To see the entry names in the jarfile, use the \f2t\fP option: -.RS 3 - -.LP .nf \f3 .fl @@ -619,7 +509,6 @@ images/at_work.gif .fl \fP .fi -.RE .LP .LP @@ -629,9 +518,6 @@ To add an index file to the jar file for speeding up class loading, use the \f2i Example: .br -.LP -.RS 3 - .LP If you split the inter\-dependent classes for a stock trade application into three jar files: \f2main.jar\fP, \f2buy.jar\fP, and \f2sell.jar\fP. .br @@ -660,38 +546,34 @@ then you can use the \f2\-i\fP option to speed up the class loading time for you .fi .LP -An \f2INDEX.LIST\fP file is inserted to the \f2META\-INF\fP directory. This enables the application class loader to download the specified jar files when it is searching for classes or resources. -.RE +An \f2INDEX.LIST\fP file is inserted to the \f2META\-INF\fP directory. This enables the application class loader to download the specified jar files when it is searching for classes or resources. .SH "SEE ALSO" .LP - .LP .na \f2The Jar Overview\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jarGuide.html -.br - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jarGuide.html +.LP .LP .na \f2The Jar File Specification\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html -.br - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html +.LP .LP .na \f2The JarIndex Spec\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index -.br - +http://download.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Index +.LP .LP .na \f2Jar Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar on the Java Software web site. -.br - +http://download.oracle.com/javase/tutorial/deployment/jar/index.html +.LP +.LP +pack200(1) .LP -pack200(1) + diff --git a/src/solaris/doc/sun/man/man1/jarsigner.1 b/src/solaris/doc/sun/man/man1/jarsigner.1 index 090edd2938ef3f85f203a9e099c1437c440635fd..b2f7777af3cd154418925ac5a88781d0020694dc 100644 --- a/src/solaris/doc/sun/man/man1/jarsigner.1 +++ b/src/solaris/doc/sun/man/man1/jarsigner.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jarsigner 1 "02 Jun 2010" +.TH jarsigner 1 "10 May 2011" .LP .SH "Name" jarsigner \- JAR Signing and Verification Tool -.LP -.RS 3 - .LP .LP Generates signatures for Java ARchive (JAR) files, and verifies the signatures of signed JAR files. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -50,8 +44,6 @@ Generates signatures for Java ARchive (JAR) files, and verifies the signatures o The jarsigner \-verify command can take zero or more keystore alias names after the jar filename. When specified, jarsigner will check 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 \-keystore, or the default keystore. .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jarsigner\fP tool is used for two purposes: @@ -108,9 +100,6 @@ The default \f3jarsigner\fP behavior is to \f2sign\fP a JAR (or zip) file. Use t .LP .SS Keystore Aliases -.LP -.RS 3 - .LP .LP All keystore entities are accessed via unique \f2aliases\fP. @@ -121,23 +110,19 @@ When using \f3jarsigner\fP to sign a JAR file, you must specify the alias for th .nf \f3 .fl - jarsigner \-keystore /working/mystore \-storepass myspass + jarsigner \-keystore /working/mystore \-storepass \fP\f4<keystore password>\fP\f3 .fl - \-keypass dukekeypasswd MyJARFile.jar duke + \-keypass \fP\f4<private key password>\fP\f3 MyJARFile.jar duke .fl \fP .fi .LP .LP -Keystores are protected with a password, so the store password (in this case "myspass") must be specified. You will be prompted for it if you don't specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password (in this case "dukekeypasswd") must be specified, and you will be prompted for it if you don't specify it on the command line and it isn't the same as the store password. +Keystores are protected with a password, so the store password must be specified. You will be prompted for it if you don't specify it on the command line. Similarly, private keys are protected in a keystore with a password, so the private key's password must be specified, and you will be prompted for it if you don't specify it on the command line and it isn't the same as the store password. .LP -.RE .SS Keystore Location -.LP -.RS 3 - .LP .LP \f3jarsigner\fP has a \f2\-keystore\fP option for specifying the URL of the keystore to be used. The keystore is by default stored in a file named \f2.keystore\fP in the user's home directory, as determined by the \f2user.home\fP system property. On Solaris systems \f2user.home\fP defaults to the user's home directory. @@ -145,12 +130,8 @@ Keystore Location .LP Note that the input stream from the \f2\-keystore\fP option is passed to the \f2KeyStore.load\fP method. If \f2NONE\fP is specified as the URL, then a null stream is passed to the \f2KeyStore.load\fP method. \f2NONE\fP should be specified if the \f2KeyStore\fP is not file\-based, for example, if it resides on a hardware token device. .LP -.RE .SS Keystore Implementation -.LP -.RS 3 - .LP .LP The \f2KeyStore\fP class provided in the \f2java.security\fP 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 \f2type\fP of keystore. @@ -166,13 +147,13 @@ Keystore implementations are provider\-based. More specifically, the application .na \f2How to Implement a Provider for the Java Cryptography Architecture\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/HowToImplAProvider.html. .LP .LP Applications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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 are not compatible. .LP .LP -\f3keytool\fP works on any file\-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. +\f3keytool\fP works on any file\-based keystore implementation. (It treats the keystore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. .LP .LP For \f3jarsigner\fP and \f3keytool\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Change Keystore" command in the Edit menu. @@ -227,40 +208,35 @@ Note that if you us the PKCS#11 provider package, you should refer to the .na \f2KeyTool and JarSigner\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/p11guide.html#KeyToolJarSigner section of the Java PKCS#11 Reference Guide for details. +http://download.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html#KeyToolJarSigner section of the Java PKCS#11 Reference Guide for details. .LP -.RE .SS Supported Algorithms -.LP -.RS 3 - .LP .LP -By default, \f3jarsigner\fP signs a JAR file using either +By default, \f3jarsigner\fP signs a JAR file using one of the following: .LP .RS 3 .TP 2 o -DSA (Digital Signature Algorithm) with the SHA\-1 digest algorithm, or +DSA (Digital Signature Algorithm) with the SHA1 digest algorithm +.TP 2 +o +RSA algorithm with the SHA256 digest algorithm. .TP 2 o -the RSA algorithm with the SHA\-256 digest algorithm. +EC (Elliptic Curve) cryptography algorithm with the SHA256 with ECDSA (Elliptic Curve Digital Signature Algorithm). .RE .LP .LP -That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm. +That is, if the signer's public and private keys are DSA keys, \f3jarsigner\fP will sign the JAR file using the "SHA1withDSA" algorithm. If the signer's keys are RSA keys, \f3jarsigner\fP will attempt to sign the JAR file using the "SHA256withRSA" algorithm. If the signer's keys are EC keys, \f3jarsigner\fP will sign the JAR file using the "SHA256withECDSA" algorithm. .LP .LP These default signature algorithms can be overridden using the \f2\-sigalg\fP option. .LP -.RE .SS The Signed JAR File -.LP -.RS 3 - .LP .LP When \f3jarsigner\fP 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: @@ -271,7 +247,7 @@ o a signature file, with a .SF extension, and .TP 2 o -a signature block file, with a .DSA extension. +a signature block file, with a .DSA, .RSA, or .EC extension. .RE .LP @@ -281,22 +257,19 @@ The base file names for these two files come from the value of the \f2\-sigFile\ .nf \f3 .fl - \-sigFile MKSIGN +\-sigFile MKSIGN .fl \fP .fi .LP .LP -the files are named "MKSIGN.SF" and "MKSIGN.DSA". +The files are named "MKSIGN.SF" and "MKSIGN.DSA". .LP .LP If no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not allowed in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. Legal characters include letters, digits, underscores, and hyphens. .LP \f3The Signature (.SF) File\fP -.LP -.RS 3 - .LP .LP A signature file (the .SF file) looks similar to the manifest file that is always included in a JAR file when \f3jarsigner\fP is used to sign the file. That is, for each source file included in the JAR file, the .SF file has three lines, just as in the manifest file, listing the following: @@ -320,25 +293,14 @@ In the manifest file, the SHA digest value for each source file is the digest (h .LP The signature file also, by default, includes a header containing a hash of the whole manifest file. The presence of the header enables verification optimization, as described in JAR File Verification. .LP -.RE -\f3The Signature Block (.DSA) File\fP -.LP -.RS 3 - -.LP +\f3The Signature Block File\fP .LP -The .SF file is signed and the signature is placed in the .DSA file. The .DSA file also contains, encoded inside it, the certificate or certificate chain from the keystore which authenticates the public key corresponding to the private key used for signing. -.LP -.RE -.RE +The .SF 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 which authenticates the public key corresponding to the private key used for signing. The file has the extension .DSA, .RSA, or .EC depending on the digest algorithm used. .SS Signature Timestamp -.LP -.RS 3 - .LP .LP -\f2jarsigner\fP tool can now generate and store a signature timestamp when signing a JAR file. In addition, \f2jarsigner\fP supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options: +\f2jarsigner\fP tool can generate and store a signature timestamp when signing a JAR file. In addition, \f2jarsigner\fP supports alternative signing mechanisms. This behavior is optional and is controlled by the user at the time of signing through these options: .LP .RS 3 .TP 2 @@ -359,12 +321,8 @@ o .LP Each of these options is detailed in the Options section below. .LP -.RE .SS JAR File Verification -.LP -.RS 3 - .LP .LP A successful JAR file verification occurs if the signature(s) are valid, and none of the files that were in the JAR file when the signatures were generated have been changed since then. JAR file verification involves the following steps: @@ -372,18 +330,22 @@ A successful JAR file verification occurs if the signature(s) are valid, and non .RS 3 .TP 3 1. -Verify the signature of the .SF file itself. -.LP -That is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with. +Verify the signature of the .SF file itself. +.br +.br +That is, the verification ensures that the signature stored in each signature block (.DSA) file was in fact generated using the private key corresponding to the public key whose certificate (or certificate chain) also appears in the .DSA file. It also ensures that the signature is a valid signature of the corresponding signature (.SF) file, and thus the .SF file has not been tampered with. .TP 3 2. -Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest. -.LP -The .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step. -.LP -If that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File). -.LP -One reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the \f2jar\fP tool) after the signature (and thus the .SF file) was generated. When the \f2jar\fP tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non\-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file. +Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest. +.br +.br +The .SF file by default includes a header containing a hash of the entire manifest file. When the header is present, then the verification can check to see whether or not the hash in the header indeed matches the hash of the manifest file. If that is the case, verification proceeds to the next step. +.br +.br +If that is not the case, a less optimized verification is required to ensure that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file (see The Signature (.SF) File). +.br +.br +One reason the hash of the manifest file that is stored in the .SF file header may not equal the hash of the current manifest file would be because one or more files were added to the JAR file (using the \f2jar\fP tool) after the signature (and thus the .SF file) was generated. When the \f2jar\fP tool is used to add files, the manifest file is changed (sections are added to it for the new files), but the .SF file is not. A verification is still considered successful if none of the files that were in the JAR file when the signature was generated have been changed since then, which is the case if the hashes in the non\-header sections of the .SF file equal the hashes of the corresponding sections in the manifest file. .TP 3 3. Read each file in the JAR file that has an entry in the .SF file. While reading, compute the file's digest, and then compare the result with the digest for this file in the manifest section. The digests should be the same, or verification fails. @@ -393,12 +355,8 @@ Read each file in the JAR file that has an entry in the .SF file. While reading, .LP If any serious verification failures occur during the verification process, the process is stopped and a security exception is thrown. It is caught and displayed by \f3jarsigner\fP. .LP -.RE .SS Multiple Signatures for a JAR File -.LP -.RS 3 - .LP .LP A JAR file can be signed by multiple people simply by running the \f3jarsigner\fP tool on the file multiple times, specifying the alias for a different person each time, as in: @@ -435,10 +393,7 @@ When a JAR file is signed multiple times, there are multiple .SF and .DSA files .LP Note: It is also possible for a JAR file to have mixed signatures, some generated by the JDK 1.1 \f3javakey\fP tool and others by \f3jarsigner\fP. That is, \f3jarsigner\fP can be used to sign JAR files already previously signed using \f3javakey\fP. .LP -.RE .SH "OPTIONS" -.LP - .LP .LP The various \f3jarsigner\fP options are listed and described below. Note: @@ -462,12 +417,15 @@ The \f2\-keystore\fP, \f2\-storepass\fP, \f2\-keypass\fP, \f2\-sigfile\fP, \f2\- .RS 3 .TP 3 \-keystore url -Specifies the URL that tells the keystore location. This defaults to the file \f2.keystore\fP in the user's home directory, as determined by the "user.home" system property. -.LP -A keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default). -.LP -A keystore is \f2not\fP required when verifying, but if one is specified, or the default exists, and the \f2\-verbose\fP option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore. -.LP +Specifies the URL that tells the keystore location. This defaults to the file \f2.keystore\fP in the user's home directory, as determined by the "user.home" system property. +.br +.br +A keystore is required when signing, so you must explicitly specify one if the default keystore does not exist (or you want to use one other than the default). +.br +.br +A keystore is \f2not\fP required when verifying, but if one is specified, or the default exists, and the \f2\-verbose\fP option was also specified, additional information is output regarding whether or not any of the certificates used to verify the JAR file are contained in that keystore. +.br +.br Note: the \f2\-keystore\fP argument can actually be a file name (and path) specification rather than a URL, in which case it will be treated the same as a "file:" URL. That is, .nf \f3 @@ -494,79 +452,93 @@ o \f2\-storetype PKCS11\fP .RE For example, this command lists the contents of the configured PKCS#11 token: -.RS 3 - -.LP .nf \f3 .fl jarsigner \-keystore NONE \-storetype PKCS11 \-list .fl - -.fl \fP .fi -.RE .TP 3 \-storetype storetype -Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static \f2getDefaultType\fP method in \f2java.security.KeyStore\fP. -.LP -The PIN for a PCKS#11 token can also be specified using the \f2\-storepass\fP option. If none has been specified, keytool and jarsigner will 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 \f2\-protected\fP option must be specified and no password options can be specified. +Specifies the type of keystore to be instantiated. The default keystore type is the one that is specified as the value of the "keystore.type" property in the security properties file, which is returned by the static \f2getDefaultType\fP method in \f2java.security.KeyStore\fP. +.br +.br +The PIN for a PCKS#11 token can also be specified using the \f2\-storepass\fP option. If none has been specified, keytool and jarsigner will 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 \f2\-protected\fP option must be specified and no password options can be specified. .TP 3 -\-storepass password -Specifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for the password. -.LP -Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. +\-storepass[:env | :file] argument +Specifies the password which is required to access the keystore. This is only needed when signing (not verifying) a JAR file. In that case, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for the password. +.br +.br +If the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP. Otherwise, the password is retrieved as follows: +.RS 3 +.TP 2 +o +\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP +.TP 2 +o +\f2file\fP: Retrieve the password from the file named \f2argument\fP +.RE +Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. .TP 3 -\-keypass password -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 \f3jarsigner\fP to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it. -.LP -Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. Also, when typing in a password at the password prompt, the password is echoed (displayed exactly as typed), so be careful not to type it in front of anyone. +\-keypass[:env | :file] argument +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 \f3jarsigner\fP to sign a JAR file. If no password is provided on the command line, and the required password is different from the store password, the user is prompted for it. +.br +.br +If the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP. Otherwise, the password is retrieved as follows: +.RS 3 +.TP 2 +o +\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP +.TP 2 +o +\f2file\fP: Retrieve the password from the file named \f2argument\fP +.RE +Note: The password shouldn't be specified on the command line or in a script unless it is for testing purposes, or you are on a secure system. .TP 3 \-sigfile file -Specifies the base file name to be used for the generated .SF and .DSA files. For example, if \f2file\fP is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META\-INF" directory of the signed JAR file. -.LP -The characters in \f2file\fP must come from the set "a\-zA\-Z0\-9_\-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names. -.LP -If no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. +Specifies the base file name to be used for the generated .SF and .DSA files. For example, if \f2file\fP is "DUKESIGN", the generated .SF and .DSA files will be named "DUKESIGN.SF" and "DUKESIGN.DSA", and will be placed in the "META\-INF" directory of the signed JAR file. +.br +.br +The characters in \f2file\fP must come from the set "a\-zA\-Z0\-9_\-". That is, only letters, numbers, underscore, and hyphen characters are allowed. Note: All lowercase characters will be converted to uppercase for the .SF and .DSA file names. +.br +.br +If no \f2\-sigfile\fP option appears on the command line, the base file name for the .SF and .DSA files will be 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, the full alias name is used. If the alias name contains any characters that are not legal in a signature file name, each such character is converted to an underscore ("_") character in forming the file name. .TP 3 \-sigalg algorithm -.RS 3 - -.LP -Specifies the name of the signature algorithm to use to sign the JAR file. -.LP +Specifies the name of the signature algorithm to use to sign the JAR file. +.br +.br See .na \f2Appendix A\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA or SHA256withRSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. -.LP -.RE +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard signature algorithm names. This algorithm must be compatible with the private key used to sign the JAR file. If this option is not specified, SHA1withDSA, SHA256withRSA, or SHA256withECDSA will be used depending on the type of private key. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. .TP 3 \-digestalg algorithm -.RS 3 -Specifies the name of the message digest algorithm to use when digesting the entries of a jar file. -.LP +Specifies the name of the message digest algorithm to use when digesting the entries of a jar file. +.br +.br See .na \f2Appendix A\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA\-256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. -.LP -.RE +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the \f2\-providerClass\fP option, otherwise the command will not succeed. .TP 3 \-signedjar file -Specifies the name to be used for the signed JAR file. -.LP -If no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file. +Specifies the name to be used for the signed JAR file. +.br +.br +If no name is specified on the command line, the name used is the same as the input JAR file name (the name of the JAR file to be signed); in other words, that file is overwritten with the signed JAR file. .TP 3 \-verify -If this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)" -.LP -It is possible to verify JAR files signed using either \f3jarsigner\fP or the JDK 1.1 \f3javakey\fP tool, or both. -.LP -For further information on verification, see JAR File Verification. +If this appears on the command line, the specified JAR file will be verified, not signed. If the verification is successful, "jar verified" will be displayed. If you try to verify an unsigned JAR file, or a JAR file signed with an unsupported algorithm (e.g., RSA when you don't have an RSA provider installed), the following is displayed: "jar is unsigned. (signatures missing or not parsable)" +.br +.br +It is possible to verify JAR files signed using either \f3jarsigner\fP or the JDK 1.1 \f3javakey\fP tool, or both. +.br +.br +For further information on verification, see JAR File Verification. .TP 3 \-certs If this appears on the command line, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file. This information includes @@ -578,7 +550,6 @@ the name of the type of certificate (stored in the .DSA file) that certifies the o if the certificate is an X.509 certificate (more specifically, an instance of \f2java.security.cert.X509Certificate\fP): the distinguished name of the signer .RE -.LP The keystore is also examined. If no keystore value is specified on the command line, the default keystore file (if any) will be checked. If the public key certificate for a signer matches an entry in the keystore, then the following information will also be displayed: .RS 3 .TP 2 @@ -596,26 +567,25 @@ If this appears on the command line, it indicates "verbose" mode, which causes \ In the past, the .DSA (signature block) file generated when a JAR file was signed used to include a complete encoded copy of the .SF file (signature file) also generated. This behavior has been changed. To reduce the overall size of the output JAR file, the .DSA file by default doesn't contain a copy of the .SF file anymore. But if \f2\-internalsf\fP appears on the command line, the old behavior is utilized. \f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP .TP 3 \-sectionsonly -If this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does \f2not\fP include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File . -.LP -By default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. -.LP -For further information, see JAR File Verification. -.LP -\f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP +If this appears on the command line, the .SF file (signature file) generated when a JAR file is signed does \f2not\fP include a header containing a hash of the whole manifest file. It just contains information and hashes related to each individual source file included in the JAR file, as described in The Signature (.SF) File . +.br +.br +By default, this header is added, as an optimization. When the header is present, then whenever the JAR file is verified, the verification can first check to see whether or not the hash in the header indeed matches the hash of the whole manifest file. If so, verification proceeds to the next step. If not, it is necessary to do a less optimized verification that the hash in each source file information section in the .SF file equals the hash of its corresponding section in the manifest file. +.br +.br +For further information, see JAR File Verification. +.br +.br +\f3This option is mainly useful for testing; in practice, it should not be used, since doing so eliminates a useful optimization.\fP .TP 3 \-protected Either \f2true\fP or \f2false\fP. This value should be specified as \f2true\fP if a password must be given via a protected authentication path such as a dedicated PIN reader. -.RE -.RS 3 .TP 3 -\-provider provider\-class\-name -Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file, \f2java.security\fP. -.LP +\-providerClass provider\-class\-name +Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file, \f2java.security\fP. +.br +.br Used in conjunction with the \f2\-providerArg\fP \f2ConfigFilePath\fP option, keytool and jarsigner will install the provider dynamically (where \f2ConfigFilePath\fP is the path to the token configuration file). Here's an example of a command to list a PKCS#11 keystore when the Sun PKCS#11 provider has not been configured in the security properties file. -.RS 3 - -.LP .nf \f3 .fl @@ -629,19 +599,16 @@ jarsigner \-keystore NONE \-storetype PKCS11 \\ .fl \fP .fi -.RE .TP 3 \-providerName providerName -If more than one provider has been configured in the \f2java.security\fP security properties file, you can use the \f2\-providerName\fP option to target a specific provider instance. The argument to this option is the name of the provider. -.LP +If more than one provider has been configured in the \f2java.security\fP security properties file, you can use the \f2\-providerName\fP option to target a specific provider instance. The argument to this option is the name of the provider. +.br +.br For the Sun PKCS#11 provider, \f2providerName\fP is of the form \f2SunPKCS11\-\fP\f2TokenName\fP, where \f2TokenName\fP is the name suffix that the provider instance has been configured with, as detailed in the .na \f2configuration attributes table\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/p11guide.html#ATTRS. For example, the following command lists the contents of the PKCS#11 keystore provider instance with name suffix \f2SmartCard\fP: -.RS 3 - -.LP +http://download.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html#ATTRS. For example, the following command lists the contents of the PKCS#11 keystore provider instance with name suffix \f2SmartCard\fP: .nf \f3 .fl @@ -653,58 +620,59 @@ jarsigner \-keystore NONE \-storetype PKCS11 \\ .fl \fP .fi -.RE .TP 3 \-Jjavaoption -Passes through the specified \f2javaoption\fP string directly to the Java interpreter. (\f3jarsigner\fP is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type \f2java \-h\fP or \f2java \-X\fP at the command line. -.LP +Passes through the specified \f2javaoption\fP string directly to the Java interpreter. (\f3jarsigner\fP is actually a "wrapper" around the interpreter.) This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type \f2java \-h\fP or \f2java \-X\fP at the command line. .TP 3 \-tsa url -If \f2"\-tsa http://example.tsa.url"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, \f2http://example.tsa.url\fP, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the \f2\-tsacert\fP option. The \f2\-tsa\fP option does not require the TSA's public key certificate to be present in the keystore. -.LP +If \f2"\-tsa http://example.tsa.url"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The URL, \f2http://example.tsa.url\fP, identifies the location of the Time Stamping Authority (TSA). It overrides any URL found via the \f2\-tsacert\fP option. The \f2\-tsa\fP option does not require the TSA's public key certificate to be present in the keystore. +.br +.br To generate the timestamp, \f2jarsigner\fP communicates with the TSA using the Time\-Stamp Protocol (TSP) defined in .na \f2RFC 3161\fP @ .fi -http://www.ietf.org/rfc/rfc3161.txt. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file. -.LP +http://www.ietf.org/rfc/rfc3161.txt. If successful, the timestamp token returned by the TSA is stored along with the signature in the signature block file. .TP 3 \-tsacert alias -If \f2"\-tsacert alias"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The \f2alias\fP identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA. -.LP -The TSA's public key certificate must be present in the keystore when using \f2\-tsacert\fP. -.LP +If \f2"\-tsacert alias"\fP appears on the command line when signing a JAR file then a timestamp is generated for the signature. The \f2alias\fP identifies the TSA's public key certificate in the keystore that is currently in effect. The entry's certificate is examined for a Subject Information Access extension that contains a URL identifying the location of the TSA. +.br +.br +The TSA's public key certificate must be present in the keystore when using \f2\-tsacert\fP. .TP 3 \-altsigner class -Specifies that an alternative signing mechanism be used. The fully\-qualified class name identifies a class file that extends the \f2com.sun.jarsigner.ContentSigner abstract class\fP. The path to this class file is defined by the \f2\-altsignerpath\fP option. If the \f2\-altsigner\fP option is used, \f2jarsigner\fP uses the signing mechanism provided by the specified class. Otherwise, \f2jarsigner\fP uses its default signing mechanism. -.LP -For example, to use the signing mechanism provided by a class named \f2com.sun.sun.jarsigner.AuthSigner\fP, use the \f2jarsigner\fP option \f2"\-altsigner com.sun.jarsigner.AuthSigner"\fP -.LP +Specifies that an alternative signing mechanism be used. The fully\-qualified class name identifies a class file that extends the \f2com.sun.jarsigner.ContentSigner abstract class\fP. The path to this class file is defined by the \f2\-altsignerpath\fP option. If the \f2\-altsigner\fP option is used, \f2jarsigner\fP uses the signing mechanism provided by the specified class. Otherwise, \f2jarsigner\fP uses its default signing mechanism. +.br +.br +For example, to use the signing mechanism provided by a class named \f2com.sun.sun.jarsigner.AuthSigner\fP, use the \f2jarsigner\fP option \f2"\-altsigner com.sun.jarsigner.AuthSigner"\fP .TP 3 \-altsignerpath classpathlist -Specifies the path to the class file (the class file name is specified with the \f2\-altsigner\fP option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below. -.LP -An absolute path or a path relative to the current directory may be specified. If \f2classpathlist\fP contains multiple paths or JAR files, they should be separated with a colon (\f2:\fP) on Solaris and a semi\-colon (\f2;\fP) on Windows. This option is not necessary if the class is already in the search path. -.LP +Specifies the path to the class file (the class file name is specified with the \f2\-altsigner\fP option described above) and any JAR files it depends on. If the class file is in a JAR file, then this specifies the path to that JAR file, as shown in the example below. +.br +.br +An absolute path or a path relative to the current directory may be specified. If \f2classpathlist\fP contains multiple paths or JAR files, they should be separated with a colon (\f2:\fP) on Solaris and a semi\-colon (\f2;\fP) on Windows. This option is not necessary if the class is already in the search path. +.br +.br Example of specifying the path to a jar file that contains the class file: -.RS 3 - -.LP -.LP -\f2\-altsignerpath /home/user/lib/authsigner.jar\fP -.LP -.RE -.LP -Note that the JAR file name is included. -.LP +.nf +\f3 +.fl +\-altsignerpath /home/user/lib/authsigner.jar +.fl +\fP +.fi +Note that the JAR file name is included. +.br +.br Example of specifying the path to the jar file that contains the class file: -.RS 3 -.LP -\f2\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/\fP -.LP -.RE -.LP -Note that the JAR file name is omitted. +.nf +\f3 +.fl +\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/ +.fl +\fP +.fi +Note that the JAR file name is omitted. .TP 3 \-strict During the signing or verifying process, some warning messages may be shown. If this option appears on the command line, the exit code of the tool will reflect the warning messages that are found. Read the "WARNINGS" section for details. @@ -712,25 +680,22 @@ During the signing or verifying process, some warning messages may be shown. If \-verbose:sub\-options For the verifying process, the \f2\-verbose\fP option takes sub\-options to determine how much information will be shown. If \f2\-certs\fP is also specified, the default mode (or sub\-option all) displays each entry as it is being processed and following that, the certificate information for each signer of the JAR file. If \f2\-certs\fP and the \f2\-verbose:grouped\fP sub\-option are specified, entries with the same signer info are grouped and displayed together along with their certificate information. If \f2\-certs\fP and the \f2\-verbose:summary\fP sub\-option are specified, then entries with the same signer info are grouped and displayed together along with their certificate information but details about each entry are summarized and displayed as "one entry (and more)". See the examples section for more information. .RE -.SH "EXAMPLES" -.LP +.LP +.SH "EXAMPLES" .LP .SS Signing a JAR File -.LP -.RS 3 - .LP .LP -Suppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory. Suppose the keystore password is "myspass" and the password for \f2jane\fP's private key is "j638klm". You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar": +Suppose you have a JAR file named "bundle.jar" and you'd like to sign it using the private key of the user whose keystore alias is "jane" in the keystore named "mystore" in the "working" directory. You can use the following to sign the JAR file and name the signed JAR file "sbundle.jar": .LP .nf \f3 .fl - jarsigner \-keystore /working/mystore \-storepass myspass + jarsigner \-keystore /working/mystore \-storepass \fP\f4<keystore password>\fP\f3 .fl - \-keypass j638klm \-signedjar sbundle.jar bundle.jar jane + \-keypass \fP\f4<private key password>\fP\f3 \-signedjar sbundle.jar bundle.jar jane .fl \fP .fi @@ -747,7 +712,7 @@ If you want to be prompted for the store password and the private key password, .fl jarsigner \-keystore /working/mystore .fl - \-signedjar sbundle.jar bundle.jar jane + \-signedjar sbundle.jar bundle.jar jane .fl \fP .fi @@ -759,7 +724,7 @@ If the keystore to be used is the default keystore (the one named ".keystore" in .nf \f3 .fl - jarsigner \-signedjar sbundle.jar bundle.jar jane + jarsigner \-signedjar sbundle.jar bundle.jar jane .fl \fP .fi @@ -771,18 +736,14 @@ Finally, if you want the signed JAR file to simply overwrite the input JAR file .nf \f3 .fl - jarsigner bundle.jar jane + jarsigner bundle.jar jane .fl \fP .fi -.RE .LP .SS Verifying a Signed JAR File -.LP -.RS 3 - .LP .LP To verify a signed JAR file, that is, to verify that the signature is valid and the JAR file has not been tampered with, use a command such as the following: @@ -790,7 +751,7 @@ To verify a signed JAR file, that is, to verify that the signature is valid and .nf \f3 .fl - jarsigner \-verify sbundle.jar + jarsigner \-verify sbundle.jar .fl \fP .fi @@ -851,7 +812,7 @@ You can get more information if you use the \f2\-verbose\fP option. A sample use Verification with Certificate Information .LP .LP -If you specify the \f2\-certs\fP option when verifying, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (iff it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example, +If you specify the \f2\-certs\fP option when verifying, along with the \f2\-verify\fP and \f2\-verbose\fP options, the output includes certificate information for each signer of the JAR file, including the certificate type, the signer distinguished name information (if and only if it's an X.509 certificate), and, in parentheses, the keystore alias for the signer if the public key certificate in the JAR file matches that in a keystore entry. For example, .LP .nf \f3 @@ -961,10 +922,7 @@ When the \f2\-certs\fP option is used, any identity database aliases are shown i .LP Note that the alias "duke" is in brackets to denote that it is an identity database alias, not a keystore alias. .LP -.RE .SH "WARNINGS" -.LP - .LP During the signing/verifying process, jarsigner may display various warnings. These warning codes are defined as follows: .nf @@ -980,25 +938,25 @@ During the signing/verifying process, jarsigner may display various warnings. Th .fl This jar contains entries whose signer certificate has expired. .fl - + .fl notYetValidCert 4 .fl This jar contains entries whose signer certificate is not yet valid. .fl - + .fl chainNotValidated 4 .fl This jar contains entries whose certificate chain cannot be correctly validated. .fl - + .fl badKeyUsage 8 .fl This jar contains entries whose signer certificate's KeyUsage extension doesn't allow code signing. .fl - + .fl badExtendedKeyUsage 8 .fl @@ -1006,33 +964,33 @@ During the signing/verifying process, jarsigner may display various warnings. Th .fl doesn't allow code signing. .fl - + .fl badNetscapeCertType 8 .fl - This jar contains entries whose signer certificate's NetscapeCertType extension + This jar contains entries whose signer certificate's NetscapeCertType extension .fl doesn't allow code signing. .fl - + .fl hasUnsignedEntry 16 .fl This jar contains unsigned entries which have not been integrity\-checked. .fl - + .fl notSignedByAlias 32 .fl This jar contains signed entries which are not signed by the specified alias(es) .fl - + .fl aliasNotInStore 32 .fl This jar contains signed entries that are not signed by alias in this keystore .fl - + .fl \fP .fi @@ -1042,23 +1000,19 @@ During the signing/verifying process, jarsigner may display various warnings. Th When the \f2\-strict\fP option is provided, an OR\-value of warnings detected will be returned as the exit code of the tool. For example, if a certificate used to sign an entry is expired and has a keyUsage extension that does not allow it to sign a file, an exit code 12 (=4+8) will be returned. .LP .LP -\f3Note\fP: Exit codes are reused because only 0\-255 is legal for Unix. In any case, if the signing/verifying process fails, the exit code +\f3Note\fP: Exit codes are reused because only 0\-255 is legal for Unix. In any case, if the signing/verifying process fails, the following exit code will be returned: .LP .nf \f3 .fl -failure 1 +failure 1 .fl \fP .fi .LP -will be returned. .SS Compatibility with JDK 1.1 -.LP -.RS 3 - .LP .LP The \f3keytool\fP and \f3jarsigner\fP tools completely replace the \f3javakey\fP tool provided in JDK 1.1. These new tools provide more features than \f3javakey\fP, including the ability to protect the keystore and private keys with passwords, and the ability to verify signatures in addition to generating them. @@ -1390,7 +1344,7 @@ Default privileges granted to all code plus privileges granted in policy file. ( .nr 44 \n(83+(3*\n(38) .nr 84 +\n(44 .nr TW \n(84 -.if t .if \n(TW>\n(.li .tm Table at line 1128 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 1082 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1590,8 +1544,6 @@ Only trusted identities can be imported into Java 2 SDK keystores. .LP .SH "SEE ALSO" -.LP - .LP .RS 3 .TP 2 @@ -1606,13 +1558,12 @@ the .na \f4Security\fP @ .fi -http://java.sun.com/docs/books/tutorial/security/index.html trail of the +http://download.oracle.com/javase/tutorial/security/index.html trail of the .na \f4Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/index.html for examples of the use of the \f3jarsigner\fP tool +http://download.oracle.com/javase/tutorial/index.html for examples of the use of the \f3jarsigner\fP tool .RE .LP -.RE diff --git a/src/solaris/doc/sun/man/man1/java.1 b/src/solaris/doc/sun/man/man1/java.1 index 1f436ff9ebecccd2f7fe11fae12df09d8440deea..2e885083a8bd77fa1c1307c59e54c9335bae73c4 100644 --- a/src/solaris/doc/sun/man/man1/java.1 +++ b/src/solaris/doc/sun/man/man1/java.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH java 1 "02 Jun 2010" +.TH java 1 "10 May 2011" .LP .SH "Name" @@ -36,9 +36,6 @@ java \- the Java application launcher .fl .fi -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -56,10 +53,7 @@ Argument passed to the \f3main\fP function. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The \f3java\fP tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's \f3main\fP method. @@ -70,7 +64,7 @@ The method must be declared public and static, it must not return any value, and .nf \f3 .fl - public static void main(String args[]) +public static void main(String args[]) .fl \fP .fi @@ -86,77 +80,80 @@ The Java runtime searches for the startup class, and other classes used, in thre Non\-option arguments after the class name or JAR file name are passed to the \f3main\fP function. .LP .SH "OPTIONS" -.LP - .LP .LP The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the current implementations of the virtual machines support a set of non\-standard options that are subject to change in future releases. .LP .SH "Standard Options" -.LP - .LP .RS 3 .TP 3 \-client -.LP -Select the Java HotSpot Client VM. A 64\-bit capable jdk currently ignores this option and instead uses the Java Hotspot Server VM. -.LP +Select the Java HotSpot Client VM. A 64\-bit capable jdk currently ignores this option and instead uses the Java Hotspot Server VM. +.br +.br For default VM selection, see .na \f2Server\-Class Machine Detection\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/vm/server\-class.html +http://download.oracle.com/javase/7/docs/technotes/guides/vm/server\-class.html .TP 3 \-server -.LP -Select the Java HotSpot Server VM. On a 64\-bit capable jdk only the Java Hotspot Server VM is supported so the \-server option is implicit. -.LP +Select the Java HotSpot Server VM. On a 64\-bit capable jdk only the Java Hotspot Server VM is supported so the \-server option is implicit. +.br +.br For default VM selection, see .na \f2Server\-Class Machine Detection\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/vm/server\-class.html +http://download.oracle.com/javase/7/docs/technotes/guides/vm/server\-class.html .TP 3 \-agentlib:libname[=options] -Load native agent library \f2libname\fP, e.g. -.LP -\-agentlib:hprof -.LP -\-agentlib:jdwp=help -.LP -\-agentlib:hprof=help -.LP +Load native agent library \f2libname\fP, e.g. +.br +.br +\-agentlib:hprof +.br +.br +\-agentlib:jdwp=help +.br +.br +\-agentlib:hprof=help +.br +.br For more information, see .na \f2JVMTI Agent Command Line Options\fP @ .fi -http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#starting. +http://download.oracle.com/javase/7/docs/platform/jvmti/jvmti.html#starting. .TP 3 \-agentpath:pathname[=options] Load a native agent library by full pathname. For more information, see .na \f2JVMTI Agent Command Line Options\fP @ .fi -http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#starting. +http://download.oracle.com/javase/7/docs/platform/jvmti/jvmti.html#starting. .TP 3 \-classpath classpath .TP 3 \-cp classpath -Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (\f3:\fP). Specifying \f3\-classpath\fP or \f3\-cp\fP overrides any setting of the \f3CLASSPATH\fP environment variable. -.LP +Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (\f3:\fP). Specifying \f3\-classpath\fP or \f3\-cp\fP overrides any setting of the \f3CLASSPATH\fP environment variable. +.br +.br If \f3\-classpath\fP and \f3\-cp\fP are not used and \f3CLASSPATH\fP is not set, the user class path consists of the current directory (\f4.\fP). -.LP +.br +.br As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations). .br .br For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. -.LP +.br +.br For more information on class paths, see .na \f2Setting the Class Path\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath. +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath. .TP 3 \-Dproperty=value Set a system property value. @@ -164,19 +161,23 @@ Set a system property value. \-d32 .TP 3 \-d64 -Request that the program to be run in a 32\-bit or 64\-bit environment, respectively. If the requested environment is not installed or is not supported, an error is reported. -.LP -Currently only the Java HotSpot Server VM supports 64\-bit operation, and the "\-server" option is implicit with the use of \-d64. And the "\-client" option is ignored with the use of \-d64. This is subject to change in a future release. -.LP -If neither \f3\-d32\fP nor \f3\-d64\fP is specified, the default is to run in a 32\-bit environment, except for 64\-bit only systems. This is subject to change in a future release. +Request that the program to be run in a 32\-bit or 64\-bit environment, respectively. If the requested environment is not installed or is not supported, an error is reported. +.br +.br +Currently only the Java HotSpot Server VM supports 64\-bit operation, and the "\-server" option is implicit with the use of \-d64. And the "\-client" option is ignored with the use of \-d64. This is subject to change in a future release. +.br +.br +If neither \f3\-d32\fP nor \f3\-d64\fP is specified, the default is to run in a 32\-bit environment, except for 64\-bit only systems. This is subject to change in a future release. .TP 3 \-enableassertions[:<package name>"..." | :<class name> ] .TP 3 \-ea[:<package name>"..." | :<class name> ] -Enable assertions. Assertions are disabled by default. -.LP -With no arguments, \f3enableassertions\fP or \f3\-ea\fP enables assertions. With one argument ending in \f2"..."\fP, the switch enables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch enables assertions in the specified class. -.LP +Enable assertions. Assertions are disabled by default. +.br +.br +With no arguments, \f3enableassertions\fP or \f3\-ea\fP enables assertions. With one argument ending in \f2"..."\fP, the switch enables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch enables assertions in the specified class. +.br +.br If a single command line contains multiple instances of these switches, they are processed in order before loading any classes. So, for example, to run a program with assertions enabled only in package \f2com.wombat.fruitbat\fP (and any subpackages), the following command could be used: .nf \f3 @@ -185,26 +186,26 @@ java \-ea:com.wombat.fruitbat... <Main Class> .fl \fP .fi -.LP -The \f3\-enableassertions\fP and \f3\-ea\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-enablesystemassertions\fP below. +The \f3\-enableassertions\fP and \f3\-ea\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-enablesystemassertions\fP below. .TP 3 \-disableassertions[:<package name>"..." | :<class name> ] .TP 3 \-da[:<package name>"..." | :<class name> ] -Disable assertions. This is the default. -.LP -With no arguments, \f3disableassertions\fP or \f3\-da\fP disables assertions. With one argument ending in \f2"..."\fP, the switch disables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch disables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch disables assertions in the specified class. -.LP +Disable assertions. This is the default. +.br +.br +With no arguments, \f3disableassertions\fP or \f3\-da\fP disables assertions. With one argument ending in \f2"..."\fP, the switch disables assertions in the specified package and any subpackages. If the argument is simply \f2"..."\fP, the switch disables assertions in the unnamed package in the current working directory. With one argument not ending in \f2"..."\fP, the switch disables assertions in the specified class. +.br +.br To run a program with assertions enabled in package \f2com.wombat.fruitbat\fP but disabled in class \f2com.wombat.fruitbat.Brickbat\fP, the following command could be used: .nf \f3 .fl -java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat <Main Class> +java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat \fP\f4<Main Class>\fP\f3 .fl \fP .fi -.LP -The \f3\-disableassertions\fP and \f3\-da\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-disablesystemassertions\fP below. +The \f3\-disableassertions\fP and \f3\-da\fP switches apply to \f2all\fP class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do \f2not\fP apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see \f3\-disablesystemassertions\fP below. .TP 3 \-enablesystemassertions .TP 3 @@ -215,29 +216,36 @@ Enable asserts in all system classes (sets the \f2default assertion status\fP fo .TP 3 \-dsa Disables asserts in all system classes. -.LP .TP 3 \-jar Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form \f3Main\-Class: \fP\f4classname\fP. Here, \f2classname\fP identifies the class having the \f2public\ static\ void\ main(String[]\ args)\fP method that serves as your application's starting point. See the jar(1) and the Jar trail of the .na \f2Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial/jar for information about working with Jar files and Jar\-file manifests. -.LP -When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. -.LP +http://download.oracle.com/javase/tutorial/deployment/jar for information about working with Jar files and Jar\-file manifests. +.br +.br +When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. +.br +.br Note that JAR files that can be run with the "java \-jar" option can have their execute permissions set so they can be run without using "java \-jar". Refer to .na \f2Java Archive (JAR) Files\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jar/index.html. +http://download.oracle.com/javase/7/docs/technotes/guides/jar/index.html. .TP 3 \-javaagent:jarpath[=options] Load a Java programming language agent, see .na \f2java.lang.instrument\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/lang/instrument/package\-summary.html. +http://download.oracle.com/javase/7/docs/api/java/lang/instrument/package\-summary.html. +.TP 3 +\-jre\-restrict\-search +Include user\-private JREs in the version search. +.TP 3 +\-no\-jre\-restrict\-search +Exclude user\-private JREs in the version search. .TP 3 \-verbose .TP 3 @@ -254,8 +262,9 @@ Report information about use of native methods and other Java Native Interface a Display version information and exit. .TP 3 \-version:release -Specifies that the version specified by \f2release\fP is required by the class or jar file specified on the command line. If the version of the java command invoked does not meet this specification and an appropriate implementation is found on the system, the appropriate implementation will be used. -.LP +Specifies that the version specified by \f2release\fP is required by the class or jar file specified on the command line. If the version of the java command invoked does not meet this specification and an appropriate implementation is found on the system, the appropriate implementation will be used. +.br +.br \f2release\fP not only can specify an exact version, but can also specify a list of versions called a version string. A version string is an ordered list of version ranges separated by spaces. A version range is either a version\-id, a version\-id followed by a star (*), a version\-id followed by a plus sign (+) , or two version\-ranges combined using an ampersand (&). The star means prefix match, the plus sign means this version or greater, and the ampersand means the logical anding of the two version\-ranges. For example: .nf \f3 @@ -264,11 +273,13 @@ Specifies that the version specified by \f2release\fP is required by the class o .fl \fP .fi -The meaning of the above is that the class or jar file requires either version 1.6.0_13, or a version with 1.6 as a version\-id prefix and that is not less than 1.6.0_10.. The exact syntax and definition of version strings may be found in Appendix A of the Java Network Launching Protocol & API Specification (JSR\-56). -.LP -For jar files, the usual preference is to specify version requirements in the jar file manifest rather than on the command line. -.LP -See the following NOTES section for important policy information on the use of this option. +The meaning of the above is that the class or jar file requires either version 1.6.0_13, or a version with 1.6 as a version\-id prefix and that is not less than 1.6.0_10.. The exact syntax and definition of version strings may be found in Appendix A of the Java Network Launching Protocol & API Specification (JSR\-56). +.br +.br +For jar files, the usual preference is to specify version requirements in the jar file manifest rather than on the command line. +.br +.br +See the following NOTES section for important policy information on the use of this option. .TP 3 \-showversion Display version information and continue. @@ -278,6 +289,9 @@ Display version information and continue. \-help Display usage information and exit. .TP 3 +\-splash:imagepath +Show splash screen with image specified by \f2imagepath\fP. +.TP 3 \-X Display information about non\-standard options and exit. .RE @@ -285,9 +299,6 @@ Display information about non\-standard options and exit. .LP .SS Non\-Standard Options -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -319,18 +330,20 @@ Disable class garbage collection. Use of this option will prevent memory recover Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will reduce the occasional long garbage\-collection pauses during program execution. The incremental garbage collector will at times execute concurrently with the program and during such times will reduce the processor capacity available to the program. .TP 3 \-Xloggc:file -Report on each garbage collection event, as with \-verbose:gc, but log this data to \f2file\fP. In addition to the information \f2\-verbose:gc\fP gives, each reported event will be preceeded by the time (in seconds) since the first garbage\-collection event. -.LP -Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides \f2\-verbose:gc\fP if both are given on the command line. -.LP +Report on each garbage collection event, as with \-verbose:gc, but log this data to \f2file\fP. In addition to the information \f2\-verbose:gc\fP gives, each reported event will be preceeded by the time (in seconds) since the first garbage\-collection event. +.br +.br +Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides \f2\-verbose:gc\fP if both are given on the command line. .TP 3 \-Xmsn -Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics +Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see +.na +\f2HotSpot Ergonomics\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/vm/gc\-ergonomics.html +.br .br Examples: -.RS 3 - -.LP .nf \f3 .fl @@ -340,19 +353,20 @@ Examples: .fl \-Xms6m .fl - + .fl \fP .fi -.RE .TP 3 \-Xmxn -Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics +Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter \f2k\fP or \f2K\fP to indicate kilobytes, or \f2m\fP or \f2M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see +.na +\f2HotSpot Ergonomics\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/vm/gc\-ergonomics.html +.br .br Examples: -.RS 3 - -.LP .nf \f3 .fl @@ -362,28 +376,31 @@ Examples: .fl \-Xmx80m .fl - + .fl \fP .fi -.RE On Solaris 7 and Solaris 8 SPARC platforms, the upper limit for this value is approximately 4000m minus overhead amounts. On Solaris 2.6 and x86 platforms, the upper limit is approximately 2000m minus overhead amounts. On Linux platforms, the upper limit is approximately 2000m minus overhead amounts. .TP 3 \-Xprof Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be used in production systems. -.LP .TP 3 \-Xrs -Reduces use of operating\-system signals by the Java virtual machine (JVM). -.LP -In a previous release, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly. -.LP -Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks. -.LP -The JVM uses a similar mechanism to implement the pre\-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps. -.LP -Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. The \f3\-Xrs\fP command\-line option is available to address this issue. When \f3\-Xrs\fP is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed. -.LP +Reduces use of operating\-system signals by the Java virtual machine (JVM). +.br +.br +In a previous release, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly. +.br +.br +Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks. +.br +.br +The JVM uses a similar mechanism to implement the pre\-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps. +.br +.br +Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. The \f3\-Xrs\fP command\-line option is available to address this issue. When \f3\-Xrs\fP is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed. +.br +.br There are two consequences of specifying \f3\-Xrs\fP: .RS 3 .TP 2 @@ -402,12 +419,11 @@ The VM uses \f2SIGUSR1\fP and \f2SIGUSR2\fP by default, which can sometimes conf .RE .LP -.RE .SH "NOTES" .LP - .LP -The \f3\-version:\fP\f2release\fP command line option places no restrictions on the complexity of the release specification. However, only a restricted subset of the possible release specifications represent sound policy and only these are fully supported. These policies are: +The \f3\-version:\fP\f2release\fP command line option places no restrictions on the complexity of the release specification. However, only a restricted subset of the possible release specifications represent sound policy and only these are fully supported. These policies are: +.LP .RS 3 .TP 3 1. @@ -422,8 +438,7 @@ Any version greater than an arbitrarily precise version\-id. For example: .fl \fP .fi -.LP -Would utilize any version greater than 1.6.0_10. This is useful for a case where an interface was introduced (or a bug fixed) in the release specified. +This would utilize any version greater than \f21.6.0_10\fP. This is useful for a case where an interface was introduced (or a bug fixed) in the release specified. .TP 3 3. A version greater than an arbitrarily precise version\-id, bounded by the upper bound of that release family. For example: @@ -448,9 +463,22 @@ Similar to item 2. this is useful when a change was introduced in a release (1.7 .RE .LP -.SH "SEE ALSO" +.SH "EXIT STATUS" +.LP +.LP +The following exit values are generally returned by the launcher, typically when the launcher is called with the wrong arguments, serious errors, or exceptions thrown from the Java Virtual Machine. However, a Java application may choose to return any value using the API call \f2System.exit(exitValue)\fP. .LP +.RS 3 +.TP 2 +o +\f20\fP: Successful completion +.TP 2 +o +\f2>0\fP: An error occurred +.RE +.LP +.SH "SEE ALSO" .LP .RS 3 .TP 2 @@ -470,13 +498,13 @@ o .na \f2The Java Extensions Framework\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/extensions/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/extensions/index.html .TP 2 o .na \f2Security Features\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/index.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/index.html. .TP 2 o .na diff --git a/src/solaris/doc/sun/man/man1/javac.1 b/src/solaris/doc/sun/man/man1/javac.1 index 7e01a50e98974142393f49a357e45e2a78ec0f2e..3f3b5733f0ad95961c3943ba20545ea97af6de95 100644 --- a/src/solaris/doc/sun/man/man1/javac.1 +++ b/src/solaris/doc/sun/man/man1/javac.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,31 +19,26 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javac 1 "02 Jun 2010" +.TH javac 1 "10 May 2011" .LP .SH "Name" javac \- Java programming language compiler .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 .fl \fP\f3javac\fP [ options ] [ sourcefiles ] [ classes ] [ @argfiles ] .fl - + .fl .fi .LP .LP Arguments may be in any order. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -61,10 +56,7 @@ One or more files that lists options and source files. The \f2\-J\fP options are .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The \f3javac\fP tool reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. It can also process annotations in Java source files and classes. @@ -95,17 +87,12 @@ You should arrange source files in a directory tree that reflects their package By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with \f3\-d\fP (see Options, below). .LP .SH "OPTIONS" -.LP - .LP .LP The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non\-standard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Non\-standard options begin with \f3\-X\fP. .LP .SS Standard Options -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -113,20 +100,13 @@ Standard Options Options to pass to annotation processors. These are not interpreted by javac directly, but are made available for use by individual processors. \f2key\fP should be one or more identifiers separated by ".". .TP 3 \-cp path or \-classpath path -Specify where to find user class files, and (optionally) annotation processors and source files. This classpath overrides the user class path in the \f3CLASSPATH\fP environment variable. If neither \f3CLASSPATH\fP, \f3\-cp\fP nor \f3\-classpath\fP is specified, the user class path consists of the current directory. See -.na -\f2Setting the Class Path\fP @ -.fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath for more details. -.LP -If the \f3\-sourcepath\fP option is not specified, the user class path is also searched for source files. -.LP -If the \f3\-processorpath\fP option is not specified, the classpath is also searched for annotation processors. -.LP -As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP. +Specify where to find user class files, and (optionally) annotation processors and source files. This class path overrides the user class path in the \f3CLASSPATH\fP environment variable. If neither \f3CLASSPATH\fP, \f3\-cp\fP nor \f3\-classpath\fP is specified, the user class path consists of the current directory. See Setting the Class Path for more details. .br .br -For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. \f3Note:\fP \ Depending of the configuration of your command line environment, you may have to quote the wild card character, for example, \f2javac \-cp "*.jar" MyClass.java\fP. +>If the \f3\-sourcepath\fP option is not specified, the user class path is also searched for source files. +.br +.br +If the \f3\-processorpath\fP option is not specified, the class path is also searched for annotation processors. .TP 3 \-Djava.ext.dirs=directories Override the location of installed extensions. @@ -135,17 +115,28 @@ Override the location of installed extensions. Override the location of endorsed standards path. .TP 3 \-d directory -Set the destination directory for class files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, \f3javac\fP puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-d /home/myclasses\fP and the class is called \f2com.mypackage.MyClass\fP, then the class file is called \f2/home/myclasses/com/mypackage/MyClass.class\fP. -.LP -If \f3\-d\fP is not specified, \f3javac\fP puts each class files in the same directory as the source file from which it was generated. -.LP -\f3Note:\fP \ The directory specified by \f3\-d\fP is not automatically added to your user class path. +Set the destination directory for class files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, \f3javac\fP puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-d /home/myclasses\fP and the class is called \f2com.mypackage.MyClass\fP, then the class file is called \f2/home/myclasses/com/mypackage/MyClass.class\fP. +.br +.br +If \f3\-d\fP is not specified, \f3javac\fP puts each class files in the same directory as the source file from which it was generated. +.br +.br +\f3Note:\fP The directory specified by \f3\-d\fP is not automatically added to your user class path. .TP 3 \-deprecation Show a description of each use or override of a deprecated member or class. Without \f3\-deprecation\fP, \f3javac\fP shows a summary of the source files that use or override deprecated members or classes. \f3\-deprecation\fP is shorthand for \f3\-Xlint:deprecation\fP. .TP 3 \-encoding encoding -Set the source file encoding name, such as \f2EUC\-JP and UTF\-8\fP. If \f3\-encoding\fP is not specified, the platform default converter is used. +Set the source file encoding name, such as \f2EUC\-JP and UTF\-8\fP. If \f3\-encoding\fP is not specified, the platform default converter is used. +.TP 3 +\-endorseddirs directories +Override the location of endorsed standards path. +.TP 3 +\-extdirs directories +Overrides the location of the \f2ext\fP directory. The \f2directories\fP variable is a colon\-separated list of directories. Each JAR archive in the specified directories is searched for class files. All JAR archives found are automatically part of the class path. +.br +.br +If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), this option specifies the directories that contain the extension classes. See Cross\-Compilation Options for more information. .TP 3 \-g Generate all debugging information, including local variables. By default, only line number and source file information is generated. @@ -171,7 +162,13 @@ Local variable debugging information Print a synopsis of standard options. .TP 3 \-implicit:{class,none} -Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use \f3\-implicit:class\fP. To suppress class file generation, use \f3\-implicit:none\fP. If this option is not specified, the default is to automatically generate class files. In this case, the compiler will issue a warning if any such class files are generated when also doing annotation processing. The warning will not be issued if this option is set explicitly. See Searching For Types. +Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use \f3\-implicit:class\fP. To suppress class file generation, use \f3\-implicit:none\fP. If this option is not specified, the default is to automatically generate class files. In this case, the compiler will issue a warning if any such class files are generated when also doing annotation processing. The warning will not be issued if this option is set explicitly. See Searching For Types. +.TP 3 +\-Joption +Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java. +.br +.br +\f3Note:\fP \f3CLASSPATH\fP, \f3\-classpath\fP, \f3\-bootclasspath\fP, and \f3\-extdirs\fP do \f2not\fP specify the classes used to run \f3javac\fP. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the \f3\-J\fP option to pass through options to the underlying \f3java\fP launcher. .TP 3 \-nowarn Disable warning messages. This has the same meaning as \f3\-Xlint:none\fP. @@ -183,7 +180,7 @@ Controls whether annotation processing and/or compilation is done. \f3\-proc:non Names of the annotation processors to run. This bypasses the default discovery process. .TP 3 \-processorpath path -Specify where to find annotation processors; if this option is not used, the classpath will be searched for processors. +Specify where to find annotation processors; if this option is not used, the class path will be searched for processors. .TP 3 \-s dir Specify the directory where to place generated source files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, the compiler puts the source file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-s /home/mysrc\fP and the class is called \f2com.mypackage.MyClass\fP, then the source file will be placed in \f2/home/mysrc/com/mypackage/MyClass.java\fP. @@ -218,27 +215,27 @@ Synonym for 1.7. .RE .TP 3 \-sourcepath sourcepath -Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. -.LP -\f3Note:\fP \ Classes found through the classpath may be subject to automatic recompilation if their sources are also found. See Searching For Types. +Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. +.br +.br +\f3Note:\fP Classes found through the class path may be subject to automatic recompilation if their sources are also found. See Searching For Types. .TP 3 \-verbose Verbose output. This includes information about each class loaded and each source file compiled. .TP 3 \-version -Print version information. +Print version information. +.TP 3 +\-Werror +Terminate compilation if warnings occur. .TP 3 \-X Display information about non\-standard options and exit. .RE .LP -.RE .SS Cross\-Compilation Options -.LP -.RS 3 - .LP .LP By default, classes are compiled against the bootstrap and extension classes of the platform that \f3javac\fP shipped with. But \f3javac\fP also supports \f2cross\-compiling\fP, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use \f3\-bootclasspath\fP and \f3\-extdirs\fP when cross\-compiling; see Cross\-Compilation Example below. @@ -246,13 +243,14 @@ By default, classes are compiled against the bootstrap and extension classes of .RS 3 .TP 3 \-target version -Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are \f31.1\fP \f31.2\fP \f31.3\fP \f31.4\fP \f31.5\fP (also \f35\fP) \f31.6\fP (also \f36\fP) and \f31.7\fP (also \f37\fP). -.LP +Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are \f31.1\fP \f31.2\fP \f31.3\fP \f31.4\fP \f31.5\fP (also \f35\fP) \f31.6\fP (also \f36\fP) and \f31.7\fP (also \f37\fP). +.br +.br The default for \f3\-target\fP depends on the value of \f3\-source\fP: .RS 3 .TP 2 o -If \-source is \f3not specified\fP, the value of \-target is \f31.6\fP +If \-source is \f3not specified\fP, the value of \-target is \f31.7\fP .TP 2 o If \-source is \f31.2\fP, the value of \-target is \f31.4\fP @@ -261,23 +259,16 @@ o If \-source is \f31.3\fP, the value of \-target is \f31.4\fP .TP 2 o -For \f3all other values\fP of \-source, the value of \-target is the value of \f3\-source\fP. +For \f3all other values\fP of \-source, the value of \f3\-target\fP is the value of \f3\-source\fP. .RE .TP 3 \-bootclasspath bootclasspath Cross\-compile against the specified set of boot classes. As with the user class path, boot class path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. -.TP 3 -\-extdirs directories -Cross\-compile against the specified extension directories. \f2Directories\fP is a colon\-separated list of directories. Each JAR archive in the specified directories is searched for class files. .RE .LP -.RE .SS Non\-Standard Options -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -291,31 +282,132 @@ Append to the bootstrap class path. Override location of bootstrap class files. .TP 3 \-Xlint -Enable all recommended warnings. In this release, all available warnings are recommended. +Enable all recommended warnings. In this release, enabling all available warnings is recommended. +.TP 3 +\-Xlint:all +Enable all recommended warnings. In this release, enabling all available warnings is recommended. .TP 3 \-Xlint:none -Disable all warnings not mandated by the Java Language Specification. +Disable all warnings. +.TP 3 +\-Xlint:name +Enable warning \f2name\fP. See the section Warnings That Can Be Enabled or Disabled with \-Xlint Option for a list of warnings you can enable with this option. .TP 3 \-Xlint:\-name -Disable warning \f2name\fP, where \f2name\fP is one of the warning names supported for \f3\-Xlint:\fP\f2name\fP, below. +Disable warning \f2name\fP. See the section Warnings That Can Be Enabled or Disabled with \-Xlint Option for a list of warnings you can disable with this option. .TP 3 -\-Xlint:unchecked -Give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. +\-Xmaxerrs number +Set the maximum number of errors to print. .TP 3 -\-Xlint:path -Warn about nonexistent path (classpath, sourcepath, etc) directories. +\-Xmaxwarns number +Set the maximum number of warnings to print. .TP 3 -\-Xlint:serial -Warn about missing \f2serialVersionUID\fP definitions on serializable classes. +\-Xstdout filename +Send compiler messages to the named file. By default, compiler messages go to \f2System.err\fP. .TP 3 -\-Xlint:finally -Warn about \f2finally\fP clauses that cannot complete normally. +\-Xprefer:{newer,source} +Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If \f2\-Xprefer:newer\fP is used, it reads the newer of the source or class file for a type (default). If the \f2\-Xprefer:source\fP option is used, it reads source file. Use \f2\-Xprefer:source\fP when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f2SOURCE\fP. .TP 3 -\-Xlint:fallthrough -Check \f2switch\fP blocks for fall\-through cases and provide a warning message for any that are found. Fall\-through cases are cases in a \f2switch\fP block, other than the last case in the block, whose code does not include a \f2break\fP statement, allowing code execution to "fall through" from that case to the next case. For example, the code following the \f2case 1\fP label in this \f2switch\fP block does not end with a \f2break\fP statement: -.RS 3 +\-Xpkginfo:{always,legacy,nonempty} +Specify handling of package\-info files +.TP 3 +\-Xprint +Print out textual representation of specified types for debugging purposes; perform neither annotation processing nor compilation. The format of the output may change. +.TP 3 +\-XprintProcessorInfo +Print information about which annotations a processor is asked to process. +.TP 3 +\-XprintRounds +Print information about initial and subsequent annotation processing rounds. +.RE .LP +.SS +Warnings That Can Be Enabled or Disabled with \-Xlint Option +.LP +.LP +Enable warning \f2name\fP with the option \f3\-Xlint:\fP\f2name\fP, where \f2name\fP is one of the following warning names. Similarly, you can disable warning \f2name\fP with the option \f3\-Xlint:\-\fP\f2name\fP: +.LP +.RS 3 +.TP 3 +cast +Warn about unnecessary and redundant casts. For example: +.nf +\f3 +.fl +String s = (String)"Hello!" +.fl +\fP +.fi +.TP 3 +classfile +Warn about issues related to classfile contents. +.TP 3 +deprecation +Warn about use of deprecated items. For example: +.nf +\f3 +.fl + java.util.Date myDate = new java.util.Date(); +.fl + int currentDay = myDate.getDay(); +.fl +\fP +.fi +The method \f2java.util.Date.getDay\fP has been deprecated since JDK 1.1. +.TP 3 +dep\-ann +Warn about items that are documented with an \f2@deprecated\fP Javadoc comment, but do not have a \f2@Deprecated\fP annotation. For example: +.nf +\f3 +.fl + /** +.fl + * @deprecated As of Java SE 7, replaced by {@link #newMethod()} +.fl + */ +.fl + +.fl + public static void deprecatedMethood() { } +.fl + +.fl + public static void newMethod() { } +.fl +\fP +.fi +.TP 3 +divzero +Warn about division by constant integer 0. For example: +.nf +\f3 +.fl + int divideByZero = 42 / 0; +.fl +\fP +.fi +.TP 3 +empty +Warn about empty statements after \f2if\fP statements. For example: +.nf +\f3 +.fl +class E { +.fl + void m() { +.fl + if (true) ; +.fl + } +.fl +} +.fl +\fP +.fi +.TP 3 +fallthrough +Check \f2switch\fP blocks for fall\-through cases and provide a warning message for any that are found. Fall\-through cases are cases in a \f2switch\fP block, other than the last case in the block, whose code does not include a \f2break\fP statement, allowing code execution to "fall through" from that case to the next case. For example, the code following the \f2case 1\fP label in this \f2switch\fP block does not end with a \f2break\fP statement: .nf \f3 .fl @@ -325,64 +417,324 @@ case 1: .fl System.out.println("1"); .fl - // No break; statement here. + // No break statement here. .fl case 2: .fl System.out.println("2"); .fl } -.fl - .fl \fP .fi -.RE If the \f2\-Xlint:fallthrough\fP flag were used when compiling this code, the compiler would emit a warning about "possible fall\-through into case," along with the line number of the case in question. .TP 3 -\-Xmaxerrs number -Set the maximum number of errors to print. +finally +Warn about \f2finally\fP clauses that cannot complete normally. For example: +.nf +\f3 +.fl + public static int m() { +.fl + try { +.fl + throw new NullPointerException(); +.fl + } catch (NullPointerException e) { +.fl + System.err.println("Caught NullPointerException."); +.fl + return 1; +.fl + } finally { +.fl + return 0; +.fl + } +.fl + } +.fl +\fP +.fi +The compiler generates a warning for \f2finally\fP block in this example. When this method is called, it returns a value of \f20\fP, not \f21\fP. A \f2finally\fP block always executes when the \f2try\fP block exits. In this example, if control is transferred to the \f2catch\fP, then the method exits. However, the \f2finally\fP block must be executed, so it is executed, even though control has already been transferred outside the method. .TP 3 -\-Xmaxwarns number -Set the maximum number of warnings to print. +options +Warn about issues relating to the use of command line options. See Cross\-Compilation Example for an example of this kind of warning. .TP 3 -\-Xstdout filename -Send compiler messages to the named file. By default, compiler messages go to \f2System.err\fP. +overrides +Warn about issues regarding method overrides. For example, consider the following two classes: +.nf +\f3 +.fl +public class ClassWithVarargsMethod { +.fl + void varargsMethod(String... s) { } +.fl +} +.fl +\fP +.fi +.nf +\f3 +.fl +public class ClassWithOverridingMethod extends ClassWithVarargsMethod { +.fl + @Override +.fl + void varargsMethod(String[] s) { } +.fl +} +.fl +\fP +.fi +The compiler generates a warning similar to the following: +.br +.br +\f2warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding method is missing '...'\fP +.br +.br +When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. In the method \f2ClassWithVarargsMethod.varargsMethod\fP, the compiler translates the varargs formal parameter \f2String... s\fP to the formal parameter \f2String[] s\fP, an array, which matches the formal parameter of the method \f2ClassWithOverridingMethod.varargsMethod\fP. Consequently, this example compiles. .TP 3 -\-Xprefer:{newer,source} -Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If \f2\-Xprefer:newer\fP is used, it reads the newer of the source or class file for a type (default). If the \f2\-Xprefer:source\fP option is used, it reads source file. Use \f2\-Xprefer:source\fP when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f2SOURCE\fP. +path +Warn about invalid path elements and nonexistent path directories on the command line (with regards to the class path, the source path, and other paths). Such warnings cannot be suppressed with the \f2@SuppressWarnings\fP annotation. For example: +.nf +\f3 +.fl +javac \-Xlint:path \-classpath /nonexistentpath Example.java +.fl +\fP +.fi .TP 3 -\-Xprint -Print out textual representation of specified types for debugging purposes; perform neither annotation processing nor compilation. The format of the output may change. +processing +Warn about issues regarding annotation processing. The compiler generates this warning if you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception. For example, the following is a simple annotation processor: +.br +.br +\f3Source file \fP\f4AnnoProc.java\fP: +.nf +\f3 +.fl +import java.util.*; +.fl +import javax.annotation.processing.*; +.fl +import javax.lang.model.*; +.fl +import javax.lang.model.element.*; +.fl + +.fl +@SupportedAnnotationTypes("NotAnno") +.fl +public class AnnoProc extends AbstractProcessor { +.fl + public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv) { +.fl + return true; +.fl + } +.fl + +.fl + public SourceVersion getSupportedSourceVersion() { +.fl + return SourceVersion.latest(); +.fl + } +.fl +} +.fl +\fP +.fi +\f3Source file \fP\f4AnnosWithoutProcessors.java\fP\f3:\fP +.nf +\f3 +.fl +@interface Anno { } +.fl + +.fl +@Anno +.fl +class AnnosWithoutProcessors { } +.fl +\fP +.fi +The following commands compile the annotation processor \f2AnnoProc\fP, then run this annotation processor against the source file \f2AnnosWithoutProcessors.java\fP: +.nf +\f3 +.fl +% javac AnnoProc.java +.fl +% javac \-cp . \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors.java +.fl +\fP +.fi +When the compiler runs the annotation processor against the source file \f2AnnosWithoutProcessors.java\fP, it generates the following warning: +.br +.br +\f2warning: [processing] No processor claimed any of these annotations: Anno\fP +.br +.br +To resolve this issue, you can rename the annotation defined and used in the class \f2AnnosWithoutProcessors\fP from \f2Anno\fP to \f2NotAnno\fP. .TP 3 -\-XprintProcessorInfo -Print information about which annotations a processor is asked to process. +rawtypes +Warn about unchecked operations on raw types. The following statement generates a \f2rawtypes\fP warning: +.nf +\f3 +.fl +void countElements(List l) { ... } +.fl +\fP +.fi +The following does not generate a \f2rawtypes\fP warning: +.nf +\f3 +.fl +void countElements(List<?> l) { ... } +.fl +\fP +.fi +\f2List\fP is a raw type. However, \f2List<?>\fP is a unbounded wildcard parameterized type. Because \f2List\fP is a parameterized interface, you should always specify its type argument. In this example, the \f2List\fP formal argument is specified with a unbounded wildcard (\f2?\fP) as its formal type parameter, which means that the \f2countElements\fP method can accept any instantiation of the \f2List\fP interface. .TP 3 -\-XprintRounds -Print information about initial and subsequent annotation processing rounds. -.RE +serial +Warn about missing \f2serialVersionUID\fP definitions on serializable classes. For example: +.nf +\f3 +.fl +public class PersistentTime implements Serializable +.fl +{ +.fl + private Date time; +.fl -.LP -.RE -.SS -The \-J Option -.LP -.RS 3 +.fl + public PersistentTime() { +.fl + time = Calendar.getInstance().getTime(); +.fl + } +.fl -.LP -.RS 3 +.fl + public Date getTime() { +.fl + return time; +.fl + } +.fl +} +.fl +\fP +.fi +The compiler generates the following warning: +.br +.br +\f2warning: [serial] serializable class PersistentTime has no definition of serialVersionUID\fP +.br +.br +If a serializable class does not explicitly declare a field named \f2serialVersionUID\fP, then the serialization runtime will calculate a default \f2serialVersionUID\fP value for that class based on various aspects of the class, as described in the Java Object Serialization Specification. However, it is strongly recommended that all serializable classes explicitly declare \f2serialVersionUID\fP values because the default process of computing \f2serialVersionUID\fP vales is highly sensitive to class details that may vary depending on compiler implementations, and can thus result in unexpected \f2InvalidClassExceptions\fP during deserialization. Therefore, to guarantee a consistent \f2serialVersionUID\fP value across different Java compiler implementations, a serializable class must declare an explicit \f2serialVersionUID\fP value. .TP 3 -\-Joption -Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f3\-X\fP, it is not a `standard option' of \f3javac\fP. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java. -.LP -\f3Note:\fP \ \f3CLASSPATH\fP, \f3\-classpath\fP, \f3\-bootclasspath\fP, and \f3\-extdirs\fP do \f2not\fP specify the classes used to run \f3javac\fP. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the \f3\-J\fP option to pass through options to the underlying \f3java\fP launcher. +static +Warn about issues relating to use of statics. For example: +.nf +\f3 +.fl +class XLintStatic { +.fl + static void m1() { } +.fl + void m2() { this.m1(); } +.fl +} +.fl +\fP +.fi +The compiler generates the following warning: +.nf +\f3 +.fl +warning: [static] static method should be qualified by type name, XLintStatic, instead of by an expression +.fl +\fP +.fi +To resolve this issue, you can call the static method \f2m1\fP as follows: +.nf +\f3 +.fl +XLintStatic.m1(); +.fl +\fP +.fi +Alternatively, you can remove the \f2static\fP keyword from the declaration of the method \f2m1\fP. +.TP 3 +try +Warn about issues relating to use of \f2try\fP blocks, including try\-with\-resources statements. For example, a warning is generated for the following statement because the resource \f2ac\fP declared in the \f2try\fP statement is not used: +.nf +\f3 +.fl +try ( AutoCloseable ac = getResource() ) { +.fl + // do nothing +.fl +} +.fl +\fP +.fi +.TP 3 +unchecked +Give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. For example: +.nf +\f3 +.fl + List l = new ArrayList<Number>(); +.fl + List<String> ls = l; // unchecked warning +.fl +\fP +.fi +During type erasure, the types \f2ArrayList<Number>\fP and \f2List<String>\fP become \f2ArrayList\fP and \f2List\fP, respectively. +.br +.br +The variable \f2ls\fP has the parameterized type \f2List<String>\fP. When the \f2List\fP referenced by \f2l\fP is assigned to \f2ls\fP, the compiler generates an unchecked warning; the compiler is unable to determine at compile time, and moreover knows that the JVM will not be able to determine at runtime, if \f2l\fP refers to a \f2List<String>\fP type; it does not. Consequently, heap pollution occurs. +.br +.br +In detail, a heap pollution situation occurs when the \f2List\fP object \f2l\fP, whose static type is \f2List<Number>\fP, is assigned to another \f2List\fP object, \f2ls\fP, that has a different static type, \f2List<String>\fP. However, the compiler still allows this assignment. It must allow this assignment to preserve backwards compatibility with versions of Java SE that do not support generics. Because of type erasure, \f2List<Number>\fP and \f2List<String>\fP both become \f2List\fP. Consequently, the compiler allows the assignment of the object \f2l\fP, which has a raw type of \f2List\fP, to the object \f2ls\fP. +.TP 3 +varargs +Warn about unsafe usages of variable arguments (varargs) methods, in particular, those that contain non\-reifiable arguments. For example: +.nf +\f3 +.fl +public class ArrayBuilder { +.fl + public static <T> void addToList (List<T> listArg, T... elements) { +.fl + for (T x : elements) { +.fl + listArg.add(x); +.fl + } +.fl + } +.fl +} +.fl +\fP +.fi +The compiler generates the following warning for the definition of the method \f2ArrayBuilder.addToList\fP: +.nf +\f3 +.fl +warning: [varargs] Possible heap pollution from parameterized vararg type T +.fl +\fP +.fi +When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. In the method \f2ArrayBuilder.addToList\fP, the compiler translates the varargs formal parameter \f2T... elements\fP to the formal parameter \f2T[] elements\fP, an array. However, because of type erasure, the compiler converts the varargs formal parameter to \f2Object[] elements\fP. Consequently, there is a possibility of heap pollution. .RE .LP -.RE .SH "COMMAND LINE ARGUMENT FILES" -.LP - .LP .LP To shorten or simplify the javac command line, you can specify one or more files that themselves contain arguments to the \f2javac\fP command (except \f2\-J\fP options). This enables you to create javac commands of any length on any operating system. @@ -405,9 +757,7 @@ You could use a single argument file named "\f2argfile\fP" to hold all javac arg .nf \f3 .fl - % \fP\f3javac @argfile\fP -.fl - +% \fP\f3javac @argfile\fP .fl .fi @@ -433,7 +783,7 @@ Create a file named "\f2options\fP" containing: .fl \-sourcepath /java/pubs/ws/1.3/src/share/classes .fl - + .fl \fP .fi @@ -451,7 +801,7 @@ Create a file named "\f2classes\fP" containing: .fl MyClass3.java .fl - + .fl \fP .fi @@ -465,7 +815,7 @@ You would then run \f3javac\fP with: .fl % \fP\f3javac @options @classes\fP .fl - + .fl .fi @@ -479,16 +829,12 @@ The argument files can have paths, but any filenames inside the files are relati .nf \f3 .fl - % \fP\f3javac @path1/options @path2/classes\fP -.fl - +% \fP\f3javac @path1/options @path2/classes\fP .fl .fi .LP .SH "ANNOTATION PROCESSING" -.LP - .LP .LP \f3javac\fP provides direct support for annotation processing, superseding the need for the separate annotation processing tool, \f3apt\fP. @@ -500,11 +846,7 @@ The API for annotation processors is defined in the \f2javax.annotation.processi Overview of annotation processing .LP .LP -Unless annotation processing is disabled with the \f3\-proc:none\fP option, the compiler searches for any annotation processors that are available. The search path can be specified with the \f3\-processorpath\fP option; if it is not given, the user class path is used. Processors are located by means of service provider\-configuration files named -.br -\f2\ META\-INF/services/javax.annotation.processing.Processor\fP -.br -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 \f3\-processor\fP option. +Unless annotation processing is disabled with the \f3\-proc:none\fP option, the compiler searches for any annotation processors that are available. The search path can be specified with the \f3\-processorpath\fP option; if it is not given, the user class path is used. Processors are located by means of service provider\-configuration files named \f2META\-INF/services/javax.annotation.processing.Processor\fP 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 \f3\-processor\fP option. .LP .LP After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process. When a match is found, the processor will be invoked. A processor may "claim" the annotations it processes, in which case no further attempt is made to find any processors for those annotations. Once all annotations have been claimed, the compiler does not look for additional processors. @@ -522,8 +864,6 @@ Implicitly loaded source files To compile a set of source files, the compiler may need to implicitly load additional source files. (See Searching For Types). Such files are currently not subject to annotation processing. By default, the compiler will give a warning if annotation processing has occurred and any implicitly loaded source files are compiled. See the \-implicit option for ways to suppress the warning. .LP .SH "SEARCHING FOR TYPES" -.LP - .LP .LP When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler 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 which provide information through inheritance. @@ -532,11 +872,7 @@ When compiling a source file, the compiler often needs information about a type For example, when you subclass \f3java.applet.Applet\fP, you are also using \f3Applet's\fP ancestor classes: \f3java.awt.Panel\fP, \f3java.awt.Container\fP, \f3java.awt.Component\fP, and \f3java.lang.Object\fP. .LP .LP -When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the \f3CLASSPATH\fP environment variable or by using the \f3\-classpath\fP command line option. (For details, see -.na -\f2Setting the Class Path\fP @ -.fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath). +When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the \f3CLASSPATH\fP environment variable or by using the \f3\-classpath\fP command line option. (For details, see Setting the Class Path). .LP .LP If you set the \-sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files. @@ -554,8 +890,6 @@ If a type search finds a source file for a required type, either by itself, or a The compiler may not discover the need for some type information until after annotation processing is complete. If the type information is found in a source file and no \f3\-implicit\fP option is given, the compiler will give 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 \f3\-implicit\fP option to specify whether or not class files should be generated for such source files. .LP .SH "PROGRAMMATIC INTERFACE" -.LP - .LP .LP \f3javac\fP supports the new Java Compiler API defined by the classes and interfaces in the \f2javax.tools\fP package. @@ -572,8 +906,6 @@ To perform a compilation using arguments as you would give on the command line, JavaCompiler javac = ToolProvider.getSystemJavaCompiler(); .fl int rc = javac.run(null, null, null, args); -.fl - .fl \fP .fi @@ -587,12 +919,9 @@ You can use other methods on the \f2javax.tools.JavaCompiler\fP interface to han .LP .SS Old Interface -.LP -.RS 3 - .LP .LP -\f3Note:\fP \ This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above. +\f3Note:\fP This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above. .LP .LP The \f2com.sun.tools.javac.Main\fP class provides two static methods to invoke the compiler from a program: @@ -603,8 +932,6 @@ The \f2com.sun.tools.javac.Main\fP class provides two static methods to invoke t public static int compile(String[] args); .fl public static int compile(String[] args, PrintWriter out); -.fl - .fl \fP .fi @@ -622,20 +949,13 @@ The return value is equivalent to the exit value from \f3javac\fP. .LP Note that all \f3other\fP classes and methods found in a package whose name starts with \f2com.sun.tools.javac\fP (informally known as sub\-packages of \f2com.sun.tools.javac\fP) are strictly internal and subject to change at any time. .LP -.RE .SH "EXAMPLES" .LP .SS Compiling a Simple Program -.LP -.RS 3 - .LP .LP One source file, \f2Hello.java\fP, defines a class called \f3greetings.Hello\fP. The \f2greetings\fP directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with \f3\-d\fP. -.LP -.RS 3 - .LP .nf \f3 @@ -681,25 +1001,15 @@ Hello World Hello Universe .fl Hello Everyone -.fl - .fl .fi -.RE .LP -.RE .SS Compiling Multiple Source Files -.LP -.RS 3 - .LP .LP This example compiles all the source files in the package \f2greetings\fP. -.LP -.RS 3 - .LP .nf \f3 @@ -719,27 +1029,15 @@ Aloha.java GutenTag.java Hello.java Hi.java Aloha.class GutenTag.class Hello.class Hi.class .fl Aloha.java GutenTag.java Hello.java Hi.java -.fl - -.fl - .fl .fi -.RE .LP -.RE .SS Specifying a User Class Path -.LP -.RS 3 - .LP .LP Having changed one of the source files in the previous example, we recompile it: -.LP -.RS 3 - .LP .nf \f3 @@ -749,35 +1047,23 @@ Having changed one of the source files in the previous example, we recompile it: /examples .fl % \f3javac greetings/Hi.java\fP -.fl - .fl .fi -.RE .LP .LP Since \f2greetings.Hi\fP refers to other classes in the \f2greetings\fP package, the compiler needs to find these other classes. The example above works, because our default user class path happens to be the directory containing the package directory. But suppose we want to recompile this file and not worry about which directory we're in? Then we need to add \f2/examples\fP to the user class path. We can do this by setting \f3CLASSPATH\fP, but here we'll use the \f3\-classpath\fP option. -.LP -.RS 3 - .LP .nf \f3 .fl % \fP\f3javac \-classpath /examples /examples/greetings/Hi.java\fP -.fl - .fl .fi -.RE .LP .LP If we change \f2greetings.Hi\fP again, to use a banner utility, that utility also needs to be accessible through the user class path. -.LP -.RS 3 - .LP .nf \f3 @@ -786,41 +1072,25 @@ If we change \f2greetings.Hi\fP again, to use a banner utility, that utility als .fl /examples/greetings/Hi.java\fP .fl - -.fl .fi -.RE .LP .LP To execute a class in \f2greetings\fP, we need access both to \f2greetings\fP and to the classes it uses. -.LP -.RS 3 - .LP .nf \f3 .fl % \fP\f3java \-classpath /examples:/lib/Banners.jar greetings.Hi\fP -.fl - .fl .fi -.RE .LP -.RE .SS Separating Source Files and Class Files -.LP -.RS 3 - .LP .LP It often makes sense to keep source files and class files in separate directories, especially on large projects. We use \f3\-d\fP to indicate the separate class file destination. Since the source files are not in the user class path, we use \f3\-sourcepath\fP to help the compiler find them. -.LP -.RS 3 - .LP .nf \f3 @@ -854,54 +1124,49 @@ farewells/ % \f3ls classes/farewells\fP .fl Base.class GoodBye.class -.fl - -.fl - .fl .fi -.RE .LP .LP -\f3Note:\fP \ The compiler compiled \f2src/farewells/Base.java\fP, even though we didn't specify it on the command line. To trace automatic compiles, use the \f3\-verbose\fP option. +\f3Note:\fP The compiler compiled \f2src/farewells/Base.java\fP, even though we didn't specify it on the command line. To trace automatic compiles, use the \f3\-verbose\fP option. .LP -.RE .SS Cross\-Compilation Example .LP -.RS 3 - .LP -.LP -Here we use \f3javac\fP to compile code that will run on a 1.7 VM. -.LP -.RS 3 - +Here we use \f3javac\fP to compile code that will run on a 1.6 VM. .LP .nf \f3 .fl -% \fP\f3javac \-target 1.7 \-bootclasspath jdk1.7.0/lib/rt.jar \\ +% \fP\f3javac \-source 1.6 \-target 1.6 \-bootclasspath jdk1.6.0/lib/rt.jar \\ .fl \-extdirs "" OldCode.java\fP .fl - -.fl .fi -.RE .LP .LP -The \f3\-target 1.7\fP option ensures that the generated class files will be compatible with 1.7 VMs. By default, \f3javac\fP compiles for JDK 6. -.LP +The \f2\-source 1.6\fP option specifies that version 1.6 (or 6) of the Java programming language be used to compile \f2OldCode.java\fP. The option \f3\-target 1.6\fP option ensures that the generated class files will be compatible with 1.6 VMs. Note that in most cases, the value of the \f3\-target\fP option is the value of the \f3\-source\fP option; in this example, you can omit the \f3\-target\fP option. .LP -The Java Platform JDK's \f3javac\fP would also by default compile against its own bootstrap classes, so we need to tell \f3javac\fP to compile against JDK 1.7 bootstrap classes instead. We do this with \f3\-bootclasspath\fP and \f3\-extdirs\fP. Failing to do this might allow compilation against a Java Platform API that would not be present on a 1.7 VM and would fail at runtime. .LP -.RE -.SH "SEE ALSO" +You must specify the \f3\-bootclasspath\fP option to specify the correct version of the bootstrap classes (the \f2rt.jar\fP library). If not, the compiler generates a warning: .LP +.nf +\f3 +.fl +% \fP\f3javac \-source 1.6 OldCode.java\fP +.fl +warning: [options] bootstrap class path not set in conjunction with \-source 1.6 +.fl +.fi +.LP +.LP +If you do not specify the correct version of bootstrap classes, the compiler will use the old language rules (in this example, it will use version 1.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to non\-existent methods can get included. +.LP +.SH "SEE ALSO" .LP .RS 3 .TP 2 @@ -909,7 +1174,7 @@ o .na \f2The javac Guide\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/javac/index.html .TP 2 o java(1) \- the Java Application Launcher @@ -933,7 +1198,7 @@ o .na \f2The Java Extensions Framework\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/extensions/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/extensions/index.html .RE .LP diff --git a/src/solaris/doc/sun/man/man1/javadoc.1 b/src/solaris/doc/sun/man/man1/javadoc.1 index 16e6a9a1fbf7af5ea2496b7cdb8adaa80e369bc4..6fa939b6b24cb9b86fd0cb2eca7431885dedd64e 100644 --- a/src/solaris/doc/sun/man/man1/javadoc.1 +++ b/src/solaris/doc/sun/man/man1/javadoc.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,27 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javadoc 1 "02 Jun 2010" +.TH javadoc 1 "10 May 2011" .SH "Name" javadoc \- The Java API Documentation Generator -.RS 3 - -.LP -.LP -Generates HTML pages of API documentation from Java source files. This document contains Javadoc examples for Sun Solaris. .LP -.RE +Generates HTML pages of API documentation from Java source files. This document contains Javadoc examples for Solaris. .SH "SYNOPSIS" .LP -.LP \f4javadoc\fP\f2\ [\ \fP\f2options\fP\f2\ ]\ [\ packagenames\ ]\ [\ sourcefilenames\ ]\ [\ \-subpackages\fP\ \f2pkg1:pkg2:...\fP\f2\ ]\ [\ \fP\f2@argfiles\fP\f2\ ]\fP .LP -.LP Arguments can be in any order. See processing of Source Files for details on how the Javadoc tool determines which "\f2.java\fP" files to process. -.LP -.RS 3 - -.LP .RS 3 .TP 3 options @@ -49,11 +38,7 @@ packagenames A series of names of packages, separated by spaces, such as \f2java.lang\ java.lang.reflect\ java.awt\fP. You must separately specify each package you want to document. Wildcards are not allowed; use \-subpackages for recursion. The Javadoc tool uses \f2\-sourcepath\fP to look for these package names. See Example \- Documenting One or More Packages .TP 3 sourcefilenames -A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The Javadoc tool will process every file whose name ends with ".java", and whose name, when stripped of that suffix, is actually a legal class name (see -.na -\f2Identifiers\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625). Therefore, you can name files with dashes (such as \f2X\-Buffer\fP), or other illegal characters, to prevent them from being documented. This is useful for test files and template files The path that precedes the source file name determines where javadoc will look for the file. (The Javadoc tool does \f2not\fP use \f2\-sourcepath\fP to look for these source file names.) Relative paths are relative to the current directory, so passing in \f2Button.java\fP is identical to \f2./Button.java\fP. A source file name with an absolute path and a wildcard, for example, is \f2/home/src/java/awt/Graphics*.java\fP. See Example\ \-\ Documenting One or More Classes. You can also mix packagenames and sourcefilenames, as in Example\ \-\ Documenting Both Packages and Classes +A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The Javadoc tool will process every file whose name ends with ".java", and whose name, when stripped of that suffix, is actually a legal class name (see the Java Language Specification). Therefore, you can name files with dashes (such as \f2X\-Buffer\fP), or other illegal characters, to prevent them from being documented. This is useful for test files and template files The path that precedes the source file name determines where javadoc will look for the file. (The Javadoc tool does \f2not\fP use \f2\-sourcepath\fP to look for these source file names.) Relative paths are relative to the current directory, so passing in \f2Button.java\fP is identical to \f2./Button.java\fP. A source file name with an absolute path and a wildcard, for example, is \f2/home/src/java/awt/Graphics*.java\fP. See Example\ \-\ Documenting One or More Classes. You can also mix packagenames and sourcefilenames, as in Example\ \-\ Documenting Both Packages and Classes .TP 3 \-subpackages pkg1:pkg2:... Generates documentation from source files in the specified packages and recursively in their subpackages. An alternative to supplying packagenames or sourcefilenames. @@ -61,31 +46,19 @@ Generates documentation from source files in the specified packages and recursiv @argfiles One or more files that contain a list of Javadoc options, packagenames and sourcefilenames in any order. Wildcards (*) and \f2\-J\fP options are not allowed in these files. .RE - -.LP -.RE .SH "DESCRIPTION" .LP -.LP The \f3Javadoc\fP tool parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. You can use it to generate the API (Application Programming Interface) documentation or the implementation documentation for a set of source files. .LP -.LP You can run the Javadoc tool on entire packages, individual source files, or both. When documenting entire packages, you can either use \f2\-subpackages\fP for traversing recursively down from a top\-level directory, or pass in an explicit list of package names. When documenting individual source files, you pass in a list of source (\f2.java\fP) filenames. Examples are given at the end of this document. How Javadoc processes source files is covered next. -.LP .SS Processing of source files .LP -.LP The Javadoc tool processes files that end in "\f2.java\fP" plus other files described under Source Files. If you run the Javadoc tool by explicitly passing in individual source filenames, you can determine exactly which "\f2.java\fP" files are processed. However, that is not how most developers want to work, as it is simpler to pass in package names. The Javadoc tool can be run three ways without explicitly specifying the source filenames. You can (1) pass in package names, (2) use \f2\-subpackages\fP, and (3) use wildcards with source filenames (\f2*.java\fP). In these cases, the Javadoc tool processes a "\f2.java\fP" file only if it fulfills all of the following requirements: -.LP .RS 3 .TP 2 o -Its name, after stripping off the "\f2.java\fP" suffix, is actually a legal class name (see -.na -\f2Identifiers\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625 for legal characters) +Its name, after stripping off the "\f2.java\fP" suffix, is actually a legal class name (see the Java Language Specification for legal characters) .TP 2 o Its directory path relative to the root of the source tree is actually a legal package name (after converting its separators to dots) @@ -93,11 +66,8 @@ Its directory path relative to the root of the source tree is actually a legal p o Its package statement contains the legal package name (specified in the previous bullet) .RE - -.LP .LP \f3Processing of links\fP \- During a run, the Javadoc tool automatically adds cross\-reference links to package, class and member names that are being documented as part of that run. Links appear in several places: -.LP .RS 3 .TP 2 o @@ -124,69 +94,50 @@ Package and class inheritance trees o The index .RE - -.LP .LP You can add hyperlinks to existing text for classes not included on the command line (but generated separately) by way of the \f2\-link\fP and \f2\-linkoffline\fP options. .LP -.LP \f3Other processing details\fP \- The Javadoc tool produces one complete document each time it is run; it cannot do incremental builds \-\- that is, it cannot modify or \f2directly\fP incorporate results from previous runs of the Javadoc tool. However, it can link to results from other runs, as just mentioned. .LP -.LP As implemented, the Javadoc tool requires and relies on the java compiler to do its job. The Javadoc tool calls part of \f2javac\fP to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy, and "use" relationships, then generates the HTML from that. The Javadoc tool also picks up user\-supplied documentation from documentation comments in the source code. .LP -.LP In fact, the Javadoc tool will run on \f2.java\fP source files that are pure stub files with no method bodies. This means you can write documentation comments and run the Javadoc tool in the earliest stages of design while creating the API, before writing the implementation. .LP -.LP -Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the Javadoc tool documents -.na -\f2default constructors\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#36154 (section 8.6.7 of \f2Java Language Specification\fP) that are present in the \f2.class\fP files but not in the source code. -.LP +Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the Javadoc tool documents default constructors (see Java Language Specification) that are present in the \f2.class\fP files but not in the source code. .LP In many cases, the Javadoc tool allows you to generate documentation for source files whose code is incomplete or erroneous. This is a benefit that enables you to generate documentation before all debugging and troubleshooting is done. For example, according to the \f2Java Language Specification\fP, a class that contains an abstract method should itself be declared abstract. The Javadoc tool does not check for this, and would proceed without a warning, whereas the javac compiler stops on this error. The Javadoc tool does do some primitive checking of doc comments. Use the DocCheck doclet to check the doc comments more thoroughly. .LP -.LP When the Javadoc tool builds its internal structure for the documentation, it loads all referenced classes. Because of this, the Javadoc tool must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. For more about this, see .na \f2How Classes Are Found\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path. -.LP +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path. .SS Javadoc Doclets .LP -.LP You can customize the content and format of the Javadoc tool's output by using doclets. The Javadoc tool has a default "built\-in" doclet, called the standard doclet, that generates HTML\-formatted API documentation. You can modify or subclass the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you'd like. Information about doclets and their use is at the following locations: -.LP .RS 3 .TP 2 o .na \f2Javadoc Doclets\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html .TP 2 o The \f2\-doclet\fP command\-line option .RE - -.LP .LP When a custom doclet is not specified with the \f2\-doclet\fP command line option, the Javadoc tool will use the default standard doclet. The javadoc tool has several command line options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command line options. Both sets of options are described below in the options section. -.LP .SS Related Documentation and Doclets -.LP .RS 3 .TP 2 o .na \f2Javadoc Enhancements\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/index.html for details about improvements added in Javadoc. +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html for details about improvements added in Javadoc. .TP 2 o .na @@ -198,7 +149,7 @@ o .na \f2How to Write Doc Comments for Javadoc\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html for more information about Sun conventions for writing documentation comments. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html for more information about Sun conventions for writing documentation comments. .TP 2 o .na @@ -216,22 +167,18 @@ o .na \f2DocCheck Doclet\fP @ .fi -http://java.sun.com/javadoc/doccheck \- Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Sun Doc Check Utilities. +http://www.oracle.com/technetwork/java/javase/documentation/index\-141437.html \- Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Doc Check Utilities. .TP 2 o .na \f2MIF Doclet\fP @ .fi -http://java.sun.com/javadoc/mifdoclet \- Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format. +http://java.sun.com/j2se/javadoc/mifdoclet/ \- Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format. .RE - -.LP .SS Terminology .LP -.LP The terms \f2documentation comment\fP, \f2doc comment\fP, \f2main description\fP, \f2tag\fP, \f2block tag\fP, and \f2in\-line tag\fP are described at Documentation Comments. These other terms have specific meanings within the context of the Javadoc tool: -.LP .RS 3 .TP 3 generated document @@ -259,34 +206,25 @@ The classes and interfaces that are explicitly referred to in the definition (im .na \f21.3\fP @ .fi -http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javadoc.html#referencedclasses.) When the Javadoc tool is run, it should load into memory all of the referenced classes in javadoc's bootclasspath and classpath. (The Javadoc tool prints a "Class not found" warning for referenced classes not found.) The Javadoc tool can derive enough information from the .class files to determine their existence and the fully\-qualified names of their members. +http://download.oracle.com/javase/1.3/docs/tooldocs/solaris/javadoc.html#referencedclasses.) When the Javadoc tool is run, it should load into memory all of the referenced classes in javadoc's bootclasspath and classpath. (The Javadoc tool prints a "Class not found" warning for referenced classes not found.) The Javadoc tool can derive enough information from the .class files to determine their existence and the fully\-qualified names of their members. .LP .TP 3 external referenced classes The referenced classes whose documentation is not being generated during a javadoc run. In other words, these classes are not passed into the Javadoc tool on the command line. Links in the generated documentation to those classes are said to be \f2external references\fP or \f2external links\fP. For example, if you run the Javadoc tool on only the \f2java.awt\fP package, then any class in \f2java.lang\fP, such as \f2Object\fP, is an external referenced class. External referenced classes can be linked to using the \f2\-link\fP and \f2\-linkoffline\fP options. An important property of an external referenced class is that its source comments are normally not available to the Javadoc run. In this case, these comments cannot be inherited. .RE - -.LP .SH "SOURCE FILES" .LP -.LP The Javadoc tool will generate output originating from four different types of "source" files: Java language source files for classes (\f2.java\fP), package comment files, overview comment files, and miscellaneous unprocessed files. This section also covers test files and template files that can also be in the source tree, but which you want to be sure not to document. -.LP .SS Class Source Code Files .LP -.LP Each class or interface and its members can have their own documentation comments, contained in a \f2.java\fP file. For more details about these doc comments, see Documentation Comments. -.LP .SS Package Comment Files .LP -.LP Each package can have its own documentation comment, contained in its own "source" file, that the Javadoc tool will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package. .LP -.LP To create a package comment file, you have a choice of two files to place your comments: -.LP .RS 3 .TP 2 o @@ -295,52 +233,18 @@ o o \f2package.html\fP \- Can contain only package comments and Javadoc tags, no package annotations. .RE - -.LP .LP A package may have a single \f2package.html\fP file or a single \f2package\-info.java\fP file but not both. Place either file in the package directory in the source tree along with your \f2.java\fP files. .LP -.LP \f4package\-info.java\fP \- This file can contain a package comment of the following structure \-\- the comment is placed before the package declaration: .LP -.LP File: \f2java/applet/package\-info.java\fP -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 .nf \f3 .fl /** .fl - * Provides the classes necessary to create an + * Provides the classes necessary to create an .fl * applet and the classes an applet uses .fl @@ -372,105 +276,12 @@ package java.lang.applet; .fl \fP .fi -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 352 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-42 - -.LP .LP Note that while the comment separators \f2/**\fP and \f2/*\fP must be present, the leading asterisks on the intermediate lines can be omitted. .LP -.LP \f4package.html\fP \- This file can contain a package comment of the following structure \-\- the comment is placed in the \f2<body>\fP element: .LP -.LP File: \f2java/applet/package.html\fP -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 .nf \f3 .fl @@ -478,7 +289,7 @@ File: \f2java/applet/package.html\fP .fl <BODY> .fl -Provides the classes necessary to create an applet and the +Provides the classes necessary to create an applet and the .fl classes an applet uses to communicate with its applet context. .fl @@ -506,77 +317,14 @@ initialize, start, and stop the applet. .fl \fP .fi -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 405 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-40 - -.LP .LP Notice this is just a normal HTML file and does not include a package declaration. The content of the package comment file is written in HTML, like all other comments, with one exception: The documentation comment should not include the comment separators \f2/**\fP and \f2*/\fP or leading asterisks. When writing the comment, you should make the first sentence a summary about the package, and not put a title or any other text between \f2<body>\fP and the first sentence. You can include package tags; as with any documentation comment, all block tags must appear after the main description. If you add a \f2@see\fP tag in a package comment file, it must have a fully\-qualified name. For more details, see the .na \f2example of \fP\f2package.html\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#packagecomments. -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#packagecomments. .LP \f3Processing of package comment file\fP \- When the Javadoc tool runs, it will automatically look for the package comment file; if found, the Javadoc tool does the following: -.LP .RS 3 .TP 2 o @@ -590,35 +338,27 @@ Inserts the processed text at the bottom of the package summary page it generate .na \f2Package Summary\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/applet/package\-summary.html. +http://download.oracle.com/javase/7/docs/api/java/applet/package\-summary.html. .TP 2 o Copies the first sentence of the package comment to the top of the package summary page. It also adds the package name and this first sentence to the list of packages on the overview page, as shown in .na \f2Overview Summary\fP @ .fi -http://java.sun.com/javase/6/docs/api/overview\-summary.html. The end\-of\-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions. +http://download.oracle.com/javase/7/docs/api/overview\-summary.html. The end\-of\-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions. .RE - -.LP .SS Overview Comment File .LP -.LP Each application or set of packages that you are documenting can have its own overview documentation comment, kept in its own "source" file, that the Javadoc tool will merge into the overview page that it generates. You typically include in this comment any documentation that applies to the entire application or set of packages. .LP -.LP To create an overview comment file, you can name the file anything you want, typically \f4overview.html\fP and place it anywhere, typically at the top level of the source tree. For example, if the source files for the \f2java.applet\fP package are contained in \f2/home/user/src/java/applet\fP directory, you could create an overview comment file at \f2/home/user/src/overview.html\fP. .LP -.LP Notice you can have multiple overview comment files for the same set of source files, in case you want to run javadoc multiple times on different sets of packages. For example, you could run javadoc once with \-private for internal documentation and again without that option for public documentation. In this case, you could describe the documentation as public or internal in the first sentence of each overview comment file. .LP -.LP The content of the overview comment file is one big documentation comment, written in HTML, like the package comment file described previously. See that description for details. To re\-iterate, when writing the comment, you should make the first sentence a summary about the application or set of packages, and not put a title or any other text between \f2<body>\fP and the first sentence. You can include overview tags; as with any documentation comment, all tags except in\-line tags, such as \f2{@link}\fP, must appear after the main description. If you add a \f2@see\fP tag, it must have a fully\-qualified name. .LP -.LP When you run the Javadoc tool, you specify the overview comment file name with the \-overview option. The file is then processed similar to that of a package comment file. -.LP .RS 3 .TP 2 o @@ -632,25 +372,19 @@ Inserts the processed text at the bottom of the overview page it generates, as s .na \f2Overview Summary\fP @ .fi -http://java.sun.com/javase/6/docs/api/overview\-summary.html. +http://download.oracle.com/javase/7/docs/api/overview\-summary.html. .TP 2 o Copies the first sentence of the overview comment to the top of the overview summary page. .RE - -.LP .SS Miscellaneous Unprocessed Files .LP -.LP You can also include in your source any miscellaneous files that you want the Javadoc tool to copy to the destination directory. These typically includes graphic files, example Java source (.java) and class (.class) files, and self\-standing HTML files whose content would overwhelm the documentation comment of a normal Java source file. .LP -.LP To include unprocessed files, put them in a directory called \f4doc\-files\fP which can be a subdirectory of any package directory that contains source files. You can have one such subdirectory for each package. You might include images, example code, source files, .class files, applets and HTML files. For example, if you want to include the image of a button \f2button.gif\fP in the \f2java.awt.Button\fP class documentation, you place that file in the \f2/home/user/src/java/awt/doc\-files/\fP directory. Notice the \f2doc\-files\fP directory should not be located at \f2/home/user/src/java/doc\-files\fP because \f2java\fP is not a package \-\- that is, it does not directly contain any source files. .LP -.LP All links to these unprocessed files must be hard\-coded, because the Javadoc tool does not look at the files \-\- it simply copies the directory and all its contents to the destination. For example, the link in the \f2Button.java\fP doc comment might look like: -.LP .nf \f3 .fl @@ -664,23 +398,16 @@ All links to these unprocessed files must be hard\-coded, because the Javadoc to .fl \fP .fi - -.LP .SS Test Files and Template Files .LP -.LP Some developers have indicated they want to store test files and templates files in the source tree near their corresponding source files. That is, they would like to put them in the same directory, or a subdirectory, of those source files. .LP -.LP If you run the Javadoc tool by explicitly passing in individual source filenames, you can deliberately omit test and templates files and prevent them from being processed. However, if you are passing in package names or wildcards, you need to follow certain rules to ensure these test files and templates files are not processed. .LP -.LP Test files differ from template files in that the former are legal, compilable source files, while the latter are not, but may end with ".java". .LP -.LP \f3Test files\fP \- Often developers want to put compilable, runnable test files for a given package in the \f2same\fP directory as the source files for that package. But they want the test files to belong to a package other than the source file package, such as the unnamed package (so the test files have no package statement or a different package statement from the source). In this scenario, when the source is being documented by specifying its package name specified on the command line, the test files will cause warnings or errors. You need to put such test files in a subdirectory. For example, if you want to add test files for source files in \f2com.package1\fP, put them in a subdirectory that would be an invalid package name (because it contains a hyphen): -.LP .nf \f3 .fl @@ -688,29 +415,17 @@ Test files differ from template files in that the former are legal, compilable s .fl \fP .fi - -.LP .LP The test directory will be skipped by the Javadoc tool with no warnings. .LP -.LP If your test files contain doc comments, you can set up a separate run of the Javadoc tool to produce documentation of the test files by passing in their test source filenames with wildcards, such as \f2com/package1/test\-files/*.java\fP. .LP -.LP -\f3Templates for source files\fP \- Template files have names that often end in ".java" and are not compilable. If you have a template for a source file that you want to keep in the source directory, you can name it with a dash (such as \f2Buffer\-Template.java\fP), or any other illegal Java character, to prevent it from being processed. This relies on the fact that the Javadoc tool will only process source files whose name, when stripped of the ".java" suffix, is actually a legal class name (see -.na -\f2Identifiers\fP @ -.fi -http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625). -.LP +\f3Templates for source files\fP \- Template files have names that often end in ".java" and are not compilable. If you have a template for a source file that you want to keep in the source directory, you can name it with a dash (such as \f2Buffer\-Template.java\fP), or any other illegal Java character, to prevent it from being processed. This relies on the fact that the Javadoc tool will only process source files whose name, when stripped of the ".java" suffix, is actually a legal class name (see information about Identifiers in the Java Language Specification). .SH "GENERATED FILES" .LP -.LP By default, javadoc uses a standard doclet that generates HTML\-formatted documentation. This doclet generates the following kinds of files (where each HTML "page" corresponds to a separate file). Note that javadoc generates files with two types of names: those named after classes/interfaces, and those that are not (such as \f2package\-summary.html\fP). Files in the latter group contain hyphens to prevent filename conflicts with those in the former group. .LP -.LP \f3Basic Content Pages\fP -.LP .RS 3 .TP 2 o @@ -722,11 +437,8 @@ One \f3package page\fP (\f2package\-summary.html\fP) for each package it is docu o One \f3overview page\fP (\f2overview\-summary.html\fP) for the entire set of packages. This is the front page of the generated document. The Javadoc tool will include any HTML text provided in a file specified with the \f2\-overview\fP option. Note that this file is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) .RE - -.LP .LP \f3Cross\-Reference Pages\fP -.LP .RS 3 .TP 2 o @@ -750,15 +462,12 @@ A \f3serialized form page\fP (\f2serialized\-form.html\fP) for information about o An \f3index\fP (\f2index\-*.html\fP) of all class, interface, constructor, field and method names, alphabetically arranged. This is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A\-Z for English). .RE - -.LP .LP \f3Support Files\fP -.LP .RS 3 .TP 2 o -A \f3help page\fP (\f2help\-doc.html\fP) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using \f2\-helpfile\fP. +A \f3help page\fP (\f2help\-doc.html\fP) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using \f2\-helpfile\fP. .TP 2 o One \f3index.html file\fP which creates the HTML frames for display. This is the file you load to display the front page with frames. This file itself contains no text content. @@ -775,45 +484,14 @@ A \f3style sheet\fP file (\f2stylesheet.css\fP) that controls a limited amount o o A \f3doc\-files\fP directory that holds any image, example, source code or other files that you want copied to the destination directory. These files are not processed by the Javadoc tool in any manner \-\- that is, any javadoc tags in them will be ignored. This directory is not generated unless it exists in the source tree. .RE - -.LP .LP \f3HTML Frames\fP .LP -.LP The Javadoc tool will generate either two or three HTML frames, as shown in the figure below. It creates the minimum necessary number of frames by omitting the list of packages if there is only one package (or no packages). That is, when you pass a single package name or source files (*.java) belonging to a single package as arguments into the javadoc command, it will create only one frame (C) in the left\-hand column \-\- the list of classes. When you pass into javadoc two or more package names, it creates a third frame (P) listing all packages, as well as an overview page (Detail). This overview page has the filename \f2overview\-summary.html\fP. Thus, this file is created only if you pass in two or more package names. You can bypass frames by clicking on the "No Frames" link or entering at overview\-summary.html. .LP -.LP If you are unfamiliar with HTML frames, you should be aware that frames can have \f2focus\fP for printing and scrolling. To give a frame focus, click on it. Then on many browsers the arrow keys and page keys will scroll that frame, and the print menu command will print it. .LP -.nf -\f3 -.fl - \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- -.fl - |C| Detail | |P| Detail | -.fl - | | | | | | -.fl - | | | |\-| | -.fl - | | | |C| | -.fl - | | | | | | -.fl - | | | | | | -.fl - \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- -.fl - javadoc *.java javadoc java.lang java.awt -.fl -\fP -.fi - -.LP -.LP Load one of the following two files as the starting page depending on whether you want HTML frames or not: -.LP .RS 3 .TP 2 o @@ -822,24 +500,14 @@ o o \f2overview\-summary.html\fP (for no frames) .RE - -.LP .LP \f3Generated File Structure\fP .LP -.LP The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage. .LP -.LP For example, the document generated for the class \f2java.applet.Applet\fP class would be located at \f2java/applet/Applet.html\fP. The file structure for the java.applet package follows, given that the destination directory is named \f2apidocs\fP. All files that contain the word "frame" appear in the upper\-left or lower\-left frames, as noted. All other HTML files appear in the right\-hand frame. .LP -.RS 3 - -.LP -.LP NOTE \- Directories are shown in \f3bold\fP. The asterisks (\f2*\fP) indicate the files and directories that are \f2omitted\fP when the arguments to javadoc are source filenames (*.java) rather than package names. Also when arguments are source filenames, \f2package\-list\fP is created but is empty. The doc\-files directory will not be created in the destination unless it exists in the source tree. -.LP -.RE .nf \f3 .fl @@ -922,44 +590,31 @@ NOTE \- Directories are shown in \f3bold\fP. The asterisks (\f2*\fP) indicate th AudioClip.html Page for AudioClip source code .fl .fi - -.LP .SS Generated API Declarations .LP -.LP The Javadoc tool generates a declaration at the start of each class, interface, field, constructor, and method description for that API item. For example, the declaration for the \f2Boolean\fP class is: .LP -.LP \f2public final class Boolean\fP .br \f2extends Object\fP .br \f2implements Serializable\fP .LP -.LP and the declaration for the \f2Boolean.valueOf\fPmethod is: .LP -.LP \f2public static Boolean valueOf(String s)\fP .LP -.LP The Javadoc tool can include the modifiers \f2public\fP, \f2protected\fP, \f2private\fP, \f2abstract\fP, \f2final\fP, \f2static\fP, \f2transient\fP, and \f2volatile\fP, but not \f2synchronized\fP or \f2native\fP. These last two modifiers are considered implementation detail and not part of the API specification. .LP -.LP Rather than relying on the keyword \f2synchronized\fP, APIs should document their concurrency semantics in the comment's main description, as in "a single \f2Enumeration\fP cannot be used by multiple threads concurrently". The document should not describe how to achieve these semantics. As another example, while \f2Hashtable\fP should be thread\-safe, there's no reason to specify that we achieve this by synchronizing all of its exported methods. We should reserve the right to synchronize internally at the bucket level, thus offering higher concurrency. -.LP .SH "DOCUMENTATION COMMENTS" .LP -.LP The original "Documentation Comment Specification" can be found under related documentation. -.LP .SS Commenting the Source Code .LP -.LP You can include \f2documentation comments\fP ("doc comments") in the source code, ahead of declarations for any class, interface, method, constructor, or field. You can also create doc comments for each package and another one for the overview, though their syntax is slightly different. Doc comments are also known informally as "Javadoc comments" (but this term violates its trademark usage). A doc comment consists of the characters between the characters \f2/**\fP that begin the comment and the characters \f2*/\fP that end it. Leading asterisks are allowed on each line and are described further below. The text in a comment can continue onto multiple lines. -.LP .nf \f3 .fl @@ -973,11 +628,8 @@ You can include \f2documentation comments\fP ("doc comments") in the source code .fl \fP .fi - -.LP .LP To save space you can put a comment on one line: -.LP .nf \f3 .fl @@ -985,14 +637,10 @@ To save space you can put a comment on one line: .fl \fP .fi - -.LP .LP \f3Placement of comments\fP \- Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations \-\- see the class example, method example, and field example. Documentation comments placed in the body of a method are ignored. Only one documentation comment per declaration statement is recognized by the Javadoc tool. .LP -.LP A common mistake is to put an \f2import\fP statement between the class comment and the class declaration. Avoid this, as the Javadoc tool will ignore the class comment. -.LP .nf \f3 .fl @@ -1014,11 +662,8 @@ A common mistake is to put an \f2import\fP statement between the class comment a .fl \fP .fi - -.LP .LP \f3A doc comment is composed of a \fP\f4main description\fP\f3 followed by a \fP\f4tag section\fP \- The \f2main description\fP begins after the starting delimiter \f2/**\fP and continues until the tag section. The \f2tag section\fP starts with the first block tag, which is defined by the first \f2@\fP character that begins a line (ignoring leading asterisks, white space, and leading separator \f2/**\fP). It is possible to have a comment with only a tag section and no main description. The main description cannot continue after the tag section begins. The argument to a tag can span multiple lines. There can be any number of tags \-\- some types of tags can be repeated while others cannot. For example, this \f2@see\fP starts the tag section: -.LP .nf \f3 .fl @@ -1032,11 +677,8 @@ A common mistake is to put an \f2import\fP statement between the class comment a .fl \fP .fi - -.LP .LP \f3Block tags and in\-line tags\fP \- A \f2tag\fP is a special keyword within a doc comment that the Javadoc tool can process. There are two kinds of tags: block tags, which appear as \f2@tag\fP (also known as "standalone tags"), and in\-line tags, which appear within curly braces, as \f2{@tag}\fP. To be interpreted, a block tag must appear at the beginning of a line, ignoring leading asterisks, white space, and separator (\f2/**\fP). This means you can use the \f2@\fP character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the \f2@\fP character and not have it be interpreted, use the HTML entity \f2@\fP. Each block tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the doc comment. This associated text can span multiple lines. An in\-line tag is allowed and interpreted anywhere that text is allowed. The following example contains the block tag \f2@deprecated\fP and in\-line tag \f2{@link}\fP. -.LP .nf \f3 .fl @@ -1048,17 +690,12 @@ A common mistake is to put an \f2import\fP statement between the class comment a .fl \fP .fi - -.LP .LP \f3Comments are written in HTML\fP \- The text must be written in HTML, in that they should use HTML entities and can use HTML tags. You can use whichever version of HTML your browser supports; we have written the standard doclet to generate HTML 3.2\-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. (We preface each generated file with "HTML 4.0" because of the frame sets.) .LP -.LP For example, entities for the less\-than (\f2<\fP) and greater\-than (\f2>\fP) symbols should be written \f2<\fP and \f2>\fP. Likewise, the ampersand (\f2&\fP) should be written \f2&\fP. The bold HTML tag \f2<b>\fP is shown in the following example. .LP -.LP Here is a doc comment: -.LP .nf \f3 .fl @@ -1072,20 +709,12 @@ Here is a doc comment: .fl \fP .fi - -.LP .LP \f3Leading asterisks\fP \- When javadoc parses a doc comment, leading asterisk (\f2*\fP) characters on each line are discarded; blanks and tabs preceding the initial asterisk (\f2*\fP) characters are also discarded. Starting with 1.4, if you omit the leading asterisk on a line, the leading white space is no longer removed. This enables you to paste code examples directly into a doc comment inside a \f2<PRE>\fP tag, and its indentation will be honored. Spaces are generally interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator \f2/**\fP or \f2<PRE>\fP tag). .LP -.LP \f3First sentence\fP \- The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first block tag. The Javadoc tool copies this first sentence to the member summary at the top of the HTML page. .LP -.LP \f3Declaration with multiple fields\fP \- Java allows declaring multiple fields in a single statement, but this statement can have only one documentation comment, which is copied for all fields. Therefore if you want individual documentation comments for each field, you must declare each field in a separate statement. For example, the following documentation comment doesn't make sense written as a single declaration and would be better handled as two declarations: -.LP -.RS 3 - -.LP .nf \f3 .fl @@ -1099,51 +728,32 @@ public int x, y; // Avoid this .fl \fP .fi -.RE - -.LP .LP The Javadoc tool generates the following documentation from the above code: -.LP -.RS 3 - -.LP .nf \f3 .fl public int \fP\f3x\fP .fl .fi - -.LP .RS 3 The horizontal and vertical distances of point (x,y) .RE - -.LP .nf \f3 .fl public int \fP\f3y\fP .fl .fi - -.LP .RS 3 The horizontal and vertical distances of point (x,y) .RE - -.LP -.RE .LP \f3Use header tags carefully\fP \- When writing documentation comments for members, it's best not to use HTML heading tags such as <H1> and <H2>, because the Javadoc tool creates an entire structured document and these structural tags might interfere with the formatting of the generated document. However, it is fine to use these headings in class and package comments to provide your own structure. -.LP .SS Automatic Copying of Method Comments .LP -.LP The Javadoc tool has the ability to copy or "inherit" method comments in classes and interfaces under the following two circumstances. Constructors, fields and nested classes do not inherit doc comments. -.LP .RS 3 .TP 2 o @@ -1156,14 +766,10 @@ This behavior contrasts with version 1.3 and earlier, where the presence of any o \f3Explicitly inherit comment with {@inheritDoc} tag\fP \- Insert the inline tag \f2{@inheritDoc}\fP in a method main description or \f2@return\fP, \f2@param\fP or \f2@throws\fP tag comment \-\- the corresponding inherited main description or tag comment is copied into that spot. .RE - -.LP .LP The source file for the inherited method need only be on the path specified by \-sourcepath for the doc comment to actually be available to copy. Neither the class nor its package needs to be passed in on the command line. This contrasts with 1.3.x and earlier releases, where the class had to be a documented class .LP -.LP \f3Inherit from classes and interfaces\fP \- Inheriting of comments occurs in all three possible cases of inheritance from classes and interfaces: -.LP .RS 3 .TP 2 o @@ -1175,17 +781,12 @@ When a method in an interface overrides a method in a superinterface o When a method in a class implements a method in an interface .RE - -.LP .LP In the first two cases, for method overrides, the Javadoc tool generates a subheading "Overrides" in the documentation for the overriding method, with a link to the method it is overriding, whether or not the comment is inherited. .LP -.LP In the third case, when a method in a given class implements a method in an interface, the Javadoc tool generates a subheading "Specified by" in the documentation for the overriding method, with a link to the method it is implementing. This happens whether or not the comment is inherited. .LP -.LP \f3Algorithm for Inheriting Method Comments\fP \- If a method does not have a doc comment, or has an {@inheritDoc} tag, the Javadoc tool searches for an applicable comment using the following algorithm, which is designed to find the most specific applicable doc comment, giving preference to interfaces over superclasses: -.LP .RS 3 .TP 3 1. @@ -1205,16 +806,11 @@ b. If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass. .RE .RE - -.LP .SH "JAVADOC TAGS" .LP -.LP The Javadoc tool parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well\-formatted API from your source code. The tags start with an "at" sign (\f2@\fP) and are case\-sensitive \-\- they must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk) or it is treated as normal text. By convention, tags with the same name are grouped together. For example, put all \f2@see\fP tags together. .LP -.LP Tags come in two types: -.LP .RS 3 .TP 2 o @@ -1223,8 +819,6 @@ o o \f3Inline tags\fP \- Can be placed anywhere in the main description or in the comments for block tags. Inline tags are denoted by curly braces: \f2{@tag}\fP. .RE - -.LP .LP For information about tags we might introduce in future releases, see .na @@ -1232,13 +826,8 @@ For information about tags we might introduce in future releases, see .fi http://java.sun.com/j2se/javadoc/proposed\-tags.html. .LP -.LP The current tags are: .LP -.RS 3 - -.LP -.LP .TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 @@ -1350,7 +939,7 @@ The current tags are: .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 1122 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 873 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1450,53 +1039,34 @@ The current tags are: .35 .TE .if \n-(b.=0 .nr c. \n(.c-\n(d.-42 - -.LP .LP For custom tags, see the \-tag option. -.LP -.RE .RS 3 .TP 3 @author\ name\-text Adds an "Author" entry with the specified \f2name\-text\fP to the generated docs when the \-author option is used. A doc comment may contain multiple \f2@author\fP tags. You can specify one name per \f2@author\fP tag or multiple names per tag. In the former case, the Javadoc tool inserts a comma (\f2,\fP) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, you can use multiple names per line if you want a localized name separator other than comma. +.RE .LP For more details, see Where Tags Can Be Used and .na \f2writing @author tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@author. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@author. .LP -.TP 3 -@deprecated\ deprecated\-text .RS 3 - -.LP -.LP -Note: You can deprecate a program element using the -.na -\f2@Deprecated annotation\fP @ -.fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/deprecation/deprecation.html. -.LP -.RE +.TP 3 +@deprecated\ deprecated\-text Note: You can deprecate a program element using the @Deprecated annotation. .RE -.RS 3 - -.LP .LP Adds a comment indicating that this API should no longer be used (even though it may continue to work). The Javadoc tool moves the \f2deprecated\-text\fP ahead of the main description, placing it in italics and preceding it with a bold warning: "Deprecated". This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field. .LP -.LP The first sentence of \f2deprecated\-text\fP should at least tell the user when the API was deprecated and what to use as a replacement. The Javadoc tool copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a \f2{@link}\fP tag (for Javadoc 1.2 or later) that points to the replacement API: .LP -.LP For more details, see .na \f2writing @deprecated tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@deprecated. -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@deprecated. .RS 3 .TP 2 o @@ -1518,19 +1088,13 @@ For Javadoc 1.2 and later, use a \f2{@link}\fP tag. This creates the link in\-li o For Javadoc 1.1, the standard format is to create a \f2@see\fP tag (which cannot be in\-line) for each \f2@deprecated\fP tag. .RE - -.LP .LP For more about deprecation, see .na \f2The @deprecated tag\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/deprecation/index.html. -.LP -.LP - +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/deprecation/index.html. .LP -.RE .RS 3 .TP 3 {@code\ text} @@ -1700,7 +1264,7 @@ For more details, see .na \f2writing {@link} tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#{@link}. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#{@link}. .LP .TP 3 {@linkplain\ package.class#member\ label} @@ -1716,13 +1280,8 @@ Identical to \f2{@link}\fP, except the link's label is displayed in plain text t .fi .LP This would display as: -.RS 3 - -.LP .LP -Refer to the overridden method. -.LP -.RE +Refer to the overridden method. .LP .TP 3 {@literal\ text} @@ -1799,7 +1358,7 @@ For more details, see .na \f2writing @param tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@param. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@param. .LP .TP 3 @return\ description @@ -1809,7 +1368,7 @@ For more details, see .na \f2writing @return tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@return. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@return. .LP .TP 3 @see\ reference @@ -1834,18 +1393,12 @@ This generates text such as: .RS 3 .RS 3 .RS 3 - -.LP -.RS 3 .RS 3 .TP 3 See Also: "The Java Programming Language" .RE .RE - -.LP -.RE .TP 3 @see <a href="URL#value">label</a> Adds a link as defined by \f2URL\fP#\f2value\fP. The \f2URL\fP#\f2value\fP is a relative or absolute URL. The Javadoc tool distinguishes this from other cases by looking for a less\-than symbol (\f2<\fP) as the first character. For example: @@ -1858,14 +1411,10 @@ Adds a link as defined by \f2URL\fP#\f2value\fP. The \f2URL\fP#\f2value\fP is a .fi This generates a link such as: .RS 3 -.RS 3 .TP 3 See Also: Java Spec .RE - -.LP -.RE .TP 3 @see\ package.class#member\ label Adds a link, with visible text \f2label\fP, that points to the documentation for the specified name in the Java Language that is referenced. The \f2label\fP is optional; if omitted, the name appears instead as the visible text, suitably shortened \-\- see How a name is displayed. Use \-noqualifier to globally remove the package name from this visible text. Use the label when you want the visible text to be different from the auto\-generated visible text. @@ -1885,7 +1434,6 @@ A space is the delimiter between \f2package.class\fP\f2#\fP\f2member\fP and \f2l .RE .LP \f3Example\fP \- In this example, an \f2@see\fP tag (in the \f2Character\fP class) refers to the \f2equals\fP method in the \f2String\fP class. The tag includes both arguments: the name "\f2String#equals(Object)\fP" and the label "\f2equals\fP". -.RS 3 .nf \f3 .fl @@ -1897,11 +1445,7 @@ A space is the delimiter between \f2package.class\fP\f2#\fP\f2member\fP and \f2l .fl \fP .fi -.RE The standard doclet produces HTML something like this: -.RS 3 - -.LP .nf \f3 .fl @@ -1915,19 +1459,12 @@ The standard doclet produces HTML something like this: .fl \fP .fi -.RE Which looks something like this in a browser, where the label is the visible link text: .RS 3 - -.LP -.RS 3 .TP 3 See Also: equals .RE - -.LP -.RE .LP \f3Specifying a name\fP \- This \f2package.class\fP\f2#\fP\f2member\fP name can be either fully\-qualified, such as \f2java.lang.String#toUpperCase()\fP or not, such as \f2String#toUpperCase()\fP or \f2#toUpperCase()\fP. If less than fully\-qualified, the Javadoc tool uses the normal Java compiler search order to find it, further described below in Search order for @see. The name can contain whitespace within parentheses, such as between method arguments. .LP @@ -2079,7 +1616,7 @@ Of course the advantage of providing shorter, "partially\-qualified" names is th .nr 40 \n(79+(0*\n(38) .nr 80 +\n(40 .nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 1665 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 1364 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2186,7 +1723,7 @@ As stated, the hash character (\f2#\fP), rather than a dot (\f2.\fP) separates a .LP \f3Search order for @see\fP \- the Javadoc tool will process a \f2@see\fP tag that appears in a source file (.java), package file (package.html or package\-info.java) or overview file (overview.html). In the latter two files, you must fully\-qualify the name you supply with \f2@see\fP. In a source file, you can specify a name that is fully\-qualified or partially\-qualified. .LP -When the Javadoc tool encounters a \f2@see\fP tag in a \f2.java\fP file that is \f2not\fP fully qualified, it searches for the specified name in the same order as the Java compiler would (except the Javadoc tool will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in Chapter 6, "Names" of the \f2Java Language Specification\fP, Second Edition. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order: +When the Javadoc tool encounters a \f2@see\fP tag in a \f2.java\fP file that is \f2not\fP fully qualified, it searches for the specified name in the same order as the Java compiler would (except the Javadoc tool will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in the \f2Java Language Specification\fP. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order: .RS 3 .TP 3 1. @@ -2425,7 +1962,7 @@ Use \-noqualifier to globally remove the package names. .nr 42 \n(81+(3*\n(38) .nr 82 +\n(42 .nr TW \n(82 -.if t .if \n(TW>\n(.li .tm Table at line 1741 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 1440 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2598,14 +2135,9 @@ For more details, see .na \f2writing @see tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@see. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@see. .RE .RE -.RS 3 - -.LP -.LP - .LP .RS 3 .TP 3 @@ -2634,11 +2166,11 @@ For more information about how to use these tags, along with an example, see " .na \f2Documenting Serializable Fields and Data for a Class\fP @ .fi -http://java.sun.com/javase/6/docs/platform/serialization/spec/serial\-arch.html," Section 1.6 of the \f2Java Object Serialization Specification\fP. Also see the +http://download.oracle.com/javase/7/docs/platform/serialization/spec/serial\-arch.html," Section 1.6 of the \f2Java Object Serialization Specification\fP. Also see the .na \f2Serialization FAQ\fP @ .fi -http://java.sun.com/products/jdk/serialization/faq/#javadoc_warn_missing, which covers common questions, such as "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the \-private switch?". Also see +http://java.sun.com/javase/technologies/core/basic/serializationFAQ.jsp#javadoc_warn_missing, which covers common questions, such as "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the \-private switch?". Also see .na \f2Sun's criteria\fP @ .fi @@ -2681,7 +2213,7 @@ For more details, see .na \f2writing @throws tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@exception. +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@exception. .LP .TP 3 {@value\ package.class#field} @@ -2727,7 +2259,7 @@ These values of these constants are also displayed on the .na \f2Constant Field Values\fP @ .fi -http://java.sun.com/javase/6/docs/api/constant\-values.html page. +http://download.oracle.com/javase/7/docs/api/constant\-values.html page. .LP .TP 3 @version\ version\-text @@ -2739,376 +2271,111 @@ For more details, see .na \f2writing @version tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@version. -.RE - -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@version. .RE .SS Where Tags Can Be Used .LP -.LP The following sections describe where the tags can be used. Note that these tags can be used in all doc comments: \f2@see\fP, \f2@since\fP, \f2@deprecated\fP, \f2{@link}\fP, \f2{@linkplain}\fP, and \f2{@docroot}\fP. -.LP -.RS 3 - -.LP .SS Overview Documentation Tags .LP -.LP Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named \f2overview.html\fP). Like in any other documentation comments, these tags must appear after the main description. .LP -.LP \f3NOTE\fP \- The \f2{@link}\fP tag has a bug in overview documents in version 1.2 \-\- the text appears properly but has no link. The \f2{@docRoot}\fP tag does not currently work in overview documents. .LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@author\fP -.br -\f2@version\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Overview Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 1962 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Overview Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-20 - -.LP -.SS -Package Documentation Tags -.LP +\f3Overview Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@author\fP +.TP 2 +o +\f2@version\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE +.SS +Package Documentation Tags .LP Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named \f2package.html\fP or \f2package\-info.java\fP). The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. .LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@serial\fP -.br -\f2@author\fP -.br -\f2@version\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Package Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 1994 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Package Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-22 - -.LP +\f3Package Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@serial\fP +.TP 2 +o +\f2@author\fP +.TP 2 +o +\f2@version\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE .SS Class and Interface Documentation Tags .LP -.LP The following are tags that can appear in the documentation comment for a class or interface. The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. .LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@deprecated\fP -.br -\f2@serial\fP -.br -\f2@author\fP -.br -\f2@version\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Class/Interface Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 2028 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Class/Interface Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-24 - -.LP +\f3Class/Interface Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@deprecated\fP +.TP 2 +o +\f2@serial\fP +.TP 2 +o +\f2@author\fP +.TP 2 +o +\f2@version\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE \f3An example of a class comment:\fP -.LP .nf \f3 .fl @@ -3146,129 +2413,42 @@ class Window extends BaseWindow { .fl \fP .fi - -.LP .SS Field Documentation Tags .LP +The following are the tags that can appear in .LP -The following are the tags that can appear in the documentation comment for a field. -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@deprecated\fP -.br -\f2@serial\fP -.br -\f2@serialField\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@docRoot}\fP -.br -\f2{@value}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Field Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 2103 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Field Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-24 - -.LP +\f3Field Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@deprecated\fP +.TP 2 +o +\f2@serial\fP +.TP 2 +o +\f2@serialField\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@docRoot}\fP +.TP 2 +o +\f2{@value}\fP +.RE \f3An example of a field comment:\fP -.LP .nf \f3 .fl @@ -3286,133 +2466,48 @@ The following are the tags that can appear in the documentation comment for a fi .fl \fP .fi - -.LP .SS Constructor and Method Documentation Tags .LP -.LP The following are the tags that can appear in the documentation comment for a constructor or method, except for \f2@return\fP, which cannot appear in a constructor, and \f2{@inheritDoc}\fP, which has certain restrictions. The \f2@serialData\fP tag can only be used in the doc comment for certain serialization methods. .LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 34 \n(.lu -.eo -.am 80 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/2u -.if \n(.l<\n(80 .ll \n(80u -.in 0 -\f2@see\fP -.br -\f2@since\fP -.br -\f2@deprecated\fP -.br -\f2@param\fP -.br -\f2@return\fP -.br -\f2@throws\fP and \f2@exception\fP -.br -\f2@serialData\fP -.br -\f2{@link}\fP -.br -\f2{@linkplain}\fP -.br -\f2{@inheritDoc}\fP -.br -\f2{@docRoot}\fP -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 38 \w\f3Method/Constructor Tags\fP -.if \n(80<\n(38 .nr 80 \n(38 -.80 -.rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 2162 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f3Method/Constructor Tags\fP -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(80u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(40u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-28 - -.LP +\f3Method/Constructor Tags\fP +.RS 3 +.TP 2 +o +\f2@see\fP +.TP 2 +o +\f2@since\fP +.TP 2 +o +\f2@deprecated\fP +.TP 2 +o +\f2@param\fP +.TP 2 +o +\f2@return\fP +.TP 2 +o +\f2@throws\fP and \f2@exception\fP +.TP 2 +o +\f2@serialData\fP +.TP 2 +o +\f2{@link}\fP +.TP 2 +o +\f2{@linkplain}\fP +.TP 2 +o +\f2{@inheritDoc}\fP +.TP 2 +o +\f2{@docRoot}\fP +.RE \f3An example of a method doc comment:\fP -.LP .nf \f3 .fl @@ -3446,23 +2541,12 @@ The following are the tags that can appear in the documentation comment for a co .fl \fP .fi -.RE - -.LP .SH "OPTIONS" .LP - -.LP -.LP The javadoc tool uses doclets to determine its output. The Javadoc tool uses the default standard doclet unless a custom doclet is specified with the \-doclet option. The Javadoc tool provides a set of command\-line options that can be used with any doclet \-\- these options are described below under the sub\-heading Javadoc Options. The standard doclet provides an additional set of command\-line options that are described below under the sub\-heading Options Provided by the Standard Doclet. All option names are case\-insensitive, though their arguments can be case\-sensitive. .LP -.LP The options are: .LP -.RS 3 - -.LP -.LP .TS .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 .de 35 @@ -3615,6 +2699,8 @@ The options are: .br \-\f2sourcepath\fP .br +\-sourcetab +.br \-splitindex .br \-stylesheetfile @@ -3627,6 +2713,8 @@ The options are: .br \-tagletpath .br +\-top +.br \-title .br \-use @@ -3673,7 +2761,7 @@ The options are: .nr 42 \n(81+(3*\n(38) .nr 82 +\n(42 .nr TW \n(82 -.if t .if \n(TW>\n(.li .tm Table at line 2340 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 2015 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3709,290 +2797,13 @@ The options are: .sp |\n(##u-1v .nr 37 \n(41u .in +\n(37u -.b+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(##u-1v -.nr 37 \n(42u -.in +\n(37u -.c+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.fc -.nr T. 1 -.T# 1 -.35 -.rm a+ -.rm b+ -.rm c+ -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-123 - -.LP -.RE -.LP -Options shown in \f2italic\fP are the Javadoc core options, which are provided by the front end of the Javadoc tool and are available to all doclets. The standard doclet itself provides the non\-italic options. -.LP -.SS -Javadoc Options -.LP -.RS 3 -.TP 3 -\-overview \ path/filename -Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by \f2path/filename\fP and place it on the Overview page (\f2overview\-summary.html\fP). The \f2path/filename\fP is relative to the \f2\-sourcepath\fP. -.LP -While you can use any name you want for \f2filename\fP and place it anywhere you want for \f2path\fP, a typical thing to do is to name it \f2overview.html\fP and place it in the source tree at the directory that contains the topmost package directories. In this location, no \f2path\fP is needed when documenting packages, since \f2\-sourcepath\fP will point to this file. For example, if the source tree for the \f2java.lang\fP package is \f2/src/classes/java/lang/\fP, then you could place the overview file at \f2/src/classes/overview.html\fP. See Real World Example. -.LP -For information about the file specified by \f2path/filename\fP, see overview comment file. -.LP -Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) -.LP -The title on the overview page is set by \f2\-doctitle\fP. -.LP -.TP 3 -\-public -Shows only public classes and members. -.LP -.TP 3 -\-protected -Shows only protected and public classes and members. This is the default. -.LP -.TP 3 -\-package -Shows only package, protected, and public classes and members. -.LP -.TP 3 -\-private -Shows all classes and members. -.LP -.TP 3 -\-help -Displays the online help, which lists these javadoc and doclet command line options. -.LP -.TP 3 -\-doclet\ class -Specifies the class file that starts the doclet used in generating the documentation. Use the fully\-qualified name. This doclet defines the content and formats the output. If the \f4\-doclet\fP option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the \f2start(Root)\fP method. The path to this starting class is defined by the \f2\-docletpath\fP option. -.LP -For example, to call the MIF doclet, use: -.nf -\f3 -.fl - \-doclet com.sun.tools.doclets.mif.MIFDoclet -.fl -\fP -.fi -.LP -For full, working examples of running a particular doclet, see the -.na -\f2MIF Doclet documentation\fP @ -.fi -http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. -.LP -.TP 3 -\-docletpath\ classpathlist -Specifies the path to the doclet starting class file (specified with the \f2\-doclet\fP option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If \f2classpathlist\fP contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi\-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path. -.LP -Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included. -.nf -\f3 -.fl - \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar -.fl -\fP -.fi -Example of path to starting doclet class file. Notice the class filename is omitted. -.nf -\f3 -.fl - \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/ -.fl -\fP -.fi -For full, working examples of running a particular doclet, see the -.na -\f2MIF Doclet documentation\fP @ -.fi -http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. -.LP -.TP 3 -\-1.1 -\f2This feature has been removed from Javadoc 1.4. There is no replacement for it. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, use Javadoc 1.2 or 1.3 instead.\fP -.LP -.TP 3 -\-source release -Specifies the version of source code accepted. The following values for \f2release\fP are allowed: -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 81 -.nr 34 \n(.lu -.eo -.am 81 -.br -.di a+ -.35 -.ft \n(.f -.ll \n(34u*1u/3u -.if \n(.l<\n(81 .ll \n(81u -.in 0 -javadoc accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior if the \f3\-source\fP flag is not used. -.br -.di -.nr a| \n(dn -.nr a- \n(dl -.. -.ec \ -.eo -.am 81 -.br -.di b+ -.35 -.ft \n(.f -.ll \n(34u*1u/3u -.if \n(.l<\n(81 .ll \n(81u -.in 0 -javadoc accepts code containing assertions, which were introduced in JDK 1.4. -.br -.di -.nr b| \n(dn -.nr b- \n(dl -.. -.ec \ -.eo -.am 81 -.br -.di c+ -.35 -.ft \n(.f -.ll \n(34u*1u/3u -.if \n(.l<\n(81 .ll \n(81u -.in 0 -javadoc does \f2not\fP support assertions, generics, or other language features introduced after JDK 1.3. -.br -.di -.nr c| \n(dn -.nr c- \n(dl -.. -.ec \ -.35 -.nf -.ll \n(34u -.nr 80 0 -.nr 31 0 -.nr 32 0 -.nr 38 \w\f31 -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w.5\fP -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w\f31 -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w.4\fP -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w\f31 -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w.3\fP -.if \n(32<\n(38 .nr 32 \n(38 -.80 -.rm 80 -.nr 60 \n(31 -.nr 38 \n(60+\n(32 -.if \n(38>\n(80 .nr 80 \n(38 -.if \n(38<\n(80 .nr 60 +(\n(80-\n(38)/2 -.nr 81 0 -.81 -.rm 81 -.nr 38 \n(a- -.if \n(81<\n(38 .nr 81 \n(38 -.nr 38 \n(b- -.if \n(81<\n(38 .nr 81 \n(38 -.nr 38 \n(c- -.if \n(81<\n(38 .nr 81 \n(38 -.35 -.nf -.ll \n(34u -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr 60 +\n(40 -.nr 41 \n(80+(3*\n(38) -.nr 81 +\n(41 -.nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 2450 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.ne \n(a|u+\n(.Vu -.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) -.ta \n(60u \n(80u \n(81u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f31.5\fP\h'|\n(41u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(41u -.in +\n(37u -.a+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.ne \n(b|u+\n(.Vu -.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) -.ta \n(60u \n(80u \n(81u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f31.4\fP\h'|\n(41u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(41u -.in +\n(37u -.b+ -.in -\n(37u -.mk 32 -.if \n(32>\n(31 .nr 31 \n(32 -.sp |\n(31u -.ne \n(c|u+\n(.Vu -.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) -.ta \n(60u \n(80u \n(81u -.nr 31 \n(.f -.nr 35 1m -\&\h'|\n(40u'\f31.3\fP\h'|\n(41u' -.mk ## -.nr 31 \n(## -.sp |\n(##u-1v -.nr 37 \n(41u -.in +\n(37u +.b+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(##u-1v +.nr 37 \n(42u +.in +\n(37u .c+ .in -\n(37u .mk 32 @@ -4006,16 +2817,112 @@ javadoc does \f2not\fP support assertions, generics, or other language features .rm b+ .rm c+ .TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-14 -.LP -Use the value of \f2release\fP corresponding to that used when compiling the code with javac. +.if \n-(b.=0 .nr c. \n(.c-\n(d.-127 .LP +Options shown in \f2italic\fP are the Javadoc core options, which are provided by the front end of the Javadoc tool and are available to all doclets. The standard doclet itself provides the non\-italic options. +.SS +Javadoc Options +.RS 3 +.TP 3 +\-overview \ path/filename +Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by \f2path/filename\fP and place it on the Overview page (\f2overview\-summary.html\fP). The \f2path/filename\fP is relative to the current directory. +.br +.br +While you can use any name you want for \f2filename\fP and place it anywhere you want for \f2path\fP, a typical thing to do is to name it \f2overview.html\fP and place it in the source tree at the directory that contains the topmost package directories. In this location, no \f2path\fP is needed when documenting packages, since \f2\-sourcepath\fP will point to this file. For example, if the source tree for the \f2java.lang\fP package is \f2/src/classes/java/lang/\fP, then you could place the overview file at \f2/src/classes/overview.html\fP. See Real World Example. +.br +.br +For information about the file specified by \f2path/filename\fP, see overview comment file. +.br +.br +Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) +.br +.br +The title on the overview page is set by \f2\-doctitle\fP. +.TP 3 +\-public +Shows only public classes and members. +.TP 3 +\-protected +Shows only protected and public classes and members. This is the default. +.TP 3 +\-package +Shows only package, protected, and public classes and members. +.TP 3 +\-private +Shows all classes and members. +.TP 3 +\-help +Displays the online help, which lists these javadoc and doclet command line options. +.TP 3 +\-doclet\ class +Specifies the class file that starts the doclet used in generating the documentation. Use the fully\-qualified name. This doclet defines the content and formats the output. If the \f4\-doclet\fP option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the \f2start(Root)\fP method. The path to this starting class is defined by the \f2\-docletpath\fP option. +.br +.br +For example, to call the MIF doclet, use: +.nf +\f3 +.fl + \-doclet com.sun.tools.doclets.mif.MIFDoclet +.fl +\fP +.fi +For full, working examples of running a particular doclet, see the +.na +\f2MIF Doclet documentation\fP @ +.fi +http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. +.TP 3 +\-docletpath\ classpathlist +Specifies the path to the doclet starting class file (specified with the \f2\-doclet\fP option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If \f2classpathlist\fP contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi\-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path. +.br +.br +Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included. +.nf +\f3 +.fl + \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar +.fl +\fP +.fi +Example of path to starting doclet class file. Notice the class filename is omitted. +.nf +\f3 +.fl + \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/ +.fl +\fP +.fi +For full, working examples of running a particular doclet, see the +.na +\f2MIF Doclet documentation\fP @ +.fi +http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. +.TP 3 +\-1.1 +\f2This feature has been removed from Javadoc 1.4. There is no replacement for it. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, use Javadoc 1.2 or 1.3 instead.\fP +.TP 3 +\-source release +Specifies the version of source code accepted. The following values for \f2release\fP are allowed: +.RS 3 +.TP 2 +o +\f31.5\fP \- javadoc accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior if the \f3\-source\fP flag is not used. +.TP 2 +o +\f31.4\fP \- javadoc accepts code containing assertions, which were introduced in JDK 1.4. +.TP 2 +o +\f31.3\fP \- javadoc does \f2not\fP support assertions, generics, or other language features introduced after JDK 1.3. +.RE +Use the value of \f2release\fP corresponding to that used when compiling the code with javac. .TP 3 \-sourcepath\ sourcepathlist -Specifies the search paths for finding source files (\f2.java\fP) when passing package names or \f2\-subpackages\fP into the \f2javadoc\fP command. The \f2sourcepathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented but whose comments are inherited by the source files being documented. -.LP -Note that you can use the \f2\-sourcepath\fP option only when passing package names into the javadoc command \-\- it will not locate \f2.java\fP files passed into the \f2javadoc\fP command. (To locate \f2.java\fP files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If \f2\-sourcepath\fP is omitted, javadoc uses the class path to find the source files (see \-classpath). Therefore, the default \-sourcepath is the value of class path. If \-classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files. -.LP +Specifies the search paths for finding source files (\f2.java\fP) when passing package names or \f2\-subpackages\fP into the \f2javadoc\fP command. The \f2sourcepathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented but whose comments are inherited by the source files being documented. +.br +.br +Note that you can use the \f2\-sourcepath\fP option only when passing package names into the javadoc command \-\- it will not locate \f2.java\fP files passed into the \f2javadoc\fP command. (To locate \f2.java\fP files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If \f2\-sourcepath\fP is omitted, javadoc uses the class path to find the source files (see \-classpath). Therefore, the default \-sourcepath is the value of class path. If \-classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files. +.br +.br Set \f2sourcepathlist\fP to the root directory of the source tree for the package you are documenting. For example, suppose you want to document a package called \f2com.mypackage\fP whose source files are located at: .nf \f3 @@ -4031,8 +2938,9 @@ In this case you would specify the \f2sourcepath\fP to \f2/home/user/src\fP, the % \fP\f3javadoc \-sourcepath /home/user/src/ com.mypackage\fP .fl .fi -This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a slash "/", you end up with the full path to the package: \f2/home/user/src/com/mypackage\fP. -.LP +This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a slash "/", you end up with the full path to the package: \f2/home/user/src/com/mypackage\fP. +.br +.br To point to two source paths: .nf \f3 @@ -4040,17 +2948,18 @@ To point to two source paths: % \fP\f3javadoc \-sourcepath /home/user1/src:/home/user2/src com.mypackage\fP .fl .fi -.LP .TP 3 \-classpath\ classpathlist Specifies the paths where javadoc will look for referenced classes (\f2.class\fP files) \-\- these are the documented classes plus any classes referenced by those classes. The \f2classpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Follow the instructions in .na \f2class path\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#general documentation for specifying \f2classpathlist\fP. -.LP -If \f2\-sourcepath\fP is omitted, the Javadoc tool uses \f2\-classpath\fP to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both \f2\-sourcepath\fP and \f2\-classpath\fP. -.LP +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general documentation for specifying \f2classpathlist\fP. +.br +.br +If \f2\-sourcepath\fP is omitted, the Javadoc tool uses \f2\-classpath\fP to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both \f2\-sourcepath\fP and \f2\-classpath\fP. +.br +.br For example, if you want to document \f2com.mypackage\fP, whose source files reside in the directory \f2/home/user/src/com/mypackage\fP, and if this package relies on a library in \f2/home/user/lib\fP, you would specify: .nf \f3 @@ -4058,23 +2967,25 @@ For example, if you want to document \f2com.mypackage\fP, whose source files res % \fP\f3javadoc \-classpath /home/user/lib \-sourcepath /home/user/src com.mypackage\fP .fl .fi -As with other tools, if you do not specify \f2\-classpath\fP, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory. -.LP +As with other tools, if you do not specify \f2\-classpath\fP, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory. +.br +.br For an in\-depth description of how the Javadoc tool uses \f2\-classpath\fP to find user classes as it relates to extension classes and bootstrap classes, see .na \f2How Classes Are Found\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html. -.LP -As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations). +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html. .br .br -For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. -.LP +As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a Java program cannot tell the difference between the two invocations). +.br +.br +For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. .TP 3 \-subpackages\ \ package1:package2:... -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, as they are automatically included. Each \f2package\fP argument is any top\-level subpackage (such as \f2java\fP) or fully qualified package (such as \f2javax.swing\fP) that does not need to contain source files. Arguments are separated by colons (on all operating systmes). Wildcards are not needed or allowed. Use \f2\-sourcepath\fP to specify where to find the packages. This option is smart about not processing source files that are in the source tree but do not belong to the packages, as described at processing of source files. -.LP +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, as they are automatically included. Each \f2package\fP argument is any top\-level subpackage (such as \f2java\fP) or fully qualified package (such as \f2javax.swing\fP) that does not need to contain source files. Arguments are separated by colons (on all operating systmes). Wildcards are not needed or allowed. Use \f2\-sourcepath\fP to specify where to find the packages. This option is smart about not processing source files that are in the source tree but do not belong to the packages, as described at processing of source files. +.br +.br For example: .nf \f3 @@ -4082,10 +2993,10 @@ For example: % \fP\f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax.swing\fP .fl .fi -This command generates documentation for packages named "java" and "javax.swing" and all their subpackages. -.LP -You can use \f2\-subpackages\fP in conjunction with \f2\-exclude\fP to exclude specific packages. -.LP +This command generates documentation for packages named "java" and "javax.swing" and all their subpackages. +.br +.br +You can use \f2\-subpackages\fP in conjunction with \f2\-exclude\fP to exclude specific packages. .TP 3 \-exclude\ \ packagename1:packagename2:... Unconditionally excludes the specified packages and their subpackages from the list formed by \f2\-subpackages\fP. It excludes those packages even if they would otherwise be included by some previous or later \f2\-subpackages\fP option. For example: @@ -4095,36 +3006,32 @@ Unconditionally excludes the specified packages and their subpackages from the l % \fP\f3javadoc \-sourcepath /home/user/src \-subpackages java \-exclude java.net:java.lang\fP .fl .fi -would include \f2java.io\fP, \f2java.util\fP, and \f2java.math\fP (among others), but would exclude packages rooted at \f2java.net\fP and \f2java.lang\fP. Notice this excludes \f2java.lang.ref\fP, a subpackage of \f2java.lang\fP). -.LP +would include \f2java.io\fP, \f2java.util\fP, and \f2java.math\fP (among others), but would exclude packages rooted at \f2java.net\fP and \f2java.lang\fP. Notice this excludes \f2java.lang.ref\fP, a subpackage of \f2java.lang\fP). .TP 3 \-bootclasspath\ classpathlist Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files. See .na \f2How Classes Are Found\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html#srcfiles. for more details. Separate directories in \f2classpathlist\fP with colons (:). -.LP +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html#srcfiles. for more details. Separate directories in \f2classpathlist\fP with colons (:). .TP 3 \-extdirs\ dirlist -Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See \f2\-classpath\fP (above) for more details. Separate directories in \f2dirlist\fP with colons (:). -.LP +Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See \f2\-classpath\fP (above) for more details. Separate directories in \f2dirlist\fP with colons (:). .TP 3 \-verbose -Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file. -.LP +Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file. .TP 3 \-quiet -Shuts off non\-error and non\-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string. -.LP +Shuts off non\-error and non\-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string. .TP 3 \-breakiterator\ Uses the internationalized sentence boundary of .na \f2java.text.BreakIterator\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/text/BreakIterator.html to determine the end of the first sentence for English (all other locales already use \f2BreakIterator\fP), rather than an English language, locale\-specific algorithm. By \f2first sentence\fP, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index. -.LP +http://download.oracle.com/javase/7/docs/api/java/text/BreakIterator.html to determine the end of the first sentence for English (all other locales already use \f2BreakIterator\fP), rather than an English language, locale\-specific algorithm. By \f2first sentence\fP, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index. +.br +.br From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English. Therefore, the \f2\-breakiterator\fP option has no effect except for English from 1.2 forward. English has its own default algorithm: .RS 3 .TP 2 @@ -4134,31 +3041,22 @@ English default sentence\-break algorithm \- Stops at a period followed by a spa o Breakiterator sentence\-break algorithm \- In general, stops at a period, question mark or exclamation mark followed by a space if the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith"). Doesn't stop at HTML tags or sentences that begin with numbers or symbols. Stops at the last period in "../filename", even if embedded in an HTML tag. .RE -.RS 3 - -.LP -.LP -NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence\-break algorithm unchanged. That is, the \-breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused. -.LP -.RE +NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence\-break algorithm unchanged. That is, the \-breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused. .TP 3 \-locale\ language_country_variant -.RS 3 -.LP \f3Important\fP \- The \f2\-locale\fP option must be placed \f2ahead\fP (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command\-line option that is order\-dependent. -.LP -.RE -.LP -Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as \f2en_US\fP (English, United States) or \f2en_US_WIN\fP (Windows variant). -.LP -Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes. -.LP +.br +.br +Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as \f2en_US\fP (English, United States) or \f2en_US_WIN\fP (Windows variant). +.br +.br +Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes. .TP 3 \-encoding\ name -Specifies the encoding name of the source files, such as \f2EUCJIS/SJIS\fP. If this option is not specified, the platform default converter is used. -.LP -Also see \-docencoding and \-charset. -.LP +Specifies the encoding name of the source files, such as \f2EUCJIS/SJIS\fP. If this option is not specified, the platform default converter is used. +.br +.br +Also see \-docencoding and \-charset. .TP 3 \-Jflag Passes \f2flag\fP directly to the runtime system java that runs javadoc. Notice there must be no space between the \f2J\fP and the \f2flag\fP. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the \f2\-Xmx\fP option of java as follows (\f2\-Xms\fP is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required): @@ -4183,12 +3081,12 @@ To tell what version of javadoc you are using, call the "\f2\-version\fP" option .RE .SS Options Provided by the Standard Doclet -.LP .RS 3 .TP 3 \-d\ directory -Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value \f2directory\fP can be absolute, or relative to the current working directory. As of 1.4, the destination directory is automatically created when javadoc is run. -.LP +Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value \f2directory\fP can be absolute, or relative to the current working directory. As of 1.4, the destination directory is automatically created when javadoc is run. +.br +.br For example, the following generates the documentation for the package \f2com.mypackage\fP and saves the results in the \f2/home/user/doc/\fP directory: .nf \f3 @@ -4196,28 +3094,27 @@ For example, the following generates the documentation for the package \f2com.my % \fP\f3javadoc \-d /home/user/doc com.mypackage\fP .fl .fi -.LP .TP 3 \-use -Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given 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. -.LP -For example, let us look at what might appear on the "Use" page for String. The \f2getName()\fP method in the \f2java.awt.Font\fP class returns type \f2String\fP. Therefore, \f2getName()\fP uses \f2String\fP, and you will find that method on the "Use" page for \f2String\fP. -.LP -Note that this documents only uses of the API, not the implementation. If a method uses \f2String\fP in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of \f2String\fP. -.LP -You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar. +Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given 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. +.br +.br +For example, let us look at what might appear on the "Use" page for String. The \f2getName()\fP method in the \f2java.awt.Font\fP class returns type \f2String\fP. Therefore, \f2getName()\fP uses \f2String\fP, and you will find that method on the "Use" page for \f2String\fP. +.br +.br +Note that this documents only uses of the API, not the implementation. If a method uses \f2String\fP in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of \f2String\fP. +.br +.br +You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar. .TP 3 \-version -Includes the @version text in the generated docs. This text is omitted by default. To tell what version of the Javadoc tool you are using, use the \f2\-J\-version\fP option. -.LP +Includes the @version text in the generated docs. This text is omitted by default. To tell what version of the Javadoc tool you are using, use the \f2\-J\-version\fP option. .TP 3 \-author -Includes the @author text in the generated docs. -.LP +Includes the @author text in the generated docs. .TP 3 \-splitindex -Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non\-alphabetical characters. -.LP +Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non\-alphabetical characters. .TP 3 \-windowtitle\ title Specifies the title to be placed in the HTML <title> tag. This 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, as the browser will not properly interpret them. Any internal quotation marks within \f2title\fP may have to be escaped. If \-windowtitle is omitted, the Javadoc tool uses the value of \-doctitle for this option. @@ -4238,8 +3135,7 @@ Specifies the title to be placed near the top of the overview summary file. The .fi .TP 3 \-title\ title -\f3This option no longer exists.\fP It existed only in Beta versions of Javadoc 1.2. It has been renamed to \f2\-doctitle\fP. This option is being renamed to make it clear that it defines the document title rather than the window title. -.LP +\f3This option no longer exists.\fP It existed only in Beta versions of Javadoc 1.2. It has been renamed to \f2\-doctitle\fP. This option is being renamed to make it clear that it defines the document title rather than the window title. .TP 3 \-header\ header Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. \f2header\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2header\fP may have to be escaped. @@ -4249,28 +3145,30 @@ Specifies the header text to be placed at the top of each output file. The heade % \fP\f3javadoc \-header "<b>Java 2 Platform </b><br>v1.4" com.mypackage\fP .fl .fi -.LP .TP 3 \-footer\ footer Specifies the footer text to be placed at the bottom of each output file. The footer will be placed to the right of the lower navigation bar. \f2footer\fP may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2footer\fP may have to be escaped. -.LP +.TP 3 +\-top +Specifies the text to be placed at the top of each output file. .TP 3 \-bottom\ text -Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The \f2text\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2text\fP may have to be escaped. -.LP +Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The \f2text\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2text\fP may have to be escaped. .TP 3 \-link\ extdocURL -Creates links to existing javadoc\-generated documentation of external referenced classes. It takes one argument: -.LP +Creates links to existing javadoc\-generated documentation of external referenced classes. It takes one argument: .RS 3 .TP 2 o -\f4extdocURL\fP is the absolute or relative URL of the directory containing the external javadoc\-generated documentation you want to link to. Examples are shown below. The package\-list file must be found in this directory (otherwise, use \f2\-linkoffline\fP). The Javadoc tool reads the package names from the \f2package\-list\fP file and then links to those packages at that URL. When the Javadoc tool is run, the \f2extdocURL\fP value is copied literally into the \f2<A HREF>\fP links that are created. Therefore, \f2extdocURL\fP must be the URL to the \f2directory\fP, not to a file. -.LP -You can use an absolute link for \f2extdocURL\fP to enable your docs to link to a document on any website, or can use a relative link to link only to a relative location. If relative, the value you pass in should be the relative path from the destination directory (specified with \f2\-d\fP) to the directory containing the packages being linked to. -.LP -When specifying an absolute link you normally use an \f2http:\fP link. However, if you want to link to a file system that has no web server, you can use a \f2file:\fP link \-\- however, do this only if everyone wanting to access the generated documentation shares the same file system. -.LP +\f4extdocURL\fP is the absolute or relative URL of the directory containing the external javadoc\-generated documentation you want to link to. Examples are shown below. The package\-list file must be found in this directory (otherwise, use \f2\-linkoffline\fP). The Javadoc tool reads the package names from the \f2package\-list\fP file and then links to those packages at that URL. When the Javadoc tool is run, the \f2extdocURL\fP value is copied literally into the \f2<A HREF>\fP links that are created. Therefore, \f2extdocURL\fP must be the URL to the \f2directory\fP, not to a file. +.br +.br +You can use an absolute link for \f2extdocURL\fP to enable your docs to link to a document on any website, or can use a relative link to link only to a relative location. If relative, the value you pass in should be the relative path from the destination directory (specified with \f2\-d\fP) to the directory containing the packages being linked to. +.br +.br +When specifying an absolute link you normally use an \f2http:\fP link. However, if you want to link to a file system that has no web server, you can use a \f2file:\fP link \-\- however, do this only if everyone wanting to access the generated documentation shares the same file system. +.br +.br In all cases, and on all operating systems, you should use a forward slash as the separator, whether the URL is absolute or relative, and "http:" or "file:" based (as specified in the .na \f2URL Memo\fP @ @@ -4288,8 +3186,11 @@ Relative link: \f2\-link <directory>/<directory>/.../<name>\fP .RE .RE -.LP -You can specify multiple \f2\-link\fP options in a given javadoc run to link to multiple documents. \f3Choosing between \-linkoffline and \-link\fP: +You can specify multiple \f2\-link\fP options in a given javadoc run to link to multiple documents. +.br +.br +\f3Choosing between \-linkoffline and \-link\fP: +.br .br Use \f2\-link\fP: .RS 3 @@ -4306,16 +3207,17 @@ Use \f2\-linkoffline\fP: o when using an absolute URL to the external API document, if your shell \f2does not allow\fP a program to open a connection to that URL for reading. This can occur if you are behind a firewall and the document you want to link to is on the other side. .RE -.LP +.br +.br \f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java Platform packages at .na -\f2http://java.sun.com/javase/6/docs/api/\fP @ +\f2http://download.oracle.com/javase/7/docs/api/\fP @ .fi -http://java.sun.com/javase/6/docs/api. The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other options, such as \f2\-sourcepath\fP and \f2\-d\fP, are not shown.) +http://download.oracle.com/javase/7/docs/api/. The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other options, such as \f2\-sourcepath\fP and \f2\-d\fP, are not shown.) .nf \f3 .fl - % \fP\f3javadoc \-link http://java.sun.com/javase/6/docs/api com.mypackage\fP + % \fP\f3javadoc \-link http://download.oracle.com/javase/7/docs/api/ com.mypackage\fP .fl .fi \f3Example using relative links to the external docs\fP \- Let us say you have two packages whose docs are generated in different runs of the Javadoc tool, and those docs are separated by a relative path. In this example, the packages are \f2com.apipackage\fP, an API, and \f2com.spipackage\fP, an SPI (Service Provide Interface). You want the documentation to reside in \f2docs/api/com/apipackage\fP and \f2docs/spi/com/spipackage\fP. Assuming the API package documentation is already generated, and that \f2docs\fP is the current directory, you would document the SPI package with links to the API documentation by running: @@ -4325,17 +3227,21 @@ http://java.sun.com/javase/6/docs/api. The following command generates documenta % \fP\f3javadoc \-d ./spi \-link ../api com.spipackage\fP .fl .fi -.LP -Notice the \f2\-link\fP argument is relative to the destination directory (\f2docs/spi\fP). -.LP -\f3Details\fP \- The \f2\-link\fP option enables you to link to classes referenced to by your code but \f2not\fP documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with \f2extdocURL\fP. This allows, for instance, third party documentation to link to \f2java.*\fP documentation on \f2http://java.sun.com\fP. -.LP -Omit the \f2\-link\fP option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the \f2\-link\fP option, the Javadoc tool does not create links to documentation for external references, because it does not know if or where that documentation exists.) -.LP -This option can create links in several places in the generated documentation. -.LP -Another use is for cross\-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. -.LP +Notice the \f2\-link\fP argument is relative to the destination directory (\f2docs/spi\fP). +.br +.br +\f3Details\fP \- The \f2\-link\fP option enables you to link to classes referenced to by your code but \f2not\fP documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with \f2extdocURL\fP. This allows, for instance, third party documentation to link to \f2java.*\fP documentation on \f2http://java.sun.com\fP. +.br +.br +Omit the \f2\-link\fP option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the \f2\-link\fP option, the Javadoc tool does not create links to documentation for external references, because it does not know if or where that documentation exists.) +.br +.br +This option can create links in several places in the generated documentation. +.br +.br +Another use is for cross\-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. +.br +.br \f3How a Class Must be Referenced\fP \- For a link to an external referenced class to actually appear (and not just its text label), the class must be referenced in the following way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an \f2import\fP statement or in a declaration. Here are examples of how the class \f2java.io.File\fP can be referenced: .RS 3 .TP 2 @@ -4353,16 +3259,17 @@ In a declaration: .br The reference and be in the return type or parameter type of a method, constructor, field, class or interface, or in an \f2implements\fP, \f2extends\fP or \f2throws\fP statement. .RE -.LP -An important corollary is that when you use the \f2\-link\fP option, there may be many links that unintentionally do not appear due to this constraint. (The text would appear without a hypertext link.) You can detect these by the warnings they emit. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above. -.LP -\f3Package List\fP \- The \f2\-link\fP option requires that a file named \f2package\-list\fP, which is generated by the Javadoc tool, exist at the URL you specify with \f2\-link\fP. The \f2package\-list\fP file is a simple text file that lists the names of packages documented at that location. In the earlier example, the Javadoc tool looks for a file named \f2package\-list\fP at the given URL, reads in the package names and then links to those packages at that URL. -.LP +An important corollary is that when you use the \f2\-link\fP option, there may be many links that unintentionally do not appear due to this constraint. (The text would appear without a hypertext link.) You can detect these by the warnings they emit. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above. +.br +.br +\f3Package List\fP \- The \f2\-link\fP option requires that a file named \f2package\-list\fP, which is generated by the Javadoc tool, exist at the URL you specify with \f2\-link\fP. The \f2package\-list\fP file is a simple text file that lists the names of packages documented at that location. In the earlier example, the Javadoc tool looks for a file named \f2package\-list\fP at the given URL, reads in the package names and then links to those packages at that URL. +.br +.br For example, the package list for the Java SE 6 API is located at .na -\f2http://java.sun.com/javase/6/docs/api/package\-list\fP @ +\f2http://download.oracle.com/javase/7/docs/api/package\-list\fP @ .fi -http://java.sun.com/javase/6/docs/api/package\-list. and starts as follows: +http://download.oracle.com/javase/7/docs/api/package\-list. and starts as follows: .nf \f3 .fl @@ -4384,31 +3291,39 @@ http://java.sun.com/javase/6/docs/api/package\-list. and starts as follows: .fl \fP .fi -.LP -When javadoc is run without the \f2\-link\fP option, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the \f2\-link\fP option is used, the Javadoc tool searches the \f2package\-list\fP file at the specified \f2extdocURL\fP location for that package name. If it finds the package name, it prefixes the name with \f2extdocURL\fP. -.LP -In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The Javadoc tool will not check that these pages exist \-\- only that the package\-list exists. -.LP -\f3Multiple Links\fP \- You can supply multiple \f2\-link\fP options to link to any number of external generated documents. \ Javadoc 1.2 has a known bug which prevents you from supplying more than one \f2\-link\fP command. This was fixed in 1.2.2. -.LP -Specify a different link option for each external document to link to: -.LP -\ \ \f2% \fP\f4javadoc \-link\fP \f2extdocURL1\fP \f4\-link\fP \f2extdocURL2\fP \f2... \fP\f4\-link\fP \f2extdocURLn\fP \f4com.mypackage\fP -.LP -where \f2extdocURL1\fP,\ \f2extdocURL2\fP,\ ... \f2extdocURLn\fP point respectively to the roots of external documents, each of which contains a file named \f2package\-list\fP. -.LP -\f3Cross\-links\fP \- Note that "bootstrapping" may be required when cross\-linking two or more documents that have not previously been generated. In other words, if \f2package\-list\fP does not exist for either document, when you run the Javadoc tool on the first document, the \f2package\-list\fP will not yet exist for the second document. Therefore, to create the external links, you must re\-generate the first document after generating the second document. -.LP -In this case, the purpose of first generating a document is to create its \f2package\-list\fP (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. The Javadoc tool prints a warning if a needed external \f2package\-list\fP file does not exist. -.LP +When javadoc is run without the \f2\-link\fP option, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the \f2\-link\fP option is used, the Javadoc tool searches the \f2package\-list\fP file at the specified \f2extdocURL\fP location for that package name. If it finds the package name, it prefixes the name with \f2extdocURL\fP. +.br +.br +In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The Javadoc tool will not check that these pages exist \-\- only that the package\-list exists. +.br +.br +\f3Multiple Links\fP \- You can supply multiple \f2\-link\fP options to link to any number of external generated documents. \ Javadoc 1.2 has a known bug which prevents you from supplying more than one \f2\-link\fP command. This was fixed in 1.2.2. +.br +.br +Specify a different link option for each external document to link to: +.br +.br +\ \ \f2% \fP\f4javadoc \-link\fP \f2extdocURL1\fP \f4\-link\fP \f2extdocURL2\fP \f2... \fP\f4\-link\fP \f2extdocURLn\fP \f4com.mypackage\fP +.br +.br +where \f2extdocURL1\fP,\ \f2extdocURL2\fP,\ ... \f2extdocURLn\fP point respectively to the roots of external documents, each of which contains a file named \f2package\-list\fP. +.br +.br +\f3Cross\-links\fP \- Note that "bootstrapping" may be required when cross\-linking two or more documents that have not previously been generated. In other words, if \f2package\-list\fP does not exist for either document, when you run the Javadoc tool on the first document, the \f2package\-list\fP will not yet exist for the second document. Therefore, to create the external links, you must re\-generate the first document after generating the second document. +.br +.br +In this case, the purpose of first generating a document is to create its \f2package\-list\fP (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. The Javadoc tool prints a warning if a needed external \f2package\-list\fP file does not exist. .TP 3 \-linkoffline\ extdocURL\ packagelistLoc -This option is a variation of \f2\-link\fP; they both create links to javadoc\-generated documentation for external referenced classes. Use the \f2\-linkoffline\fP option when linking to a document on the web when the Javadoc tool itself is "offline" \-\- that is, it cannot access the document through a web connection. -.LP -More specifically, use \f2\-linkoffline\fP if the external document's \f2package\-list\fP file is not accessible or does not exist at the \f2extdocURL\fP location but does exist at a different location, which can be specified by \f2packageListLoc\fP (typically local). Thus, if \f2extdocURL\fP is accessible only on the World Wide Web, \f2\-linkoffline\fP removes the constraint that the Javadoc tool have a web connection when generating the documentation. -.LP -Another use is as a "hack" to update docs: After you have run javadoc on a full set of packages, then you can run javadoc again on onlya smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples are given below. -.LP +This option is a variation of \f2\-link\fP; they both create links to javadoc\-generated documentation for external referenced classes. Use the \f2\-linkoffline\fP option when linking to a document on the web when the Javadoc tool itself is "offline" \-\- that is, it cannot access the document through a web connection. +.br +.br +More specifically, use \f2\-linkoffline\fP if the external document's \f2package\-list\fP file is not accessible or does not exist at the \f2extdocURL\fP location but does exist at a different location, which can be specified by \f2packageListLoc\fP (typically local). Thus, if \f2extdocURL\fP is accessible only on the World Wide Web, \f2\-linkoffline\fP removes the constraint that the Javadoc tool have a web connection when generating the documentation. +.br +.br +Another use is as a "hack" to update docs: After you have run javadoc on a full set of packages, then you can run javadoc again on onlya smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples are given below. +.br +.br The \f2\-linkoffline\fP option takes two arguments \-\- the first for the string to be embedded in the \f2<a href>\fP links, the second telling it where to find \f2package\-list\fP: .RS 3 .TP 2 @@ -4418,35 +3333,39 @@ o o \f4packagelistLoc\fP is the path or URL to the directory containing the \f2package\-list\fP file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. If relative, make it relative to the \f2current\fP directory from where javadoc was run. Do not include the \f2package\-list\fP filename. .RE -.LP -You can specify multiple \f2\-linkoffline\fP options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.) -.LP -\f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java SE Platform packages at \f2http://java.sun.com/javase/6/docs/api\fP, but your shell does not have web access. You could open the \f2package\-list\fP file in a browser at +You can specify multiple \f2\-linkoffline\fP options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.) +.br +.br +\f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java SE Platform packages at \f2http://download.oracle.com/javase/7/docs/api/\fP, but your shell does not have web access. You could open the \f2package\-list\fP file in a browser at .na -\f2http://java.sun.com/javase/6/docs/api/package\-list\fP @ +\f2http://download.oracle.com/javase/7/docs/api/package\-list\fP @ .fi -http://java.sun.com/javase/6/docs/api/package\-list, save it to a local directory, and point to this local copy with the second argument, \f2packagelistLoc\fP. In this example, the package list file has been saved to the current directory "\f2.\fP" . The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other necessary options, such as \f2\-sourcepath\fP, are not shown.) +http://download.oracle.com/javase/7/docs/api/package\-list, save it to a local directory, and point to this local copy with the second argument, \f2packagelistLoc\fP. In this example, the package list file has been saved to the current directory "\f2.\fP" . The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other necessary options, such as \f2\-sourcepath\fP, are not shown.) .nf \f3 .fl -% \fP\f3javadoc \-linkoffline http://java.sun.com/javase/6/docs/api . com.mypackage\fP +% \fP\f3javadoc \-linkoffline http://download.oracle.com/javase/7/docs/api/ . com.mypackage\fP .fl .fi -.LP -\f3Example using relative links to the external docs\fP \- It's not very common to use \f2\-linkoffline\fP with relative paths, for the simple reason that \f2\-link\fP usually suffices. When using \f2\-linkoffline\fP, the \f2package\-list\fP file is generally local, and when using relative links, the file you are linking to is also generally local. So it is usually unnecessary to give a different path for the two arguments to \f2\-linkoffline\fP. When the two arguments are identical, you can use \f2\-link\fP. See the \f2\-link\fP relative example. -.LP -\f3Manually Creating a \fP\f4package\-list\fP\f3 File\fP \- If a \f2package\-list\fP file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with \f2packagelistLoc\fP. An example would be the previous case where the package list for \f2com.spipackage\fP did not exist when \f2com.apipackage\fP was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating \f2package\-list\fP files for packages generated with Javadoc 1.0 or 1.1, where \f2package\-list\fP files were not generated. Likewise, two companies can share their unpublished \f2package\-list\fP files, enabling them to release their cross\-linked documentation simultaneously. -.LP -\f3Linking to Multiple Documents\fP \- You can include \f2\-linkoffline\fP once for each generated document you want to refer to (each option is shown on a separate line for clarity): -.LP +\f3Example using relative links to the external docs\fP \- It's not very common to use \f2\-linkoffline\fP with relative paths, for the simple reason that \f2\-link\fP usually suffices. When using \f2\-linkoffline\fP, the \f2package\-list\fP file is generally local, and when using relative links, the file you are linking to is also generally local. So it is usually unnecessary to give a different path for the two arguments to \f2\-linkoffline\fP. When the two arguments are identical, you can use \f2\-link\fP. See the \f2\-link\fP relative example. +.br +.br +\f3Manually Creating a \fP\f4package\-list\fP\f3 File\fP \- If a \f2package\-list\fP file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with \f2packagelistLoc\fP. An example would be the previous case where the package list for \f2com.spipackage\fP did not exist when \f2com.apipackage\fP was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating \f2package\-list\fP files for packages generated with Javadoc 1.0 or 1.1, where \f2package\-list\fP files were not generated. Likewise, two companies can share their unpublished \f2package\-list\fP files, enabling them to release their cross\-linked documentation simultaneously. +.br +.br +\f3Linking to Multiple Documents\fP \- You can include \f2\-linkoffline\fP once for each generated document you want to refer to (each option is shown on a separate line for clarity): +.br +.br \f2% \fP\f4javadoc \-linkoffline\fP \f2extdocURL1\fP \f2packagelistLoc1\fP \f2\\\fP .br -\f2\ \ \ \ \ \ \ \ \ \ \fP\f4\-linkoffline\fP \f2extdocURL2\fP \f2packagelistLoc2\fP \f2\\\fP +\f2\ \ \ \ \ \ \ \ \ \ \fP\f4\-linkoffline\fP \f2extdocURL2\fP \f2packagelistLoc2\fP \f2\\\fP +.br +\f2\ \ \ \ \ \ \ \ \ \ ...\fP +.br +.br +\f3Updating docs\fP \- Another use for \f2\-linkoffline\fP option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re\-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to declarations. If you were to add, remove or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, and other places. +.br .br -\f2\ \ \ \ \ \ \ \ \ \ ...\fP -.LP -\f3Updating docs\fP \- Another use for \f2\-linkoffline\fP option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re\-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to declarations. If you were to add, remove or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, and other places. -.LP First, you create a new destination directory (call it \f2update\fP) for this new small run. Let us say the original destination directory was named \f2html\fP. In the simplest example, cd to the parent of \f2html\fP. Set the first argument of \f2\-linkoffline\fP to the current directory "." and set the second argument to the relative path to \f2html\fP, where it can find \f2package\-list\fP, and pass in only the package names of the packages you want to update: .nf \f3 @@ -4454,14 +3373,15 @@ First, you create a new destination directory (call it \f2update\fP) for this ne % \fP\f3javadoc \-d update \-linkoffline . html com.mypackage\fP .fl .fi -When the Javadoc tool is done, copy these generated class pages in \f2update/com/package\fP (not the overview or index), over the original files in \f2html/com/package\fP. -.LP +When the Javadoc tool is done, copy these generated class pages in \f2update/com/package\fP (not the overview or index), over the original files in \f2html/com/package\fP. .TP 3 \-linksource\ -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 fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes. -.LP -\f3This option exposes \fP\f4all\fP\f3 private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, \fP\f4regardless of the \fP\f4\-public\fP\f3, \fP\f4\-package\fP\f3, \fP\f4\-protected\fP\f3 and \fP\f4\-private\fP\f3 options.\fP Unless you also use the \f2\-private\fP option, not all private classes or interfaces will necessarily be accessible via links. -.LP +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 fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes. +.br +.br +\f3This option exposes \fP\f4all\fP\f3 private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, \fP\f4regardless of the \fP\f4\-public\fP\f3, \fP\f4\-package\fP\f3, \fP\f4\-protected\fP\f3 and \fP\f4\-private\fP\f3 options.\fP Unless you also use the \f2\-private\fP option, not all private classes or interfaces will necessarily be accessible via links. +.br +.br Each link appears on the name of the identifier in its declaration. For example, the link to the source code of the \f2Button\fP class would be on the word "Button": .nf \f3 @@ -4482,7 +3402,6 @@ and the link to the source code of the \f2getLabel()\fP method in the Button cla .fl \fP .fi -.LP .TP 3 \-group\ groupheading\ packagepattern:packagepattern:... Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different \f2\-group\fP option. The groups appear on the page in the order specified on the command line; packages are alphabetized within a group. For a given \f2\-group\fP option, the packages matching the list of \f2packagepattern\fP expressions appear in a table with the heading \f2groupheading\fP. @@ -4494,16 +3413,12 @@ o o \f4packagepattern\fP can be any package name, or can be the start of any package name followed by an asterisk (\f2*\fP). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with colons (\f2:\fP). .RE -.RS 3 - -.LP -.LP \f3NOTE: If using an asterisk in a pattern or pattern list, the pattern list must be inside quotes, such as \fP\f4"java.lang*:java.util"\fP -.LP -.RE -.LP -If you do not supply any \f2\-group\fP option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages". -.LP +.br +.br +If you do not supply any \f2\-group\fP option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages". +.br +.br For example, the following option separates the four documented packages into core, extension and other packages. Notice the trailing "dot" does not appear in "java.lang*" \-\- including the dot, such as "java.lang.*" would omit the java.lang package. .nf \f3 @@ -4517,7 +3432,6 @@ For example, the following option separates the four documented packages into co .fi This results in the groupings: .RS 3 -.RS 3 .TP 3 Core Packages \f2java.lang\fP @@ -4530,38 +3444,27 @@ Extension Packages Other Packages \f2java.new\fP .RE - -.LP -.RE -.LP .TP 3 \-nodeprecated -Prevents the generation of any deprecated API at all in the documentation. This does what \-nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code. -.LP +Prevents the generation of any deprecated API at all in the documentation. This does what \-nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code. .TP 3 \-nodeprecatedlist -Prevents the generation of the file containing the list of deprecated APIs (deprecated\-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner. -.LP +Prevents the generation of the file containing the list of deprecated APIs (deprecated\-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner. .TP 3 \-nosince -Omits from the generated docs the "Since" sections associated with the @since tags. -.LP +Omits from the generated docs the "Since" sections associated with the @since tags. .TP 3 \-notree -Omits the class/interface hierarchy pages from the generated docs. These are the pages you reach using the "Tree" button in the navigation bar. The hierarchy is produced by default. -.LP +Omits the class/interface hierarchy pages from the generated docs. These are the pages you reach using the "Tree" button in the navigation bar. The hierarchy is produced by default. .TP 3 \-noindex -Omits the index from the generated docs. The index is produced by default. -.LP +Omits the index from the generated docs. The index is produced by default. .TP 3 \-nohelp -Omits the HELP link in the navigation bars at the top and bottom of each page of output. -.LP +Omits the HELP link in the navigation bars at the top and bottom of each page of output. .TP 3 \-nonavbar -Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The \f2\-nonavbar\fP option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only. -.LP +Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The \f2\-nonavbar\fP option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only. .TP 3 \-helpfile\ path/filename Specifies the path of an alternate help file \f2path/filename\fP that the HELP link in the top and bottom navigation bars link to. Without this option, the Javadoc tool automatically creates a help file \f2help\-doc.html\fP that is hard\-coded in the Javadoc tool. This option enables you to override this default. The \f2filename\fP can be any name and is not restricted to \f2help\-doc.html\fP \-\- the Javadoc tool will adjust the links in the navigation bar accordingly. For example: @@ -4582,8 +3485,7 @@ Specifies the path of an alternate HTML stylesheet file. Without this option, th .fi .TP 3 \-serialwarn -Generates compile\-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and \f2writeExternal\fP methods. -.LP +Generates compile\-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and \f2writeExternal\fP methods. .TP 3 \-charset\ name Specifies the HTML character set for this document. The name should be a preferred MIME name as given in the @@ -4609,10 +3511,10 @@ This META tag is described in the .na \f2HTML standard\fP @ .fi -http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2. (4197265 and 4137321) -.LP +http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2. (4197265 and 4137321) +.br +.br Also see \-encoding and \-docencoding. -.LP .TP 3 \-docencoding\ name Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as given in the @@ -4626,12 +3528,12 @@ http://www.iana.org/assignments/character\-sets. If you omit this option but use % \fP\f3javadoc \-docencoding "ISO\-8859\-1" mypackage\fP .fl .fi -Also see \-encoding and \-charset. -.LP +Also see \-encoding and \-charset. .TP 3 \-keywords -Adds HTML meta keyword tags to the generated file for each class. These tags can help the page be found by search engines that look for meta tags. (Most search engines that search the entire Internet do not look at meta tags, because pages can misuse them; but search engines offered by companies that confine their search to their own website can benefit by looking at meta tags.) -.LP +Adds HTML meta keyword tags to the generated file for each class. These tags can help the page be found by search engines that look for meta tags. (Most search engines that search the entire Internet do not look at meta tags, because pages can misuse them; but search engines offered by companies that confine their search to their own website can benefit by looking at meta tags.) +.br +.br The meta tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors are not included because they are identical to the class name. For example, the class String starts with these keywords: .nf \f3 @@ -4646,16 +3548,21 @@ The meta tags include the fully qualified name of the class and the unqualified .fl \fP .fi -.LP .TP 3 \-tag\ \ tagname:Xaoptcmf:"taghead" -Enables the Javadoc tool to interpret a simple, one\-argument custom block tag \f2@\fP\f2tagname\fP in doc comments. So the Javadoc tool can "spell\-check" tag names, it is important to include a \f2\-tag\fP option for every custom tag that is present in the source code, disabling (with \f2X\fP) those that are not being output in the current run. -.LP -The colon (\f4:\fP) is always the separator. To use a colon in \f2tagname\fP, see Use of Colon in Tag Name. -.LP -The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed on the next line by the text from its single argument, as shown in the example below. Like any block tag, this argument's text can contain inline tags, which are also interpreted. The output is similar to standard one\-argument tags, such as \f2@return\fP and \f2@author\fP. Omitting \f2taghead\fP causes \f2tagname\fP to appear as the heading. -.LP -\f3Placement of tags\fP \- The \f4Xaoptcmf\fP part of the argument determines where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using \f2X\fP). You can supply either \f4a\fP, to allow the tag in all places, or any combination of the other letters: \f4X\fP (disable tag) +Enables the Javadoc tool to interpret a simple, one\-argument custom block tag \f2@\fP\f2tagname\fP in doc comments. So the Javadoc tool can "spell\-check" tag names, it is important to include a \f2\-tag\fP option for every custom tag that is present in the source code, disabling (with \f2X\fP) those that are not being output in the current run. +.br +.br +The colon (\f4:\fP) is always the separator. To use a colon in \f2tagname\fP, see Use of Colon in Tag Name. +.br +.br +The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed on the next line by the text from its single argument, as shown in the example below. Like any block tag, this argument's text can contain inline tags, which are also interpreted. The output is similar to standard one\-argument tags, such as \f2@return\fP and \f2@author\fP. Omitting \f2taghead\fP causes \f2tagname\fP to appear as the heading. +.br +.br +\f3Placement of tags\fP \- The \f4Xaoptcmf\fP part of the argument determines where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using \f2X\fP). You can supply either \f4a\fP, to allow the tag in all places, or any combination of the other letters: +.br +.br +\f4X\fP (disable tag) .br \f4a\fP (all) .br @@ -4670,7 +3577,8 @@ The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed \f4m\fP (methods) .br \f4f\fP (fields) -.LP +.br +.br \f3Examples of single tags\fP \- An example of a tag option for a tag that can be used anywhere in the source code is: .nf \f3 @@ -4715,8 +3623,9 @@ use this tag option: .fl \fP .fi -\f3Spell\-checking tag names (Disabling tags)\fP \- Some developers put custom tags in the source code that they don't always want to output. In these cases, it is important to list all tags that are present in the source code, enabling the ones you want to output and disabling the ones you don't want to output. The presence of \f2X\fP disables the tag, while its absence enables the tag. This gives the Javadoc tool enough information to know if a tag it encounters is unknown, probably the results of a typo or a misspelling. It prints a warning in these cases. -.LP +\f3Spell\-checking tag names (Disabling tags)\fP \- Some developers put custom tags in the source code that they don't always want to output. In these cases, it is important to list all tags that are present in the source code, enabling the ones you want to output and disabling the ones you don't want to output. The presence of \f2X\fP disables the tag, while its absence enables the tag. This gives the Javadoc tool enough information to know if a tag it encounters is unknown, probably the results of a typo or a misspelling. It prints a warning in these cases. +.br +.br You can add \f2X\fP to the placement values already present, so that when you want to enable the tag, you can simply delete the \f2X\fP. For example, if @todo is a tag that you want to suppress on output, you would use: .nf \f3 @@ -4733,13 +3642,15 @@ or, if you'd rather keep it simple: .fl \fP .fi -.LP -The syntax \f2\-tag todo:X\fP works even if \f2@todo\fP is defined by a taglet. -.LP -\f3Order of tags\fP \- The order of the \f2\-tag\fP (and \f2\-taglet\fP) options determine the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order \-\- they take only the standard tag's name. (Subheadings for standard tags cannot be altered.) This is illustrated in the following example. -.LP -If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its order. If they are both present, then whichever appears last on the command line determines its order. (This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if \f2\-taglet\fP and \f2\-tag\fP both have the name "todo", the one that appears last on the command line will determine its order. -.LP +The syntax \f2\-tag todo:X\fP works even if \f2@todo\fP is defined by a taglet. +.br +.br +\f3Order of tags\fP \- The order of the \f2\-tag\fP (and \f2\-taglet\fP) options determine the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order \-\- they take only the standard tag's name. (Subheadings for standard tags cannot be altered.) This is illustrated in the following example. +.br +.br +If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its order. If they are both present, then whichever appears last on the command line determines its order. (This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if \f2\-taglet\fP and \f2\-tag\fP both have the name "todo", the one that appears last on the command line will determine its order. +.br +.br \f3Example of a complete set of tags\fP \- This example inserts "To Do" after "Parameters" and before "Throws" in the output. By using "X", it also specifies that @example is a tag that might be encountered in the source code that should not be output during this run. Notice that if you use @argfile, you can put the tags on separate lines in an argument file like this (no line continuation characters needed): .nf \f3 @@ -4758,21 +3669,23 @@ If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its or .fl \fP .fi -.LP -When javadoc parses the doc comments, any tag encountered that is neither a standard tag nor passed in with \f2\-tag\fP or \f2\-taglet\fP is considered unknown, and a warning is thrown. -.LP -The standard tags are initially stored internally in a list in their default order. Whenever \f2\-tag\fP options are used, those tags get appended to this list \-\- standard tags are moved from their default position. Therefore, if a \f2\-tag\fP option is omitted for a standard tag, it remains in its default position. -.LP -\f3Avoiding Conflicts\fP \- If you want to slice out your own namespace, you can use a dot\-separated naming convention similar to that used for packages: \f2com.mycompany.todo\fP. Sun will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Sun. In other words, if you create a tag or taglet \f2@todo\fP, it will always have the same behavior you define, even if Sun later creates a standard tag of the same name. -.LP +When javadoc parses the doc comments, any tag encountered that is neither a standard tag nor passed in with \f2\-tag\fP or \f2\-taglet\fP is considered unknown, and a warning is thrown. +.br +.br +The standard tags are initially stored internally in a list in their default order. Whenever \f2\-tag\fP options are used, those tags get appended to this list \-\- standard tags are moved from their default position. Therefore, if a \f2\-tag\fP option is omitted for a standard tag, it remains in its default position. +.br +.br +\f3Avoiding Conflicts\fP \- If you want to slice out your own namespace, you can use a dot\-separated naming convention similar to that used for packages: \f2com.mycompany.todo\fP. Oracle will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Oracle. In other words, if you create a tag or taglet \f2@todo\fP, it will always have the same behavior you define, even if Oracle later creates a standard tag of the same name. +.br +.br \f3Annotations vs. Javadoc Tags\fP \- In general, if the markup you want to add is intended to affect or produce documentation, it should probably be a javadoc tag; otherwise, it should be an annotation. See .na \f2Comparing Annotations and Javadoc Tags\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#annotations -.LP -You can also create more complex block tags, or custom inline tags with the \-taglet option. -.LP +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#annotations< +.br +.br +You can also create more complex block tags, or custom inline tags with the \-taglet option. .TP 3 \-taglet\ \ class Specifies the class file that starts the taglet used in generating the documentation for that tag. Use the fully\-qualified name for \f2class\fP. This taglet also defines the number of text arguments that the custom tag has. The taglet accepts those arguments, processes them, and generates the output. For extensive documentation with example taglets, see: @@ -4782,13 +3695,14 @@ o .na \f2Taglet Overview\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/taglet/overview.html +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html .RE -.LP -Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. -.LP -Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. So a taglet cannot 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's text to a file or triggering another process. -.LP +Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. +.br +.br +Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. So a taglet cannot 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's text to a file or triggering another process. +.br +.br Use the \f2\-tagletpath\fP option to specify the path to the taglet. Here is an example that inserts the "To Do" taglet after "Parameters" and ahead of "Throws" in the generated pages: .nf \f3 @@ -4809,25 +3723,21 @@ Use the \f2\-tagletpath\fP option to specify the path to the taglet. Here is an .fl \fP .fi -.LP -Alternatively, you can use the \f2\-taglet\fP option in place of its \f2\-tag\fP option, but that may be harder to read. -.LP +Alternatively, you can use the \f2\-taglet\fP option in place of its \f2\-tag\fP option, but that may be harder to read. .TP 3 \-tagletpath\ \ tagletpathlist -Specifies the search paths for finding taglet class files (.class). The \f2tagletpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. -.LP +Specifies the search paths for finding taglet class files (.class). The \f2tagletpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. .TP 3 \-docfilessubdirs\ -Enables deep copying of "\f2doc\-files\fP" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory \f2doc\-files/example/images\fP and all its contents would now be copied. There is also an option to exclude subdirectories. -.LP +Enables deep copying of "\f2doc\-files\fP" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory \f2doc\-files/example/images\fP and all its contents would now be copied. There is also an option to exclude subdirectories. .TP 3 \-excludedocfilessubdir\ \ name1:name2... -Excludes any "\f2doc\-files\fP" subdirectories with the given names. This prevents the copying of SCCS and other source\-code\-control subdirectories. -.LP +Excludes any "\f2doc\-files\fP" subdirectories with the given names. This prevents the copying of SCCS and other source\-code\-control subdirectories. .TP 3 \-noqualifier\ \ all\ | \ packagename1:packagename2:... -Omits qualifying package name from ahead of class names in output. The argument to \f2\-noqualifier\fP is either "\f2all\fP" (all package qualifiers are omitted) or a colon\-separate list of packages, with wildcards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. -.LP +Omits qualifying package name from ahead of class names in output. The argument to \f2\-noqualifier\fP is either "\f2all\fP" (all package qualifiers are omitted) or a colon\-separate list of packages, with wildcards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. +.br +.br The following example omits all package qualifiers: .nf \f3 @@ -4852,8 +3762,7 @@ The following example omits package qualifiers starting with "java", and "com.su .fl \fP .fi -Where a package qualifier would appear due to the above behavior, the name can be suitably shortened \-\- see How a name is displayed. This rule is in effect whether or not \f2\-noqualifier\fP is used. -.LP +Where a package qualifier would appear due to the above behavior, the name can be suitably shortened \-\- see How a name is displayed. This rule is in effect whether or not \f2\-noqualifier\fP is used. .TP 3 \-notimestamp\ Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page. Useful when you want to run javadoc on two source bases and diff them, as it prevents timestamps from causing a diff (which would otherwise be a diff on every page). The timestamp includes the javadoc version number, and currently looks like this: @@ -4864,53 +3773,40 @@ Suppresses the timestamp, which is hidden in an HTML comment in the generated HT .fl \fP .fi -.LP .TP 3 \-nocomment\ Suppress the entire comment body, including the main description and all tags, generating only declarations. This option enables re\-using source files originally intended for a different purpose, to produce skeleton HTML documentation at the early stages of a new project. +.TP 3 +\-sourcetab tabLength +Specify the number of spaces each tab takes up in the source. .RE .SH "COMMAND LINE ARGUMENT FILES" .LP - -.LP -.LP To shorten or simplify the javadoc command line, you can specify one or more files that themselves contain arguments to the \f2javadoc\fP command (except \f2\-J\fP options). This enables you to create javadoc commands of any length on any operating system. .LP -.LP An argument file can include javac options and source filenames in any combination. The arguments within a file can be space\-separated or newline\-separated. If a filename contains embedded spaces, put the whole filename in double quotes. .LP -.LP Filenames within an argument file are relative to the current directory, not the location of the argument file. Wildcards (*) are not allowed in these lists (such as for specifying \f2*.java\fP). Use of the '\f2@\fP' character to recursively interpret files is not supported. The \f2\-J\fP options are not supported because they are passed to the launcher, which does not support argument files. .LP -.LP When executing javadoc, pass in the path and name of each argument file with the '\f2@\fP' leading character. When javadoc encounters an argument beginning with the character `\f2@\fP', it expands the contents of that file into the argument list. -.LP .SS Example \- Single Arg File .LP -.LP You could use a single argument file named "\f2argfile\fP" to hold all Javadoc arguments: -.LP .nf \f3 .fl % \fP\f3javadoc @argfile\fP .fl .fi - -.LP .LP This argument file could contain the contents of both files shown in the next example. -.LP .SS Example \- Two Arg Files .LP -.LP You can create two argument files \-\- one for the Javadoc options and the other for the package names or source filenames: (Notice the following lists have no line\-continuation characters.) .LP -.LP Create a file named "\f2options\fP" containing: -.LP .nf \f3 .fl @@ -4920,13 +3816,13 @@ Create a file named "\f2options\fP" containing: .fl \-splitindex .fl - \-windowtitle 'Java(TM) SE 7 API Specification' + \-windowtitle 'Java SE 7 API Specification' .fl - \-doctitle 'Java(TM) SE 7 API Specification' + \-doctitle 'Java SE 7 API Specification' .fl - \-header '<b>Java(TM); SE 7' + \-header '<b>Java(TM) SE 7</b>' .fl - \-bottom 'Copyright 1993\-2009 Sun Microsystems, Inc. All Rights Reserved.' + \-bottom 'Copyright © 1993\-2011 Oracle and/or its affiliates. All rights reserved.' .fl \-group "Core Packages" "java.*" .fl @@ -4936,11 +3832,8 @@ Create a file named "\f2options\fP" containing: .fl \fP .fi - -.LP .LP Create a file named "\f2packages\fP" containing: -.LP .nf \f3 .fl @@ -4952,120 +3845,85 @@ Create a file named "\f2packages\fP" containing: .fl \fP .fi - -.LP .LP You would then run javadoc with: -.LP .nf \f3 .fl % \fP\f3javadoc @options @packages\fP .fl .fi - -.LP .SS Example \- Arg Files with Paths .LP -.LP The argument files can have paths, but any filenames inside the files are relative to the current working directory (not \f2path1\fP or \f2path2\fP): -.LP .nf \f3 .fl % \fP\f3javadoc @path1/options @path2/packages\fP .fl .fi - -.LP .SS Example \- Option Arguments .LP -.LP Here's an example of saving just an argument to a javadoc option in an argument file. We'll use the \f2\-bottom\fP option, since it can have a lengthy argument. You could create a file named "\f2bottom\fP" containing its text argument: -.LP .nf \f3 .fl -'<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit a +<font size="\-1"> .fl -bug or feature</a><br><br>Java is a trademark or registered trademark of + <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> .fl -Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-2000 Sun + Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> .fl -Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. + Oracle is a registered trademark of Oracle Corporation and/or its affiliates. .fl -All Rights Reserved.</font>' + Other names may be trademarks of their respective owners.</font> .fl \fP .fi - -.LP .LP Then run the Javadoc tool with: -.LP .nf \f3 .fl % \fP\f3javadoc \-bottom @bottom @packages\fP .fl .fi - -.LP .LP Or you could include the \f2\-bottom\fP option at the start of the argument file, and then just run it as: -.LP .nf \f3 .fl % \fP\f3javadoc @bottom @packages\fP .fl .fi - -.LP - -.LP .SH "Name" Running -.LP .SH "RUNNING JAVADOC" .LP - -.LP -.LP \f3Version Numbers\fP \- The version number of javadoc can be determined using \f3javadoc \-J\-version\fP. The version number of the standard doclet appears in its output stream. It can be turned off with \f2\-quiet\fP. .LP -.LP \f3Public programmatic interface\fP \- To invoke the Javadoc tool from within programs written in the Java language. This interface is in \f2com.sun.tools.javadoc.Main\fP (and javadoc is re\-entrant). For more details, see .na \f2Standard Doclet\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javadoc/standard\-doclet.html#runningprogrammatically. -.LP +http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/standard\-doclet.html#runningprogrammatically. .LP \f3Running Doclets\fP \- The instructions given below are for invoking the standard HTML doclet. To invoke a custom doclet, use the \-doclet and \-docletpath options. For full, working examples of running a particular doclet, see the .na \f2MIF Doclet documentation\fP @ .fi http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. -.LP .SH "SIMPLE EXAMPLES" .LP - -.LP -.LP You can run javadoc on entire packages or individual source files. Each package name has a corresponding directory name. In the following examples, the source files are located at \f2/home/src/java/awt/*.java\fP. The destination directory is \f2/home/html\fP. -.LP .SS Documenting One or More Packages .LP -.LP To document a package, the source files (\f2*.java\fP) for that package must be located in a directory having the same name as the package. If a package name is made up of several identifiers (separated by dots, such as \f2java.awt.color\fP), each subsequent identifier must correspond to a deeper subdirectory (such as \f2java/awt/color\fP). You may split the source files for a single package among two such directory trees located at different places, as long as \f2\-sourcepath\fP points to them both \-\- for example \f2src1/java/awt/color\fP and \f2src2/java/awt/color\fP. .LP -.LP You can run javadoc either by changing directories (with \f2cd\fP) or by using \f2\-sourcepath\fP option. The examples below illustrate both alternatives. -.LP .RS 3 .TP 2 o @@ -5108,17 +3966,12 @@ o .fl .fi .RE - -.LP .LP Result: All cases generate HTML\-formatted documentation for the public and protected classes and interfaces in packages \f2java.awt\fP and \f2java.awt.event\fP and save the HTML files in the specified destination directory (\f2/home/html\fP). Because two or more packages are being generated, the document has three HTML frames \-\- for the list of packages, the list of classes, and the main class pages. -.LP .SS Documenting One or More Classes .LP -.LP The second way to run the Javadoc tool is by passing in one or more source files (\f2.java\fP). You can run javadoc either of the following two ways \-\- by changing directories (with \f2cd\fP) or by fully\-specifying the path to the \f2.java\fP files. Relative paths are relative to the current directory. The \f2\-sourcepath\fP option is ignored when passing in source files. You can use command line wildcards, such as asterisk (*), to specify groups of classes. -.LP .RS 3 .TP 2 o @@ -5155,93 +4008,76 @@ o .fi This example generates HTML\-formatted documentation for the class \f2Button\fP and classes beginning with \f2Graphics\fP. .RE - -.LP .SS Documenting Both Packages and Classes .LP -.LP You can document entire packages and individual classes at the same time. Here's an example that mixes two of the previous examples. You can use \f2\-sourcepath\fP for the path to the packages but not for the path to the individual classes. -.LP .nf \f3 .fl % \fP\f3javadoc \-d /home/html \-sourcepath /home/src java.awt /home/src/java/applet/Applet.java\fP .fl .fi - -.LP .LP This example generates HTML\-formatted documentation for the package \f2java.awt\fP and class \f2Applet\fP. (The Javadoc tool determines the package name for \f2Applet\fP from the package declaration, if any, in the \f2Applet.java\fP source file.) -.LP .SH "REAL WORLD EXAMPLE" .LP - -.LP -.LP The Javadoc tool has many useful options, some of which are more commonly used than others. Here is effectively the command we use to run the Javadoc tool on the Java platform API. We use 180MB of memory to generate the documentation for the 1500 (approx.) public and protected classes in the Java SE Platform, Standard Edition, v1.2. .LP -.LP The same example is shown twice \-\- first as executed on the command line, then as executed from a makefile. It uses absolute paths in the option arguments, which enables the same \f2javadoc\fP command to be run from any directory. -.LP .SS Command Line Example .LP -.LP -This command line example is over 900 characters, which is too long for some shells, such as DOS. You can use a command line argument file (or write a shell script) to workaround this limitation. -.LP +The following example may be too long for some shells such as DOS. You can use a command line argument file (or write a shell script) to workaround this limitation. .nf \f3 .fl -% javadoc \-sourcepath /java/jdk/src/share/classes \\ +% javadoc \-sourcepath /java/jdk/src/share/classes \\ +.fl + \-overview /java/jdk/src/share/classes/overview.html \\ .fl - \-overview /java/jdk/src/share/classes/overview.html \\ + \-d /java/jdk/build/api \\ .fl - \-d /java/jdk/build/api \\ + \-use \\ .fl - \-use \\ + \-splitIndex \\ .fl - \-splitIndex \\ + \-windowtitle 'Java Platform, Standard Edition 7 API Specification' \\ .fl - \-windowtitle 'Java(TM) Platform, Standard Edition 7 API Specification' \\ + \-doctitle 'Java Platform, Standard Edition 7 API Specification' \\ .fl - \-doctitle 'Java(TM) Platform, Standard Edition 7 API Specification' \\ + \-header '<b>Java(TM) SE 7</b>' \\ .fl - \-header '<b>Java(TM) SE </b><br><font size="\-1">7</font>' \\ + \-bottom '<font size="\-1"> .fl - \-bottom '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit + <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> .fl -a bug or feature</a><br><br>Java is a trademark or registered trademark of Sun Microsystems, + Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> .fl -Inc. in the US and other countries.<br>Copyright 1993\-1999 Sun Microsystems, Inc. + Oracle is a registered trademark of Oracle Corporation and/or its affiliates. .fl -901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>' \\ + Other names may be trademarks of their respective owners.</font>' \\ .fl \-group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \\ .fl - \-group "Extension Packages" "javax.*" \\ + \-group "Extension Packages" "javax.*" \\ .fl - \-J\-Xmx180m \\ + \-J\-Xmx180m \\ .fl @packages .fl \fP .fi - -.LP .LP where \f2packages\fP is the name of a file containing the packages to process, such as \f2java.applet java.lang\fP. None of the options should contain any newline characters between the single quotes. (For example, if you copy and paste this example, delete the newline characters from the \f2\-bottom\fP option.) See the other notes listed below. -.LP .SS Makefile Example .LP -.LP This is an example of a GNU makefile. For an example of a Windows makefile, see .na \f2creating a makefile for Windows\fP @ .fi http://java.sun.com/j2se/javadoc/faq/index.html#makefiles. -.LP .nf \f3 .fl @@ -5283,15 +4119,15 @@ DOCTITLE = 'Java(TM) Platform Standard Edition 7 API Specification' .fl HEADER = '<b>Java(TM) SE 7</font>' .fl -BOTTOM = '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit +BOTTOM = '<font size="\-1"> .fl - a bug or feature</a><br><br>Java is a trademark or registered trademark + <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> .fl - of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-1999 + Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> .fl - Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. + Oracle is a registered trademark of Oracle Corporation and/or its affiliates. .fl - All Rights Reserved.</font>' + Other names may be trademarks of their respective owners.</font>' .fl GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"' .fl @@ -5301,14 +4137,10 @@ SRCDIR = '/java/jdk/1.7.0/src/share/classes' .fl \fP .fi - -.LP .LP Single quotes are used to surround makefile arguments. .LP -.LP \f3NOTES\fP -.LP .RS 3 .TP 2 o @@ -5320,15 +4152,9 @@ If you omit the \f2\-footer\fP option, as done here, the Javadoc tool copies the o Other important options you might want to use but not needed in this example are \-\f2classpath\fP and \-\f2link\fP. .RE - -.LP .SH "TROUBLESHOOTING" -.LP - -.LP .SS General Troubleshooting -.LP .RS 3 .TP 2 o @@ -5347,37 +4173,23 @@ o o \f3Documents only legal classes\fP \- When documenting a package, javadoc only reads files whose names are composed of legal class names. You can prevent javadoc from parsing a file by including, for example, a hyphen "\-" in its filename. .RE - -.LP .SS Errors and Warnings .LP -.LP Error and warning messages contain the filename and line number to the declaration line rather than to the particular line in the doc comment. -.LP .RS 3 .TP 2 o \f2"error: cannot read: Class1.java"\fP the Javadoc tool is trying to load the class Class1.java in the current directory. The class name is shown with its path (absolute or relative), which in this case is the same as \f2./Class1.java\fP. .RE - -.LP .SH "ENVIRONMENT" -.LP - -.LP .RS 3 .TP 3 CLASSPATH Environment variable that provides the path which javadoc uses to find user class files. This environment variable is overridden by the \f2\-classpath\fP option. Separate directories with a colon, for example: .:/home/classes:/usr/local/java/classes .RE - -.LP .SH "SEE ALSO" -.LP - -.LP .RS 3 .TP 2 o @@ -5399,75 +4211,24 @@ o .na \f2Javadoc Home Page\fP @ .fi -http://java.sun.com/j2se/javadoc/index.jsp +http://www.oracle.com/technetwork/java/javase/documentation/index\-jsp\-135444.html .TP 2 o .na \f2How to Write Doc Comments for Javadoc\fP @ .fi -http://java.sun.com/j2se/javadoc/writingdoccomments/index.html +http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html .TP 2 o .na \f2Setting the Class Path\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#general +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general .TP 2 o .na \f2How Javac and Javadoc Find Classes\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html#srcfiles (tools.jar) +http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html#srcfiles (tools.jar) .RE - -.LP -.LP -.TS -.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 -.de 35 -.ps \n(.s -.vs \n(.vu -.in \n(.iu -.if \n(.u .fi -.if \n(.j .ad -.if \n(.j=0 .na -.. -.nf -.nr #~ 0 -.if n .nr #~ 0.6n -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.fc -.nr 33 \n(.s -.rm 80 -.nr 80 0 -.80 -.rm 80 -.nr 38 1n -.nr 79 0 -.nr 40 \n(79+(0*\n(38) -.nr 80 +\n(40 -.nr TW \n(80 -.if t .if \n(TW>\n(.li .tm Table at line 3869 file Input is too wide - \n(TW units -.fc   -.nr #T 0-1 -.nr #a 0-1 -.eo -.de T# -.ds #d .d -.if \(ts\n(.z\(ts\(ts .ds #d nl -.mk ## -.nr ## -1v -.ls 1 -.ls -.. -.ec -.fc -.nr T. 1 -.T# 1 -.35 -.TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-3 - -.LP diff --git a/src/solaris/doc/sun/man/man1/javah.1 b/src/solaris/doc/sun/man/man1/javah.1 index 60a51c37af62adc8a11f3de233b0564617dd7a13..16dfa9bcc93bf23cde8b5fc2b74d963b0aa81329 100644 --- a/src/solaris/doc/sun/man/man1/javah.1 +++ b/src/solaris/doc/sun/man/man1/javah.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,37 +19,27 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javah 1 "02 Jun 2010" +.TH javah 1 "10 May 2011" .LP .SH "Name" javah \- C Header and Stub File Generator -.LP -.RS 3 - .LP .LP \f3javah\fP produces C header files and C source files from a Java class. These files provide the connective glue that allow your Java and C code to interact. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 .fl javah [ \fP\f3options\fP\f3 ] fully\-qualified\-classname. . . .fl -javah_g [ \fP\f3options\fP\f3 ] fully\-qualified\-classname. . . -.fl \fP .fi .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3javah\fP generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition whose layout parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class. @@ -63,12 +53,7 @@ By default \f3javah\fP creates a header file for each class listed on the comman .LP The new native method interface, Java Native Interface (JNI), does not require header information or stub files. \f3javah\fP can still be used to generate native method function proptotypes needed for JNI\-style native methods. \f3javah\fP produces JNI\-style output by default, and places the result in the .h file. .LP -.LP -\f3javah_g\fP is a non\-optimized version of \f3javah\fP suitable for use with debuggers like jdb(1). -.LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -110,11 +95,10 @@ For example: .fl \fP .fi -.LP As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations). .br .br -For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. +For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. .TP 3 \-bootclasspath path Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java 2 platform located in \f2jre/lib/rt.jar\fP and several other jar files. @@ -131,8 +115,6 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "ENVIRONMENT VARIABLES" -.LP - .LP .RS 3 .TP 3 @@ -149,8 +131,6 @@ Used to provide the system a path to user\-defined classes. Directories are sepa .LP .SH "SEE ALSO" -.LP - .LP .LP javac(1), java(1), jdb(1), javap(1), javadoc(1) diff --git a/src/solaris/doc/sun/man/man1/javap.1 b/src/solaris/doc/sun/man/man1/javap.1 index 33518779b69056fd2e6c291c7917e431d95de00a..aa6e8d0114cd9bce3fa4a25cdd6c9acda2e84c79 100644 --- a/src/solaris/doc/sun/man/man1/javap.1 +++ b/src/solaris/doc/sun/man/man1/javap.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1994, 2011, 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,41 +19,43 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javap 1 "02 Jun 2010" +.TH javap 1 "10 May 2011" .LP .SH "Name" javap \- The Java Class File Disassembler -.LP -.RS 3 - .LP .LP Disassembles class files. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 .fl -javap [ \fP\f3options\fP\f3 ] class. . . +javap [ \fP\f3options\fP\f3 ] classes .fl \fP .fi .LP .SH "DESCRIPTION" -.LP - .LP .LP -The \f3javap\fP command disassembles a class file. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout. For example, compile the following class declaration: +The \f3javap\fP command disassembles one or more class files. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout. .LP .RS 3 +.TP 3 +options +Command\-line options. +.TP 3 +classes +List of one or more classes (separated by spaces) to be processed for annotations (such as \f2DocFooter.class\fP). You may specify a class that can be found in the class path, by its file name (for example, \f2/home/user/myproject/src/DocFooter.class\fP), or with a URL (for example, \f2file:///home/user/myproject/src/DocFooter.class\fP). +.RE +.LP +.LP +For example, compile the following class declaration: .LP .nf \f3 @@ -96,166 +98,160 @@ public class DocFooter extends Applet { .fl \fP .fi -.RE .LP .LP -The output from \f3javap DocFooter\fP yields: -.LP -.RS 3 - +The output from \f3javap DocFooter.class\fP yields: .LP .nf \f3 .fl -Compiled from DocFooter.java +Compiled from "DocFooter.java" .fl public class DocFooter extends java.applet.Applet { .fl - java.lang.String date; + java.lang.String date; .fl - java.lang.String email; + java.lang.String email; .fl - public DocFooter(); + public DocFooter(); .fl - public void init(); + public void init(); .fl - public void paint(java.awt.Graphics); + public void paint(java.awt.Graphics); .fl } .fl \fP .fi -.RE .LP .LP -The output from \f3javap \-c DocFooter\fP yields: -.LP -.RS 3 - +The output from \f3javap \-c DocFooter.class\fP yields: .LP .nf \f3 .fl -Compiled from DocFooter.java +Compiled from "DocFooter.java" .fl public class DocFooter extends java.applet.Applet { .fl - java.lang.String date; -.fl - java.lang.String email; -.fl - public DocFooter(); -.fl - public void init(); + java.lang.String date; .fl - public void paint(java.awt.Graphics); + .fl -} + java.lang.String email; .fl .fl -Method DocFooter() + public DocFooter(); .fl - 0 aload_0 + Code: .fl - 1 invokespecial #1 <Method java.applet.Applet()> + 0: aload_0 .fl - 4 return + 1: invokespecial #1 // Method java/applet/Applet."<init>":()V +.fl + 4: return .fl .fl -Method void init() + public void init(); +.fl + Code: .fl - 0 aload_0 + 0: aload_0 .fl - 1 sipush 500 + 1: sipush 500 .fl - 4 bipush 100 + 4: bipush 100 .fl - 6 invokevirtual #2 <Method void resize(int, int)> + 6: invokevirtual #2 // Method resize:(II)V .fl - 9 aload_0 + 9: aload_0 .fl - 10 aload_0 + 10: aload_0 .fl - 11 ldc #3 <String "LAST_UPDATED"> + 11: ldc #3 // String LAST_UPDATED .fl - 13 invokevirtual #4 <Method java.lang.String getParameter(java.lang.String)> + 13: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String; .fl - 16 putfield #5 <Field java.lang.String date> + 16: putfield #5 // Field date:Ljava/lang/String; .fl - 19 aload_0 + 19: aload_0 .fl - 20 aload_0 + 20: aload_0 .fl - 21 ldc #6 <String "EMAIL"> + 21: ldc #6 // String EMAIL .fl - 23 invokevirtual #4 <Method java.lang.String getParameter(java.lang.String)> + 23: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String; .fl - 26 putfield #7 <Field java.lang.String email> + 26: putfield #7 // Field email:Ljava/lang/String; .fl - 29 return + 29: return .fl .fl -Method void paint(java.awt.Graphics) + public void paint(java.awt.Graphics); .fl - 0 aload_1 + Code: .fl - 1 new #8 <Class java.lang.StringBuffer> + 0: aload_1 .fl - 4 dup + 1: new #8 // class java/lang/StringBuilder .fl - 5 invokespecial #9 <Method java.lang.StringBuffer()> + 4: dup .fl - 8 aload_0 + 5: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V .fl - 9 getfield #5 <Field java.lang.String date> + 8: aload_0 .fl - 12 invokevirtual #10 <Method java.lang.StringBuffer append(java.lang.String)> + 9: getfield #5 // Field date:Ljava/lang/String; .fl - 15 ldc #11 <String " by "> + 12: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; .fl - 17 invokevirtual #10 <Method java.lang.StringBuffer append(java.lang.String)> + 15: ldc #11 // String by .fl - 20 invokevirtual #12 <Method java.lang.String toString()> + 17: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; .fl - 23 bipush 100 + 20: invokevirtual #12 // Method java/lang/StringBuilder.toString:()Ljava/lang/String; .fl - 25 bipush 15 + 23: bipush 100 .fl - 27 invokevirtual #13 <Method void drawString(java.lang.String, int, int)> + 25: bipush 15 .fl - 30 aload_1 + 27: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V .fl - 31 aload_0 + 30: aload_1 .fl - 32 getfield #7 <Field java.lang.String email> + 31: aload_0 .fl - 35 sipush 290 + 32: getfield #7 // Field email:Ljava/lang/String; .fl - 38 bipush 15 + 35: sipush 290 .fl - 40 invokevirtual #13 <Method void drawString(java.lang.String, int, int)> + 38: bipush 15 .fl - 43 return + 40: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V +.fl + 43: return +.fl +} .fl \fP .fi -.RE .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 -\-help +\-help \-\-help \-? Prints out help message for \f3javap\fP. .TP 3 +\-version +Prints out version information. +.TP 3 \-l Prints out line and local variable tables. .TP 3 @@ -268,14 +264,11 @@ Shows only protected and public classes and members. \-package Shows only package, protected, and public classes and members. This is the default. .TP 3 -\-private +\-private \-p Shows all classes and members. .TP 3 \-Jflag Pass \f2flag\fP directly to the runtime system. Some examples: -.RS 3 - -.LP .nf \f3 .fl @@ -285,11 +278,16 @@ javap \-J\-Djava.security.manager \-J\-Djava.security.policy=MyPolicy MyClassNam .fl \fP .fi -.RE .TP 3 \-s Prints internal type signatures. .TP 3 +\-sysinfo +Shows system information (path, size, date, MD5 hash) of the class being processed. +.TP 3 +\-constants +Shows static final constants. +.TP 3 \-c Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the .na @@ -301,22 +299,7 @@ http://java.sun.com/docs/books/vmspec/. Prints stack size, number of \f2locals\fP and \f2args\fP for methods. .TP 3 \-classpath path -Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is: -.nf -\f3 -.fl - .:<your_path> -.fl -\fP -.fi -For example: -.nf -\f3 -.fl -.:/home/avh/classes:/usr/local/java/classes -.fl -\fP -.fi +Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. .TP 3 \-bootclasspath path Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in \f2jre/lib/rt.jar\fP and several other jar files. @@ -325,32 +308,8 @@ Specifies path from which to load bootstrap classes. By default, the bootstrap c Overrides location at which installed extensions are searched for. The default location for extensions is the value of \f2java.ext.dirs\fP. .RE -.LP -.SH "ENVIRONMENT VARIABLES" -.LP - -.LP -.RS 3 -.TP 3 -CLASSPATH -Used to provide the system a path to user\-defined classes. Directories are separated by colons, for example, For example: -.RS 3 - -.LP -.nf -\f3 -.fl -.:/home/avh/classes:/usr/local/java/classes -.fl -\fP -.fi -.RE -.RE - .LP .SH "SEE ALSO" -.LP - .LP .LP javac(1), java(1), jdb(1), javah(1), javadoc(1) diff --git a/src/solaris/doc/sun/man/man1/javaws.1 b/src/solaris/doc/sun/man/man1/javaws.1 index 281046c10722a7c4fe0bcacd5d4f42b9a96e6d55..a73df25c0dbfd1daef4f4e3e89c060f35bf9dec7 100644 --- a/src/solaris/doc/sun/man/man1/javaws.1 +++ b/src/solaris/doc/sun/man/man1/javaws.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2003, 2011, 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,30 +19,18 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH javaws 1 "02 Jun 2010" +.TH javaws 1 "10 May 2011" .LP .SH "Name" \f2javaws\fP Command Line .LP -.LP -\ -.LP -.SS -NAME -.LP -.RS 3 - +.SH "NAME" .LP .LP \f2javaws\fP \- Java Web Start launcher command .LP -.RE -.SS -SYNOPSIS -.LP -.RS 3 - +.SH "SYNOPSIS" .LP .LP \f2javaws [run\-options] <jnlp>\fP @@ -50,49 +38,27 @@ SYNOPSIS .LP \f2javaws [control\-options]\fP .LP -.RE -.SS -PARAMETERS -.LP -.RS 3 - +.SH "PARAMETERS" .LP .LP \f2[run\-options]\fP -.LP -.RS 3 - .LP .LP Command\-line run\-options. run\-options may be in any order. For a discussion of the various run\-options, see RUN\-OPTIONS below. .LP -.RE .LP \f2<jnlp>\fP -.LP -.RS 3 - .LP .LP This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file. .LP -.RE .LP \f2[control\-options]\fP -.LP -.RS 3 - .LP .LP Command\-line control\-options. control\-options may be in any order. For a discussion of the various control\-options, see CONTROL\-OPTIONS below. .LP -.RE -.RE -.SS -DESCRIPTION -.LP -.RS 3 - +.SH "DESCRIPTION" .LP .LP The \f2javaws\fP command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches Java applications/applets hosted on a network. @@ -103,256 +69,154 @@ If a JNLP file is specified, \f2javaws\fP will launch the Java application/apple .LP The \f2javaws\fP launcher has a set of options that are supported in the current release. However, the options may be removed in a future release. .LP -.RE -.SS -RUN\-OPTIONS -.LP -.RS 3 - +.SH "RUN\-OPTIONS" .LP .LP \f2\-offline\fP -.LP -.RS 3 - .LP .LP -run Java Web Start in offline mode. +Run Java Web Start in offline mode. .LP -.RE .LP \f2\-Xnosplash\fP -.LP -.RS 3 - .LP .LP -disable the display of the initial splash screen. +Do not display the initial splash screen. .LP -.RE .LP \f2\-open <arguments>\fP -.LP -.RS 3 - .LP .LP If specified, replaces the arguments in the jnlp file with \f2\-open <arguments>\fP. .LP -.RE .LP \f2\-print <arguments>\fP -.LP -.RS 3 - .LP .LP If specified, replaces the arguments in the jnlp file with \f2\-print <arguments>\fP. .LP -.RE .LP \f2\-online\fP -.LP -.RS 3 - .LP .LP -run in online mode (default behavior). +Use online mode (default behavior). .LP -.RE .LP \f2\-wait\fP -.LP -.RS 3 - .LP .LP -If specified, the \f2javaws\fP process will not exit until the application exits. +If specified, the \f2javaws\fP process will not exit until the application exits. This option does not function as described on Windows platforms. .LP -.RE .LP \f2\-verbose\fP -.LP -.RS 3 - .LP .LP -display additional output. +Display additional output. .LP -.RE .LP \f2\-J<option>\fP -.LP -.RS 3 - .LP .LP -supply options to the vm. +Supply options to the VM. .LP -.RE .LP \f2\-system\fP .LP -.RS 3 - .LP +Run the application from the system cache only. .LP -run the application from the system cache only. +.SH "CONTROL\-OPTIONS" .LP -.RE -.RE -.SS -CONTROL\-OPTIONS .LP -.RS 3 - +\f2\-viewer\fP .LP .LP -\f2\-viewer\fP +Show the Cache Viewer in the Java Control Panel. .LP -.RS 3 - .LP +\f2\-clearcache\fP .LP -show the Cache Viewer in the java control panel .LP -.RE +Remove all non\-installed applications from the cache. .LP -\f2\-userConfig <property name>\fP .LP -.RS 3 - +\f2\-userConfig <property name>\fP .LP .LP -clear the specified deployment property. +Clear the specified deployment property. .LP -.RE .LP \f2\-userConfig <property name> <property value>\fP .LP -.RS 3 - .LP +Set the specified deployment property to the specified value. .LP -set the specified deployment property to the specified value. -.LP -.RE .LP \f2\-uninstall\fP -.LP -.RS 3 - .LP .LP -remove all applications from the cache. +Remove all applications from the cache. .LP -.RE .LP \f2\-uninstall <jnlp>\fP -.LP -.RS 3 - .LP .LP -remove the application from the cache. +Remove the application from the cache. .LP -.RE .LP \f2\-import [import\-options] <jnlp>\fP -.LP -.RS 3 - .LP .LP -import the application to the cache. +Import the application to the cache. .LP -.RE -\f3IMPORT\-OPTIONS\fP +.SH "IMPORT\-OPTIONS" .LP .LP \f2\-silent\fP -.LP -.RS 3 - .LP .LP -import silently (with no user interface). +Import silently (with no user interface). .LP -.RE .LP \f2\-system\fP -.LP -.RS 3 - .LP .LP -import application to the system cache. +Import application to the system cache. .LP -.RE .LP \f2\-codebase <url>\fP -.LP -.RS 3 - .LP .LP -retrieve resources from the given codebase. +Retrieve resources from the given codebase. .LP -.RE .LP \f2\-shortcut\fP -.LP -.RS 3 - .LP .LP -install shortcuts as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. +Install shortcuts as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. .LP -.RE .LP \f2\-association\fP .LP -.RS 3 - .LP +Install associations as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. .LP -install associations as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used. -.LP -.RE -.RE -.SS -FILES -.LP -.RS 3 - +.SH "FILES" .LP .LP For information about the user and system cache and deployment.properties files, see .na \f2System\- and User\-Level Properties\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/properties.html. +http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/properties.html. .LP -.RE -.SS -MORE INFORMATION -.LP -.RS 3 - +.SH "MORE INFORMATION" .LP .LP For more information about Java Web Start, see .na \f2Java Web Start\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/javaws/index.html. -.LP -.RS 3 - -.LP -.LP -\ +http://download.oracle.com/javase/7/docs/technotes/guides/javaws/index.html. .LP -.RE -.RE diff --git a/src/solaris/doc/sun/man/man1/jconsole.1 b/src/solaris/doc/sun/man/man1/jconsole.1 index aafa16475f9a6f1cf20e639279896f6a2f9f5a49..14d87bb83c5963d2ec0811670702a9f920583aa4 100644 --- a/src/solaris/doc/sun/man/man1/jconsole.1 +++ b/src/solaris/doc/sun/man/man1/jconsole.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jconsole 1 "02 Jun 2010" +.TH jconsole 1 "10 May 2011" .LP .SH "Name" jconsole \- Java Monitoring and Management Console .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,41 +38,40 @@ jconsole \- Java Monitoring and Management Console .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 options Options, if used, should follow immediately after the command name. -.br .TP 3 connection = pid | host:port | jmxUrl .RS 3 -\f2pid\fP\ \ \ Process ID of a local Java VM. The Java VM must be running with the same user ID as the user ID running jconsole. See +.TP 2 +o +\f2pid\fP Process ID of a local Java VM. The Java VM must be running with the same user ID as the user ID running jconsole. See .na \f2JMX Monitoring and Management\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html for details. -.br -\f2host\fP:\f2port\fP\ \ Name of the host system on which the Java VM is running and the port number specified by the system property \f2com.sun.management.jmxremote.port\fP when the Java VM was started. See +http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details. +.TP 2 +o +\f2host\fP:\f2port\fP Name of the host system on which the Java VM is running and the port number specified by the system property \f2com.sun.management.jmxremote.port\fP when the Java VM was started. See .na \f2JMX Monitoring and Management\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html for details. -.br -\f2jmxUrl\fP\ \ Address of the JMX agent to be connected to as described in +http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details. +.TP 2 +o +\f2jmxUrl\fP Address of the JMX agent to be connected to as described in .na \f2JMXServiceURL\fP @ .fi -http://java.sun.com/javase/6/docs/api/javax/management/remote/JMXServiceURL.html. +http://download.oracle.com/javase/7/docs/api/javax/management/remote/JMXServiceURL.html. .RE .RE .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jconsole\fP command launches a graphical console tool that enables you to monitor and manage Java applications and virtual machines on a local or remote machine. @@ -83,18 +80,16 @@ The \f3jconsole\fP command launches a graphical console tool that enables you to On Windows, \f3jconsole\fP does not associate with a console window. It will, however, display a dialog box with error information if the \f3jconsole\fP command fails for some reason. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 \-interval=n Set the update interval to \f2n\fP seconds (default is 4 seconds). .TP 3 -\-notile\ +\-notile Do not tile windows initially (for two or more connections). .TP 3 -\-pluginpath\ plugins +\-pluginpath plugins Specify a list of directories or JAR files which are searched for JConsole plugins. The \f2plugins\fP path should contain a provider\-configuration file named: .br .nf @@ -104,20 +99,19 @@ Specify a list of directories or JAR files which are searched for JConsole plugi .fl \fP .fi -.LP containing one line for each plugin specifying the fully qualified class name of the class implementing the .na \f2com.sun.tools.jconsole.JConsolePlugin\fP @ .fi -http://java.sun.com/javase/6/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/JConsolePlugin.html class. +http://download.oracle.com/javase/7/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/JConsolePlugin.html class. .TP 3 -\-version\ +\-version Output version information and exit. .TP 3 -\-help\ +\-help Output help message and exit. .TP 3 -\-J<flag>\ +\-J<flag> Pass <flag> to the Java virtual machine on which jconsole is run. .RE @@ -130,13 +124,13 @@ o .na \f2Using JConsole\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html +http://download.oracle.com/javase/7/docs/technotes/guides/management/jconsole.html .TP 2 o .na \f2Monitoring and Management for Java Platform\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/management/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/management/index.html .RE .LP diff --git a/src/solaris/doc/sun/man/man1/jdb.1 b/src/solaris/doc/sun/man/man1/jdb.1 index 6e0b94394b15fa604915cf5266a35e6b95bcdba6..e89a60b9748a36e16edd54d4f38e0ec7d32b50f1 100644 --- a/src/solaris/doc/sun/man/man1/jdb.1 +++ b/src/solaris/doc/sun/man/man1/jdb.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1995, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jdb 1 "02 Jun 2010" +.TH jdb 1 "10 May 2011" .LP .SH "Name" jdb \- The Java Debugger -.LP -.RS 3 - .LP .LP \f3jdb\fP helps you find and fix bugs in Java language programs. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -43,9 +37,6 @@ jdb \- The Java Debugger .fl .fi -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -60,23 +51,17 @@ Arguments passed to the \f2main()\fP method of \f2class\fP. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The Java Debugger, \f3jdb\fP, is a simple command\-line debugger for Java classes. It is a demonstration of the .na \f2Java Platform Debugger Architecture\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jpda/index.html that provides inspection and debugging of a local or remote Java Virtual Machine. +http://download.oracle.com/javase/7/docs/technotes/guides/jpda/index.html that provides inspection and debugging of a local or remote Java Virtual Machine. .LP .SS Starting a jdb Session -.LP -.RS 3 - .LP .LP There are many ways to start a jdb session. The most frequently used way is to have \f3jdb\fP launch a new Java Virtual Machine (VM) with the main class of the application to be debugged. This is done by substituting the command \f3jdb\fP for \f3java\fP in the command line. For example, if your application's main class is MyClass, you use the following command to debug it under JDB: @@ -137,7 +122,7 @@ There are many other ways to connect the debugger to a VM, and all of them are s .na \f2documentation\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.html on these connection options. For information on starting a J2SE 1.4.2 or early VM for use with \f3jdb\fP see the +http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection options. For information on starting a J2SE 1.4.2 or early VM for use with \f3jdb\fP see the .na \f21.4.2 documentation\fP @ .fi @@ -148,9 +133,6 @@ Basic jdb Commands .LP .LP The following is a list of the basic \f3jdb\fP commands. The Java debugger supports other commands which you can list using \f3jdb\fP's \f2help\fP command. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -164,10 +146,12 @@ cont Continues execution of the debugged application after a breakpoint, exception, or step. .TP 3 print -Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the \f2dump\fP command below for getting more information about an object. -.LP -\f2NOTE: To display local variables, the containing class must have been compiled with the \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP option. -.LP +Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the \f2dump\fP command below for getting more information about an object. +.br +.br +\f2NOTE: To display local variables, the containing class must have been compiled with the \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP option. +.br +.br \f2print\fP supports many simple Java expressions including those with method invocations, for example: .RS 3 .TP 2 @@ -188,15 +172,13 @@ o .RE .TP 3 dump -For primitive values, this command is identical to \f2print\fP. For objects, it prints the current value of each field defined in the object. Static and instance fields are included. -.LP -The \f2dump\fP command supports the same set of expressions as the \f2print\fP command. +For primitive values, this command is identical to \f2print\fP. For objects, it prints the current value of each field defined in the object. Static and instance fields are included. +.br +.br +The \f2dump\fP command supports the same set of expressions as the \f2print\fP command. .TP 3 threads List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example: -.RS 3 - -.LP .nf \f3 .fl @@ -204,25 +186,21 @@ List the threads that are currently running. For each thread, its name and curre .fl \fP .fi -.RE In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is "main", and it is currently running, .TP 3 thread Select a thread to be the current thread. Many \f3jdb\fP commands are based on the setting of the current thread. The thread is specified with the thread index described in the \f2threads\fP command above. .TP 3 where -\f2where\fP with no arguments dumps the stack of the current thread. \f2where all\fP dumps the stack of all threads in the current thread group. \f2where\fP \f2threadindex\fP dumps the stack of the specified thread. -.LP -If the current thread is suspended (either through an event such as a breakpoint or through the \f2suspend\fP command), local variables and fields can be displayed with the \f2print\fP and \f2dump\fP commands. The \f2up\fP and \f2down\fP commands select which stack frame is current. +\f2where\fP with no arguments dumps the stack of the current thread. \f2where all\fP dumps the stack of all threads in the current thread group. \f2where\fP \f2threadindex\fP dumps the stack of the specified thread. +.br +.br +If the current thread is suspended (either through an event such as a breakpoint or through the \f2suspend\fP command), local variables and fields can be displayed with the \f2print\fP and \f2dump\fP commands. The \f2up\fP and \f2down\fP commands select which stack frame is current. .RE .LP -.RE .SS Breakpoints -.LP -.RS 3 - .LP .LP Breakpoints can be set in \f3jdb\fP at line numbers or at the first instruction of a method, for example: @@ -249,22 +227,14 @@ If a method is overloaded, you must also specify its argument types so that the .LP The \f2clear\fP command removes breakpoints using a syntax as in "\f2clear\ MyClass:45\fP". Using the \f2clear\fP or command with no argument displays a list of all breakpoints currently set. The \f2cont\fP command continues execution. .LP -.RE .SS Stepping -.LP -.RS 3 - .LP .LP The \f2step\fP commands advances execution to the next line whether it is in the current stack frame or a called method. The \f2next\fP command advances execution to the next line in the current stack frame. .LP -.RE .SS Exceptions -.LP -.RS 3 - .LP .LP When an exception occurs for which there isn't a catch statement anywhere in the throwing thread's call stack, the VM normally prints an exception trace and exits. When running under \f3jdb\fP, however, control returns to \f3jdb\fP at the offending throw. You can then use \f3jdb\fP to diagnose the cause of the exception. @@ -278,11 +248,7 @@ The \f2ignore\fP command negates the effect of a previous \f2catch\fP command. .LP \f2NOTE: The \fP\f2ignore\fP command does not cause the debugged VM to ignore specific exceptions, only the debugger. .LP -.RE -.RE .SH "Command Line Options" -.LP - .LP .LP When you use \f3jdb\fP in place of the Java application launcher on the command line, \f3jdb\fP accepts many of the same options as the java command, including \f2\-D\fP, \f2\-classpath\fP, and \f2\-X<option>\fP. @@ -335,7 +301,7 @@ Other options are supported for alternate mechanisms for connecting the debugger .na \f2documentation\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.html on these connection alternatives. +http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection alternatives. .LP .SS Options Forwarded to Debuggee Process @@ -357,8 +323,6 @@ Non\-standard target VM option .LP .SH "SEE ALSO" -.LP - .LP .LP javac(1), java(1), javah(1), javap(1), javadoc(1). diff --git a/src/solaris/doc/sun/man/man1/jhat.1 b/src/solaris/doc/sun/man/man1/jhat.1 index b7412b5ef3d2abe0d99e01379ac445f4f7f4406d..62c72f6852174963f17892e70afa01c3b41c8776 100644 --- a/src/solaris/doc/sun/man/man1/jhat.1 +++ b/src/solaris/doc/sun/man/man1/jhat.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2006, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jhat 1 "02 Jun 2010" +.TH jhat 1 "10 May 2011" .LP .SH "Name" jhat \- Java Heap Analysis Tool .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,18 +38,18 @@ jhat \- Java Heap Analysis Tool .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 options Options, if used, should follow immediately after the command name. -.br .TP 3 heap\-dump\-file Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you may specify which dump in the file by appending "#<number> to the file name, i.e. "foo.hprof#3". -.SH "DESCRIPTION" +.RE + +.LP +.SH "DESCRIPTION" .LP .LP The \f3jhat\fP command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre\-designed queries (such as 'show all instances of a known class "Foo"') as well as \f3OQL\fP (\f3O\fPbject \f3Q\fPuery \f3L\fPanguage) \- a SQL\-like query language to query heap dumps. Help on OQL is available from the OQL help page shown by jhat. With the default port, OQL help is available at http://localhost:7000/oqlhelp/ @@ -69,7 +67,7 @@ Use jconsole(1) option to obtain a heap dump via .na \f2HotSpotDiagnosticMXBean\fP @ .fi -http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime; +http://download.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime; .TP 2 o Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option; @@ -86,7 +84,8 @@ http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. .LP \f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK. .LP -.SH "OPTIONS" +.SH "OPTIONS" +.LP .RS 3 .TP 3 \-stack false/true @@ -107,21 +106,22 @@ Specify a baseline heap dump. Objects in both heap dumps with the same object ID \-debug int Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes. .TP 3 -\-version\ +\-version Report version number and exit. .TP 3 -\-h\ +\-h Output help message and exit. .TP 3 -\-help\ +\-help Output help message and exit. .TP 3 -\-J<flag>\ +\-J<flag> Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB. .RE .LP -.SH "SEE ALSO" +.SH "SEE ALSO" +.LP .RS 3 .TP 2 o @@ -136,5 +136,6 @@ o .fi http://java.sun.com/developer/technicalArticles/Programming/HPROF.html .RE -.RE + +.LP diff --git a/src/solaris/doc/sun/man/man1/jinfo.1 b/src/solaris/doc/sun/man/man1/jinfo.1 index 04133792f136dc6342e77412aebb192d8cb13629..ea072ffce646fa05067a58d01819cf31f4fb48c6 100644 --- a/src/solaris/doc/sun/man/man1/jinfo.1 +++ b/src/solaris/doc/sun/man/man1/jinfo.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jinfo 1 "02 Jun 2010" +.TH jinfo 1 "10 May 2011" .LP .SH "Name" jinfo \- Configuration Info .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -42,55 +40,56 @@ jinfo \- Configuration Info .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 option Options are mutually exclusive. Option, if used, should follow immediately after the command name. +.RE + +.LP .RS 3 .TP 3 pid process id for which the configuration info is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. .RE + +.LP .RS 3 .TP 3 executable Java executable from which the core dump was produced. .RE + +.LP .RS 3 .TP 3 core core file for which the configuration info is to be printed. .RE + +.LP .RS 3 .TP 3 remote\-hostname\-or\-IP remote debug server's (see jsadebugd(1)) hostname or IP address. .RE + +.LP .RS 3 .TP 3 server\-id optional unique id, if multiple debug servers are running on the same remote host. .RE -.RE .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jinfo\fP prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: .br - -.LP -.RS 3 - -.LP jinfo \-J\-d64 \-sysprops pid -.RE +.LP .LP \f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' need to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP .LP @@ -98,8 +97,6 @@ jinfo \-J\-d64 \-sysprops pid \f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 diff --git a/src/solaris/doc/sun/man/man1/jmap.1 b/src/solaris/doc/sun/man/man1/jmap.1 index 6e2469e9faa27707a8aa2563d0526650ee8cf1b0..f906dedc68128197026389b11c91229afedb2a89 100644 --- a/src/solaris/doc/sun/man/man1/jmap.1 +++ b/src/solaris/doc/sun/man/man1/jmap.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jmap 1 "02 Jun 2010" +.TH jmap 1 "10 May 2011" .LP .SH "Name" jmap \- Memory Map .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -42,8 +40,6 @@ jmap \- Memory Map .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -73,14 +69,9 @@ optional unique id, if multiple debug servers are running on the same remote hos .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jmap\fP prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: -.LP -.RS 3 - .LP .nf \f3 @@ -89,10 +80,11 @@ jmap \-J\-d64 \-heap pid .fl \fP .fi -.RE .LP -\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP +.LP +\f3NOTE: This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP +.LP .LP \f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP @@ -100,13 +92,11 @@ jmap \-J\-d64 \-heap pid .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 <no option> -When no option is used \f3jmap\fP prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility. +When no option is used jmap prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility. .br .TP 3 \-dump:[live,]format=b,file=<filename> diff --git a/src/solaris/doc/sun/man/man1/jps.1 b/src/solaris/doc/sun/man/man1/jps.1 index 94af0960db97f241ef0718253573a14ed8c0a75e..1ec15e124ea86ff533044ecd3e50bb7d90544540 100644 --- a/src/solaris/doc/sun/man/man1/jps.1 +++ b/src/solaris/doc/sun/man/man1/jps.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jps 1 "02 Jun 2010" +.TH jps 1 "10 May 2011" .LP .SH "Name" jps \- Java Virtual Machine Process Status Tool .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,8 +38,6 @@ jps \- Java Virtual Machine Process Status Tool .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -54,8 +50,6 @@ The host identifier of the host for which the process report should be generated .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jps\fP tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions. @@ -76,8 +70,6 @@ The list of JVMs produced by the \f3jps\fP command may be limited by the permiss \f3NOTE:\fP This utility is unsupported and may not be available in future versions of the JDK. It is not currently available on Windows 98 and Windows ME platforms. .LP .SH "OPTIONS" -.LP - .LP .LP The \f3jps\fP command supports a number of options that modify the output of the command. These options are subject to change or removal in the future. @@ -106,9 +98,6 @@ Pass \f2option\fP to the \f3java\fP launcher called by \f3jps\fP. For example, \ .LP .SS HOST IDENTIFIER -.LP -.RS 3 - .LP .LP The host identifier, or \f2hostid\fP is a string that indicates the target system. The syntax of the \f2hostid\fP string largely corresponds to the syntax of a URI: @@ -140,10 +129,7 @@ The treatment of this parameter depends on the implementation. For the optimized .RE .LP -.RE .SH "OUTPUT FORMAT" -.LP - .LP .LP The output of the \f3jps\fP command follows the following pattern: @@ -168,8 +154,6 @@ Where all output tokens are separated by white space. An \f2arg\fP that includes .LP .SH "EXAMPLES" -.LP - .LP .LP This section provides examples of the \f3jps\fP command. diff --git a/src/solaris/doc/sun/man/man1/jrunscript.1 b/src/solaris/doc/sun/man/man1/jrunscript.1 index 2fdbb9db5ddfd4378ea0011a916b74d0e91e4b04..7c6548fa794bb4a143ef6e44b07a0c20ef852244 100644 --- a/src/solaris/doc/sun/man/man1/jrunscript.1 +++ b/src/solaris/doc/sun/man/man1/jrunscript.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2006, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jrunscript 1 "02 Jun 2010" +.TH jrunscript 1 "10 May 2011" .LP .SH "Name" jrunscript \- command line script shell .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -38,8 +36,6 @@ jrunscript \- command line script shell .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -52,8 +48,6 @@ Arguments, if used, should follow immediately after options or command name. .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jrunscript\fP is a command line script shell. jrunscript supports both an interactive (read\-eval\-print) mode and a batch (\-f option) mode of script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the \-l option can be used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming" style. @@ -62,8 +56,6 @@ Arguments, if used, should follow immediately after options or command name. \f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -112,10 +104,8 @@ If [arguments...] are present and if no \f3\-e\fP or \f3\-f\fP option is used, t .LP .SH "EXAMPLES" .LP -\f3Executing inline scripts\fP -.LP -.RS 3 - +.SS +Executing inline scripts .LP .nf \f3 @@ -126,13 +116,10 @@ jrunscript \-e "cat('http://java.sun.com')" .fl \fP .fi -.RE .LP -\f3Use specified language and evaluate given script file\fP -.LP -.RS 3 - +.SS +Use specified language and evaluate given script file .LP .nf \f3 @@ -141,42 +128,42 @@ jrunscript \-l js \-f test.js .fl \fP .fi -.RE .LP -\f3Interactive mode\fP -.LP -.RS 3 - +.SS +Interactive mode .LP .nf \f3 .fl jrunscript .fl -js>print('hello world'); +js> print('Hello World\\n'); +.fl +Hello World +.fl +js> 34 + 55 +.fl +89.0 .fl -hello world +js> t = new java.lang.Thread(function() { print('Hello World\\n'); }) .fl -js>34 + 55 +Thread[Thread\-0,5,main] .fl -89 +js> t.start() .fl -js> thread(function() { print('hello world'); } +js> Hello World .fl -hello world + .fl js> .fl \fP .fi -.RE .LP -\f3Run script file with script arguments\fP -.LP -.RS 3 - +.SS +Run script file with script arguments .LP .nf \f3 @@ -185,13 +172,16 @@ jrunscript test.js arg1 arg2 arg3 .fl \fP .fi -.RE .LP test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "arguments" array. .SH "SEE ALSO" .LP .LP -If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in jsdocs. +If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in +.na +\f2jsdocs\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/tools/share/jsdocs/allclasses\-noframe.html. .LP diff --git a/src/solaris/doc/sun/man/man1/jsadebugd.1 b/src/solaris/doc/sun/man/man1/jsadebugd.1 index 8a94b110eb4a6277a09ecaf0813efbece441dc48..3d77b1d4113ab4b30014ed881399f4b3113cbf38 100644 --- a/src/solaris/doc/sun/man/man1/jsadebugd.1 +++ b/src/solaris/doc/sun/man/man1/jsadebugd.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jsadebugd 1 "02 Jun 2010" +.TH jsadebugd 1 "10 May 2011" .LP .SH "Name" jsadebugd \- Serviceability Agent Debug Daemon .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -40,36 +38,17 @@ jsadebugd \- Serviceability Agent Debug Daemon .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 pid process id of the process to which the debug server should attach. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. At most one instance of the debug server may be attached to a single process. -.RE - -.LP -.RS 3 .TP 3 executable -.RE - -.LP -.RS 3 -.TP 3 Java executable from which the core dump was produced -.RE - -.LP -.RS 3 .TP 3 core Core file to which the debug server should attach. -.RE - -.LP -.RS 3 .TP 3 server\-id Optional unique id, needed if multiple debug servers are started on the same machine. This ID must be used by remote clients to identify the particular debug server to attach. Within a single machine, this ID must be unique. @@ -77,18 +56,13 @@ Optional unique id, needed if multiple debug servers are started on the same mac .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jsadebugd\fP attaches to a Java process or core file and acts as a debug server. Remote clients such as jstack(1), jmap(1), and jinfo(1) can attach to the server using Java Remote Method Invocation (RMI). Before starting \f2jsadebugd\fP, .na \f2rmiregistry\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi must be started with: -.LP -.RS 3 - +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi must be started with: .LP .nf \f3 @@ -97,17 +71,16 @@ http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi must be started .fl \fP .fi -.RE .LP .LP where \f2$JAVA_HOME\fP is the JDK installation directory. If rmiregistry was not started, jsadebugd will start an rmiregistry in a standard (1099) port internally. Debug server may be stopped by sending SIGINT (pressing Ctrl\-C) to it. .LP .LP -\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP +\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced. .LP .LP -\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP +For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "SEE ALSO" .LP @@ -129,7 +102,7 @@ o .na \f2rmiregistry\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi .RE .LP diff --git a/src/solaris/doc/sun/man/man1/jstack.1 b/src/solaris/doc/sun/man/man1/jstack.1 index 34fdded3baf0662df9323cc3341419d95096c9e4..e70b10ed5e713ba41016cf6fdc910a2efadd4021 100644 --- a/src/solaris/doc/sun/man/man1/jstack.1 +++ b/src/solaris/doc/sun/man/man1/jstack.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jstack 1 "02 Jun 2010" +.TH jstack 1 "10 May 2011" .LP .SH "Name" @@ -28,8 +28,6 @@ jstack \- Stack Trace .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -44,8 +42,6 @@ jstack \- Stack Trace .LP .SH "PARAMETERS" -.LP - .LP .LP Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS. @@ -77,16 +73,11 @@ optional unique id, if multiple debug servers are running on the same remote hos .LP .SH "DESCRIPTION" -.LP - .LP .LP \f3jstack\fP prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, 'bci' (byte code index) and line number, if available, are printed. With the \-m option, jstack prints both Java and native frames of all threads along with the 'pc' (program counter). For each native frame, the closest native symbol to 'pc', if available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command may be piped to \f3c++filt\fP. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: .br -.LP -.RS 3 - .LP .nf \f3 @@ -95,7 +86,6 @@ jstack \-J\-d64 \-m pid .fl \fP .fi -.RE .LP .LP @@ -105,8 +95,6 @@ jstack \-J\-d64 \-m pid For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -118,7 +106,7 @@ Long listing. Prints additional information about locks such as list of owned ja .na \f2ownable synchronizers\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. +http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. .TP 3 \-m prints mixed mode (both Java and native C/C++ frames) stack trace. @@ -153,8 +141,6 @@ jsadebugd(1) .LP .SH "KNOWN BUGS" -.LP - .LP .LP Mixed mode stack trace, the \-m option, does not work with the remote debug server. diff --git a/src/solaris/doc/sun/man/man1/jstat.1 b/src/solaris/doc/sun/man/man1/jstat.1 index 1ecee640ac4850df63d449fb940ccc26439c79e9..d874d440d135b017a494f30fbd0c4c68979c7d80 100644 --- a/src/solaris/doc/sun/man/man1/jstat.1 +++ b/src/solaris/doc/sun/man/man1/jstat.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jstat 1 "02 Jun 2010" +.TH jstat 1 "10 May 2011" .LP .SH "Name" jstat \- Java Virtual Machine Statistics Monitoring Tool .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -38,8 +36,6 @@ jstat \- Java Virtual Machine Statistics Monitoring Tool .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -60,16 +56,14 @@ Virtual machine identifier, a string indicating the target Java virtual machine The syntax of the vmid string largely corresponds to the syntax of a URI. The \f2vmid\fP can vary from a simple integer representing a local JVM to a more complex construction specifying a communications protocol, port number, and other implementation\-specific values. See Virtual Machine Identifier for details. .TP 3 interval[s|ms] -Sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds.\ Must be a positive integer.\ If specified, \f3jstat\fP will produce its output at each interval. +Sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds. Must be a positive integer. If specified, \f3jstat\fP will produce its output at each interval. .TP 3 count -Number of samples to display. Default value is infinity; that is, \f3jstat\fP displays statistics until the target JVM terminates or the \f3jstat\fP command is terminated.\ Must be a positive integer. +Number of samples to display. Default value is infinity; that is, \f3jstat\fP displays statistics until the target JVM terminates or the \f3jstat\fP command is terminated. Must be a positive integer. .RE .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jstat\fP tool displays performance statistics for an instrumented HotSpot Java virtual machine (JVM). The target JVM is identified by its virtual machine identifier, or \f2vmid\fP option described below. @@ -81,9 +75,6 @@ The \f3jstat\fP tool displays performance statistics for an instrumented HotSpot .LP .SS VIRTUAL MACHINE IDENTIFIER -.LP -.RS 3 - .LP .LP The syntax of the \f2vmid\fP string largely corresponds to the syntax of a URI: @@ -115,10 +106,7 @@ The treatment of this parameter depends on implementation. For the optimized loc .RE .LP -.RE .SH "OPTIONS" -.LP - .LP .LP The \f3jstat\fP command supports two types of options, general options and output options. General options cause \f3jstat\fP to display simple usage and version information. Output options determine the content and format of the statistical output. @@ -149,15 +137,12 @@ Display list of statistics options. See the Output Options section below. .LP .SS OUTPUT OPTIONS -.LP -.RS 3 - .LP .LP -If you do not specify a general option, then you can specify output options. Output options determine the content and format of \f3jstat\fP's output, and consist of a single \f2statOption\fP, plus any of the other output options (\-h, \-t, and \-J).\ The \f2statOption\fP must come first. +If you do not specify a general option, then you can specify output options. Output options determine the content and format of \f3jstat\fP's output, and consist of a single \f2statOption\fP, plus any of the other output options (\-h, \-t, and \-J). The \f2statOption\fP must come first. .LP .LP -Output is formatted as a table, with columns are separated by spaces. A header row with titles describes the columns.\ Use the \f3\-h\fP option to set the frequency at which the header is displayed.\ Column header names are generally consistent between the different options. In general, if two options provide a column with the same name, then the data source for the two columns are the same. +Output is formatted as a table, with columns are separated by spaces. A header row with titles describes the columns. Use the \f3\-h\fP option to set the frequency at which the header is displayed. Column header names are generally consistent between the different options. In general, if two options provide a column with the same name, then the data source for the two columns are the same. .LP .LP Use the \f3\-t\fP option to display a time stamp column, labeled \f2Timestamp\fP as the first column of output. The \f2Timestamp\fP column contains the elapsed time, in seconds, since startup of the target JVM. The resolution of the time stamp is dependent on various factors and is subject to variation due to delayed thread scheduling on heavily loaded systems. @@ -171,7 +156,7 @@ Use the \f2interval\fP and \f2count\fP parameters to determine how frequently an .RS 3 .TP 3 \-statOption -Determines the statistics information that \f3jstat\fP displays. The following table lists the available options.\ Use the \f3\-options\fP general option to display the list of options for a particular platform installation. +Determines the statistics information that \f3jstat\fP displays. The following table lists the available options. Use the \f3\-options\fP general option to display the list of options for a particular platform installation. .br .br .LP @@ -457,7 +442,7 @@ HotSpot compilation method statistics. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 230 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 215 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -697,12 +682,8 @@ Pass \f2javaOption\fP to the \f3java\fP application launcher. For example, \f3\- .RE .LP -.RE .SS STATOPTIONS AND OUTPUT -.LP -.RS 3 - .LP .LP The following tables summarize the columns that \f3jstat\fP outputs for each \f2statOption\fP. @@ -825,7 +806,7 @@ Time spent performing class load and unload operations. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 280 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 261 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1082,7 +1063,7 @@ Class name and method for the last failed compilation. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 316 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 297 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -1546,7 +1527,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 386 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 367 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2170,7 +2151,7 @@ Number of Young generation GC Events. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 460 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 441 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2550,7 +2531,7 @@ Cause of current Garbage Collection. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 483 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 464 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -2866,7 +2847,7 @@ Young generation garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 537 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 518 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3094,15 +3075,14 @@ Young generation garbage collection time. .rm 80 81 .nr 34 \n(.lu .eo -.am 80 +.am 81 .br .di a+ .35 .ft \n(.f .ll \n(34u*1u/3u -.if \n(.l<\n(80 .ll \n(80u +.if \n(.l<\n(81 .ll \n(81u .in 0 -NGCMN\ \ \ \ \ \ \ \ \ T}~T{ Minimum new generation capacity (KB). .br .di @@ -3262,9 +3242,11 @@ Number of young generation GC events. .if \n(80<\n(38 .nr 80 \n(38 .nr 38 \w\f3Column\fP .if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \wNGCMX \ \ \ +.nr 38 \wNGCMN +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \wNGCMX .if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \wNGC \ \ \ +.nr 38 \wNGC .if \n(80<\n(38 .nr 80 \n(38 .nr 38 \wS0CMX .if \n(80<\n(38 .nr 80 \n(38 @@ -3284,8 +3266,6 @@ Number of young generation GC events. .if \n(80<\n(38 .nr 80 \n(38 .80 .rm 80 -.nr 38 \n(a- -.if \n(80<\n(38 .nr 80 \n(38 .nr 81 0 .nr 38 \w\f3Description\fP .if \n(81<\n(38 .nr 81 \n(38 @@ -3293,6 +3273,8 @@ Number of young generation GC events. .if \n(81<\n(38 .nr 81 \n(38 .81 .rm 81 +.nr 38 \n(a- +.if \n(81<\n(38 .nr 81 \n(38 .nr 38 \n(b- .if \n(81<\n(38 .nr 81 \n(38 .nr 38 \n(c- @@ -3321,7 +3303,7 @@ Number of young generation GC events. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 593 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 572 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -3348,11 +3330,11 @@ Number of young generation GC events. .ta \n(80u \n(81u .nr 31 \n(.f .nr 35 1m -\&\h'|\n(40u'\h'|\n(41u' +\&\h'|\n(40u'NGCMN\h'|\n(41u' .mk ## .nr 31 \n(## .sp |\n(##u-1v -.nr 37 \n(40u +.nr 37 \n(41u .in +\n(37u .a+ .in -\n(37u @@ -3364,7 +3346,7 @@ Number of young generation GC events. .ta \n(80u \n(81u .nr 31 \n(.f .nr 35 1m -\&\h'|\n(40u'NGCMX \ \ \\h'|\n(41u' +\&\h'|\n(40u'NGCMX\h'|\n(41u' .mk ## .nr 31 \n(## .sp |\n(##u-1v @@ -3380,7 +3362,7 @@ Number of young generation GC events. .ta \n(80u \n(81u .nr 31 \n(.f .nr 35 1m -\&\h'|\n(40u'NGC \ \ \\h'|\n(41u' +\&\h'|\n(40u'NGC\h'|\n(41u' .mk ## .nr 31 \n(## .sp |\n(##u-1v @@ -3522,7 +3504,7 @@ Number of young generation GC events. .rm i+ .rm j+ .TE -.if \n-(b.=0 .nr c. \n(.c-\n(d.-49 +.if \n-(b.=0 .nr c. \n(.c-\n(d.-47 .LP .SS @@ -3717,7 +3699,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 635 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 614 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -4062,7 +4044,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 677 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 656 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -4407,7 +4389,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 719 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 698 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -4792,7 +4774,7 @@ Total garbage collection time. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 769 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 748 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -5091,7 +5073,7 @@ Class name and method name identifying the compiled method. Class name uses "/" .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 795 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 774 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -5176,10 +5158,7 @@ Class name and method name identifying the compiled method. Class name uses "/" .if \n-(b.=0 .nr c. \n(.c-\n(d.-19 .LP -.SS - -.LP -.SH "" +.SH "EXAMPLES" .LP .LP This section presents some examples of monitoring a local JVM with a \f2lvmid\fP of 21891. @@ -5355,7 +5334,6 @@ This example attaches to \f2lvmid\fP 40496 on the system named \f2remote.domain\ .LP The \f2lvmid\fP is combined with the name of the remote host to construct a \f2vmid\fP of \f240496@remote.domain\fP. This \f2vmid\fP results in the use of the \f3rmi\fP protocol to communicate to the default \f3jstatd\fP server on the remote host. The \f3jstatd\fP server is located using the \f3rmiregistry\fP on \f2remote.domain\fP that is bound to the default \f3rmiregistry\fP port (port 1099). .LP -.RE .SH "SEE ALSO" .LP .RS 3 diff --git a/src/solaris/doc/sun/man/man1/jstatd.1 b/src/solaris/doc/sun/man/man1/jstatd.1 index 79b8b392fd6f2a19c8f79b3112b94f15fe234f88..fd9b0f7b1e2d7dd41a5389f1abfc2ef3a1a33896 100644 --- a/src/solaris/doc/sun/man/man1/jstatd.1 +++ b/src/solaris/doc/sun/man/man1/jstatd.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,15 +19,13 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH jstatd 1 "02 Jun 2010" +.TH jstatd 1 "10 May 2011" .LP .SH "Name" jstatd \- Virtual Machine jstat Daemon .LP .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -41,8 +39,6 @@ jstatd [ \fP\f4options\fP\f3 ]\fP .LP .SH "PARAMETERS" -.LP - .LP .RS 3 .TP 3 @@ -52,8 +48,6 @@ Command\-line options. The options may be in any order. If there are redundant o .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3jstatd\fP tool is an RMI server application that monitors for the creation and termination of instrumented HotSpot Java virtual machines (JVMs) and provides a interface to allow remote monitoring tools to attach to JVMs running on the local host. @@ -65,8 +59,6 @@ The \f3jstatd\fP server requires the presence of an RMI registry on the local ho \f3NOTE:\fP This utility is unsupported and may or may not be available in future versions of the JDK. It is not currently available on the Windows 98 and Windows ME platforms. .LP .SH "OPTIONS" -.LP - .LP .LP The \f3jstatd\fP command supports the following options: @@ -88,8 +80,6 @@ Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, .LP .SH "SECURITY" -.LP - .LP .LP The \f3jstatd\fP server can only monitor JVMs for which it has the appropriate native access permissions. Therefor the \f3jstatd\fP process must be running with the same user credentials as the target JVMs. Some user credentials, such as the \f2root\fP user in UNIX(TM) based systems, have permission to access the instrumentation exported by any JVM on the system. A \f3jstatd\fP process running with such credentials can monitor any JVM on the system, but introduces additional security concerns. @@ -102,7 +92,7 @@ The \f3jstatd\fP server installs an instance of RMISecurityPolicy if no other se .na \f2Policy File Syntax\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html. .LP .LP The following policy file will allow the \f3jstatd\fP server to run without any security exceptions. This policy is less liberal then granting all permissions to all codebases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fP server. @@ -144,15 +134,11 @@ jstatd \-J\-Djava.security.policy=jstatd.all.policy\fP For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP addreess spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fP server and use the \f3jstat\fP and \f3jps\fP tools locally. .LP .SH "REMOTE INTERFACE" -.LP - .LP .LP The interface exported by the \f3jstatd\fP process is proprietary and is guaranteed to change. Users and developers are discouraged from writing to this interface. .LP .SH "EXAMPLES" -.LP - .LP .LP Here are some examples of starting \f3jstatd\fP. Note that the \f3jstatd\fP scripts automatically start the server in the background. @@ -264,7 +250,7 @@ o .na \f2rmiregistry\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry .RE .LP diff --git a/src/solaris/doc/sun/man/man1/jvisualvm.1 b/src/solaris/doc/sun/man/man1/jvisualvm.1 new file mode 100644 index 0000000000000000000000000000000000000000..eae03edd804ae2f4a15be6d3758330e02cd45ff1 --- /dev/null +++ b/src/solaris/doc/sun/man/man1/jvisualvm.1 @@ -0,0 +1,104 @@ +." Copyright (c) 2008, 2011, 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 +." under the terms of the GNU General Public License version 2 only, as +." published by the Free Software Foundation. +." +." This code is distributed in the hope that it will be useful, but WITHOUT +." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +." version 2 for more details (a copy is included in the LICENSE file that +." accompanied this code). +." +." You should have received a copy of the GNU General Public License version +." 2 along with this work; if not, write to the Free Software Foundation, +." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +." +." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +." or visit www.oracle.com if you need additional information or have any +." questions. +." +.TH jvisualvm 1 "10 May 2011" + +.LP +.SH "Name" +\f2jvisualvm\fP \- Java Virtual Machine Monitoring, Troubleshooting, and Profiling Tool +.LP +.SH "SYNOPSIS" +.LP +.nf +\f3 +.fl + \fP\f3jvisualvm\fP [ \f2options\fP ] +.fl +.fi + +.LP +.SH "PARAMETERS" +.LP +.LP +Options, if used, should follow immediately after the command name. Options may be in any order. For a discussion of parameters that apply to a specific option, see OPTIONS below. +.LP +.SH "DESCRIPTION" +.LP +.LP +Java VisualVM is an intuitive graphical user interface that provides detailed information about Java technology\-based applications (Java applications) while they are running on a given Java Virtual Machine (JVM(*)). The name Java VisualVM comes from the fact that Java VisualVM provides information about the JVM software \f2visually\fP. +.LP +.LP +Java VisualVM combines several monitoring, troubleshooting, and profiling utilities into a single tool. For example, most of the functionality offered by the standalone tools \f2jmap\fP, \f2jinfo\fP, \f2jstat\fP and \f2jstack\fP have been integrated into Java VisualVM. Other functionalities, such as some of those offered by the JConsole tool, can be added as optional plug\-ins. +.LP +.SH "OPTIONS" +.LP +.LP +The following option is possible when you launch Java VisualVM. +.LP +.RS 3 +.TP 3 +\-J<jvm_option>\ +Pass this \f2<jvm_option>\fP to the JVM software. +.RE + +.LP +.SH "USAGE" +.LP +.LP +Java VisualVM is useful to Java application developers to troubleshoot applications and to monitor and improve the applications' performance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, perform and monitor garbage collection, and perform lightweight memory and CPU profiling. Plug\-ins also exist that expand the functionality of Java VisualVM. For example, most of the functionality of the JConsole tool is available via the MBeans Tab and JConsole Plug\-in Wrapper plug\-ins. You can choose from a catalog of standard Java VisualVM plug\-ins by selecting 'Tools' | 'Plugins' in the Java VisualVM menus. +.LP +.LP +Start Java VisualVM with the following command: +.LP +.nf +\f3 +.fl +% jvisualvm \fP\f4<options>\fP\f3 +.fl +\fP +.fi + +.LP +.SH "SEE ALSO" +.LP +.LP +For more details about Java VisualVM see the following pages. +.LP +.RS 3 +.TP 2 +o +.na +\f2Java VisualVM developers' site\fP @ +.fi +http://visualvm.java.net +.TP 2 +o +.na +\f2Java VisualVM in Java SE platform documentation\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/visualvm/index.html +.RE + +.LP +.LP +\f2(* The terms "Java Virtual Machine" and "JVM" mean a Virtual Machine for the Java platform.)\fP +.LP + diff --git a/src/solaris/doc/sun/man/man1/keytool.1 b/src/solaris/doc/sun/man/man1/keytool.1 index 1b1cd8b0bc7b8fb62ae7bb48c6f4f363e09f5b03..13ede598e5a380d14c39ed16fe55eaa482a14a48 100644 --- a/src/solaris/doc/sun/man/man1/keytool.1 +++ b/src/solaris/doc/sun/man/man1/keytool.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998-2011 keytool tool, 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,20 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH keytool 1 "02 Jun 2010" +.TH keytool 1 "10 May 2011" .LP .SH "Name" keytool \- Key and Certificate Management Tool .LP -.RS 3 - .LP Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates. -.RE -.SH "SYNOPSIS" .LP - +.SH "SYNOPSIS" .LP .nf \f3 @@ -46,8 +42,6 @@ Manages a keystore (database) of cryptographic keys, X.509 certificate chains, a The keytool command interface has changed in Java SE 6. See the Changes Section for a detailed description. Note that previously defined commands are still supported. .LP .SH "DESCRIPTION" -.LP - .LP \f3keytool\fP is a key and certificate management utility. It allows users to administer their own public/private key pairs and associated certificates for use in self\-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. It also allows users to cache the public keys (in the form of certificates) of their communicating peers. .LP @@ -57,14 +51,12 @@ A \f2certificate\fP is a digitally signed statement from one entity (person, com \f3keytool\fP also enables users to administer secret keys used in symmetric encryption/decryption (e.g. DES). .LP .LP -\f3keytool\fP stores the keys and certificates in a \f2keystore\fP. +\f3keytool\fP stores the keys and certificates in a \f2keystore\fP. .LP .SH "COMMAND AND OPTION NOTES" -.LP - .LP .LP -The various commands and their options are listed and described below . Note: +The various commands and their options are listed and described below. Note: .LP .RS 3 .TP 2 @@ -114,6 +106,7 @@ The \f2\-help\fP command is the default. Thus, the command line .fl \fP .fi +.LP is equivalent to .nf \f3 @@ -128,10 +121,9 @@ is equivalent to .SS Option Defaults .LP -.RS 3 - .LP -Below are the defaults for various option values. +Below are the defaults for various option values. +.LP .nf \f3 .fl @@ -152,12 +144,16 @@ Below are the defaults for various option values. 2048 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "RSA") .fl 1024 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "DSA") +.fl + 256 (when using \fP\f3\-genkeypair\fP\f3 and \-keyalg is "EC") .fl 56 (when using \fP\f3\-genseckey\fP\f3 and \-keyalg is "DES") .fl 168 (when using \fP\f3\-genseckey\fP\f3 and \-keyalg is "DESede") .fl +.fl + .fl \-validity 90 .fl @@ -169,7 +165,7 @@ Below are the defaults for various option values. .fl \-storetype the value of the "keystore.type" property in the security properties file, .fl - which is returned by the static \fP\f4getDefaultType\fP\f3 method in + which is returned by the static \fP\f4getDefaultType\fP\f3 method in .fl \fP\f4java.security.KeyStore\fP\f3 .fl @@ -180,26 +176,40 @@ Below are the defaults for various option values. .fl \-protected false -.fl - .fl \fP .fi .LP -In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA", and if the underlying private key is of type "RSA", \f2\-sigalg\fP defaults to "SHA256withRSA". Please consult the +.LP +In generating a public/private key pair, the signature algorithm (\f2\-sigalg\fP option) is derived from the algorithm of the underlying private key: +.LP +.RS 3 +.TP 2 +o +If the underlying private key is of type "DSA", the \f2\-sigalg\fP option defaults to "SHA1withDSA" +.TP 2 +o +If the underlying private key is of type "RSA", the \f2\-sigalg\fP option defaults to "SHA256withRSA". +.TP 2 +o +If the underlying private key is of type "EC", the \f2\-sigalg\fP option defaults to "SHA256withECDSA". +.RE + +.LP +.LP +Please consult the .na \f2Java Cryptography Architecture API Specification & Reference\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA for a full list of \f2\-keyalg\fP and \f2\-sigalg\fP you can choose from. -.RE +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA for a full list of \f2\-keyalg\fP and \f2\-sigalg\fP you can choose from. +.LP .SS Common Options .LP -.RS 3 - .LP -The \f2\-v\fP option can appear for all commands except \f2\-help\fP. If it appears, it signifies "verbose" mode; more information will be provided in the output. +The \f2\-v\fP option can appear for all commands except \f2\-help\fP. If it appears, it signifies "verbose" mode; more information will be provided in the output. +.LP .LP There is also a \f2\-J\fP\f2javaoption\fP option that may appear for any command. If it appears, the specified \f2javaoption\fP string is passed through directly to the Java interpreter. This option should not contain any spaces. It is useful for adjusting the execution environment or memory usage. For a list of possible interpreter options, type \f2java \-h\fP or \f2java \-X\fP at the command line. .LP @@ -209,39 +219,59 @@ These options may appear for all commands operating on a keystore: .RS 3 .TP 3 \-storetype storetype -This qualifier specifies the type of keystore to be instantiated. +.LP +This qualifier specifies the type of keystore to be instantiated. .TP 3 \-keystore keystore +.LP The keystore location. .LP If the JKS storetype is used and a keystore file does not yet exist, then certain \f3keytool\fP commands may result in a new keystore file being created. For example, if \f2keytool \-genkeypair\fP is invoked and the \f2\-keystore\fP option is not specified, the default keystore file named \f2.keystore\fP in the user's home directory will be created if it does not already exist. Similarly, if the \f2\-keystore \fP\f2ks_file\fP option is specified but \f2ks_file\fP does not exist, then it will be created .LP Note that the input stream from the \f2\-keystore\fP option is passed to the \f2KeyStore.load\fP method. If \f2NONE\fP is specified as the URL, then a null stream is passed to the \f2KeyStore.load\fP method. \f2NONE\fP should be specified if the \f2KeyStore\fP is not file\-based (for example, if it resides on a hardware token device). .TP 3 -\-storepass storepass +\-storepass[:env|:file] argument +.LP The password which is used to protect the integrity of the keystore. .LP -\f2storepass\fP must be at least 6 characters long. It must be provided to all commands that access the keystore contents. For such commands, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for it. +If the modifier \f2env\fP or \f2file\fP is not specified, then the password has the value \f2argument\fP, which must be at least 6 characters long. Otherwise, the password is retrieved as follows: +.RS 3 +.TP 2 +o +\f2env\fP: Retrieve the password from the environment variable named \f2argument\fP +.TP 2 +o +\f2file\fP: Retrieve the password from the file named \f2argument\fP +.RE +.LP +\f3Note\fP: All other options that require passwords, such as \f2\-keypass\fP, \f2\-srckeypass\fP, \f2\-destkeypass\fP \f2\-srcstorepass\fP, and \f2\-deststorepass\fP, accept the \f2env\fP and \f2file\fP modifiers. (Remember to separate the password option and the modifier with a colon, (\f2:\fP).) +.LP +The password must be provided to all commands that access the keystore contents. For such commands, if a \f2\-storepass\fP option is not provided at the command line, the user is prompted for it. .LP When retrieving information from the keystore, the password is optional; if no password is given, the integrity of the retrieved information cannot be checked and a warning is displayed. .TP 3 \-providerName provider_name -Used to identify a cryptographic service provider's name when listed in the security properties file. +.LP +Used to identify a cryptographic service provider's name when listed in the security properties file. .TP 3 \-providerClass provider_class_name -Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file. +.LP +Used to specify the name of cryptographic service provider's master class file when the service provider is not listed in the security properties file. .TP 3 \-providerArg provider_arg -Used in conjunction with \f2\-providerClass\fP. Represents an optional string input argument for the constructor of \f2provider_class_name\fP. +.LP +Used in conjunction with \f2\-providerClass\fP. Represents an optional string input argument for the constructor of \f2provider_class_name\fP. .TP 3 \-protected +.LP Either \f2true\fP or \f2false\fP. This value should be specified as \f2true\fP if a password must be given via a protected authentication path such as a dedicated PIN reader. .LP Note: Since there are two keystores involved in \f2\-importkeystore\fP command, two options, namely, \f2\-srcprotected\fP and \f2\-destprotected\fP are provided for the source keystore and the destination keystore respectively. .TP 3 \-ext {name{:critical}{=value}} -Denotes an X.509 certificate extension. The option can be used in \f2\-genkeypair\fP and \f2\-gencert\fP to embed extensions into the certificate generated, or in \f2\-certreq\fP to show what extensions are requested in the certificate request. The option can appear multiple times. name can be a supported extension name (see below) or an arbitrary OID number. value, if provided, denotes the parameter for the extension; if omitted, denotes the default value (if defined) of the extension or the extension requires no parameter. The \f2":critical"\fP modifier, if provided, means the extension's isCritical attribute is true; otherwise, false. -.RS 3 +.LP +Denotes an X.509 certificate extension. The option can be used in \-genkeypair and \-gencert to embed extensions into the certificate generated, or in \f2\-certreq\fP to show what extensions are requested in the certificate request. The option can appear multiple times. name can be a supported extension name (see below) or an arbitrary OID number. value, if provided, denotes the parameter for the extension; if omitted, denotes the default value (if defined) of the extension or the extension requires no parameter. The \f2:critical\fP modifier, if provided, means the extension's isCritical attribute is true; otherwise, false. You may use \f2:c\fP in place of \f2:critical\fP. +.RE .LP .LP @@ -478,7 +508,7 @@ same as SubjectInfoAccess. method can be "ocsp","caIssuers" or any OID. .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 289 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 319 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 @@ -657,7 +687,7 @@ same as SubjectInfoAccess. method can be "ocsp","caIssuers" or any OID. For name as OID, value is the HEX dumped DER encoding of the extnValue for the extension excluding the OCTET STRING type and length bytes. Any extra character other than standard HEX numbers (0\-9, a\-f, A\-F) are ignored in the HEX string. Therefore, both \f2"01:02:03:04"\fP and \f2"01020304"\fP are accepted as identical values. If there's no value, the extension has an empty value field then. .LP .LP -A special name \f2"honored"\fP, used in \-gencert only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma\-seperated list of \f2"all"\fP (all requested extensions are honored), \f2"name{:[critical|non\-critical]}"\fP (the named extension is honored, but using a different isCritical attribute) and \f2"\-name"\fP (used with all, denotes an exception). Requested extensions are not honored by default. +A special name \f2'honored'\fP, used in \f2\-gencert\fP only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma separated list of \f2"all"\fP (all requested extensions are honored), \f2"name{:[critical|non\-critical]}"\fP (the named extension is honored, but using a different isCritical attribute) and \f2"\-name"\fP (used with all, denotes an exception). Requested extensions are not honored by default. .LP .LP If, besides the \-ext honored option, another named or OID \-ext option is provided, this extension will be added to those already honored. However, if this name (or OID) also appears in the honored value, its value and criticality overrides the one in the request. @@ -668,32 +698,61 @@ The subjectKeyIdentifier extension is always created. For non self\-signed certi .LP \f3Note:\fP Users should be aware that some combinations of extensions (and other certificate fields) may not conform to the Internet standard. See Warning Regarding Certificate Conformance for details. .LP -.RE -.RE -.RE .SH "COMMANDS" -.LP - .LP .SS Creating or Adding Data to the Keystore -.LP -.RS 3 - .LP .RS 3 .TP 3 -\-gencert {\-infile infile} {\-outfile outfile} {\-dname dname} {\-ext ext}* {\-rfc} {\-alias alias} {\-sigalg sigalg} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] [\-keypass keypass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} +\-gencert {\-rfc} {\-infile infile} {\-outfile outfile} {\-alias alias} {\-sigalg sigalg} {\-dname dname} {\-startdate startdate {\-ext ext}* {\-validity valDays} [\-keypass keypass] {\-keystore keystore} [\-storepass storepass] {\-storetype storetype} {\-providername provider_name} {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} .LP -Generates a certificate as a response to a certificate request file (which can be created by the \f2keytool \-certreq\fP command). The command reads the request from infile (if omitted, from the standard input), signs it using alias's private key, and output the X.509 certificate into outfile (if omitted, to the standard output). If \f2\-rfc\fP is specified, output format is BASE64\-encoded PEM; otherwise, a binary DER is created. +Generates a certificate as a response to a certificate request file (which can be created by the \f2keytool \-certreq\fP command). The command reads the request from \f2infile\fP (if omitted, from the standard input), signs it using alias's private key, and output the X.509 certificate into \f2outfile\fP (if omitted, to the standard output). If \f2\-rfc\fP is specified, output format is BASE64\-encoded PEM; otherwise, a binary DER is created. .LP -\f2sigalg\fP specifies the algorithm that should be used to sign the certificate. valDays tells the number of days for which the certificate should be considered valid. +\f2sigalg\fP specifies the algorithm that should be used to sign the certificate. \f2startdate\fP is the start time/date that the certificate is valid. \f2valDays\fP tells the number of days for which the certificate should be considered valid. .LP If \f2dname\fP is provided, it's used as the subject of the generated certificate. Otherwise, the one from the certificate request is used. .LP -\f2ext\fP shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of \f2\-ext\fP. +\f2ext\fP shows what X.509 extensions will be embedded in the certificate. Read Common Options for the grammar of \f2\-ext\fP. +.LP +The \f2\-gencert\fP command enables you to create certificate chains. The following example creates a certificate, \f2e1\fP, that contains three certificates in its certificate chain. +.LP +The following commands creates four key pairs named \f2ca\fP, \f2ca1\fP, \f2ca2\fP, and \f2e1\fP: +.nf +\f3 +.fl +keytool \-alias ca \-dname CN=CA \-genkeypair +.fl +keytool \-alias ca1 \-dname CN=CA \-genkeypair +.fl +keytool \-alias ca2 \-dname CN=CA \-genkeypair +.fl +keytool \-alias e1 \-dname CN=E1 \-genkeypair +.fl +\fP +.fi +.LP +The following two commands create a chain of signed certificates; \f2ca\fP signs ca1 and \f2ca1 signs ca2\fP, all of which are self\-issued: +.nf +\f3 +.fl +keytool \-alias ca1 \-certreq | keytool \-alias ca \-gencert \-ext san=dns:ca1 | keytool \-alias ca1 \-importcert +.fl +keytool \-alias ca2 \-certreq | $KT \-alias ca1 \-gencert \-ext san=dns:ca2 | $KT \-alias ca2 \-importcert +.fl +\fP +.fi +.LP +The following command creates the certificate \f2e1\fP and stores it in the file \f2e1.cert\fP, which is signed by \f2ca2\fP. As a result, \f2e1\fP should contain \f2ca\fP, \f2ca1\fP, and \f2ca2\fP in its certificate chain: +.nf +\f3 +.fl +keytool \-alias e1 \-certreq | keytool \-alias ca2 \-gencert > e1.cert +.fl +\fP +.fi .TP 3 -\-genkeypair {\-alias alias} {\-keyalg keyalg} {\-keysize keysize} {\-sigalg sigalg} [\-dname dname] [\-keypass keypass] {\-startdate value} {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} +\-genkeypair {\-alias alias} {\-keyalg keyalg} {\-keysize keysize} {\-sigalg sigalg} [\-dname dname] [\-keypass keypass] {\-startdate value} {\-ext ext}* {\-validity valDays} {\-storetype storetype} {\-keystore keystore} [\-storepass storepass] {\-providerClass provider_class_name {\-providerArg provider_arg}} {\-v} {\-protected} {\-Jjavaoption} .LP Generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v3 self\-signed certificate, which is stored as a single\-element certificate chain. This certificate chain and the private key are stored in a new keystore entry identified by \f2alias\fP. .LP @@ -704,30 +763,18 @@ Generates a key pair (a public key and associated private key). Wraps the public \f2keypass\fP is a password used to protect the private key of the generated key pair. If no password is provided, the user is prompted for it. If you press RETURN at the prompt, the key password is set to the same password as that used for the keystore. \f2keypass\fP must be at least 6 characters long. .LP \f2startdate\fP specifies the issue time of the certificate, also known as the "Not Before" value of the X.509 certificate's Validity field. -.RS 3 - -.LP -.LP -The option value can be set in one of these two forms: .LP +The option value can be set in one of these two forms: .RS 3 .TP 3 1. -.LP -([+\-]\f2nnn\fP[ymdHMS])+ +([+\-]\f2nnn\fP[ymdHMS])+ .TP 3 2. -.LP -[yyyy/mm/dd] [HH:MM:SS] +[yyyy/mm/dd] [HH:MM:SS] .RE - -.LP -.LP -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 sub values. Inside each sub value, the plus sign ("+") means shifting forward, and the minus sign ("\-") means shifting backward. The time to be shifted is \f2nnn\fP units of years, months, days, hours, minutes, or seconds (denoted by a single character of "y", "m", "d", "H", "M", or "S" respectively). The exact value of the issue time is calculated using the \f2java.util.GregorianCalendar.add(int field, int amount)\fP method on each sub value, from left to right. For example, by specifying \f2"\-startdate \-1y+1m\-1d"\fP, the issue time will be: -.LP -.RS 3 - .LP +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 sub values. Inside each sub value, the plus sign ("+") means shifting forward, and the minus sign ("\-") means shifting backward. The time to be shifted is \f2nnn\fP units of years, months, days, hours, minutes, or seconds (denoted by a single character of "y", "m", "d", "H", "M", or "S" respectively). The exact value of the issue time is calculated using the \f2java.util.GregorianCalendar.add(int field, int amount)\fP method on each sub value, from left to right. For example, by specifying \f2"\-startdate \-1y+1m\-1d"\fP, the issue time will be: .nf \f3 .fl @@ -743,16 +790,10 @@ With the first form, the issue time is shifted by the specified value from the c .fl \fP .fi -.RE - -.LP .LP -With the second form, the user sets the exact issue time in two parts, year/month/day and hour:minute:second (using the local timezone). The user may provide only one part, which means the other part is the same as the current date (or time). User must provide the exact number of digits as shown in the format definition (padding with 0 if shorter). When both the 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. +With the second form, the user sets the exact issue time in two parts, year/month/day and hour:minute:second (using the local time zone). The user may provide only one part, which means the other part is the same as the current date (or time). User must provide the exact number of digits as shown in the format definition (padding with 0 if shorter). When both the 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. .LP -.LP -When the option is not provided, the start date is the current time. The option can be provided at most once. -.LP -.RE +When the option is not provided, the start date is the current time. The option can be provided at most once. .LP \f2valDays\fP specifies the number of days (starting at the date specified by \f2\-startdate\fP, or the current date if \f2\-startdate\fP is not specified) for which the certificate should be considered valid. .LP @@ -790,25 +831,17 @@ Which type of import is intended is indicated by the value of the \f2\-alias\fP \f3If the alias points to a key entry\fP, then \f3keytool\fP assumes you are importing a certificate reply. .RE \f3Importing a New Trusted Certificate\fP -.RS 3 .LP -Before adding the certificate to the keystore, \f3keytool\fP tries to verify it by attempting to construct a chain of trust from that certificate to a self\-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore. +Before adding the certificate to the keystore, \f3keytool\fP tries to verify it by attempting to construct a chain of trust from that certificate to a self\-signed certificate (belonging to a root CA), using trusted certificates that are already available in the keystore. .LP +If the \f2\-trustcacerts\fP option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts". .LP -If the \f2\-trustcacerts\fP option has been specified, additional certificates are considered for the chain of trust, namely the certificates in a file named "cacerts". -.LP -.LP -If \f3keytool\fP fails to establish a trust path from the certificate to be imported up to a self\-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! \-\- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the \f2\-noprompt\fP option is given, however, there will be no interaction with the user. -.LP -.RE +If \f3keytool\fP fails to establish a trust path from the certificate to be imported up to a self\-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is prompted to verify it, e.g., by comparing the displayed certificate fingerprints with the fingerprints obtained from some other (trusted) source of information, which might be the certificate owner himself/herself. Be very careful to ensure the certificate is valid prior to importing it as a "trusted" certificate! \-\- see WARNING Regarding Importing Trusted Certificates. The user then has the option of aborting the import operation. If the \f2\-noprompt\fP option is given, however, there will be no interaction with the user. \f3Importing a Certificate Reply\fP -.RS 3 -.LP -When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the \f2\-trustcacerts\fP option was specified). .LP +When importing a certificate reply, the certificate reply is validated using trusted certificates from the keystore, and optionally using the certificates configured in the "cacerts" keystore file (if the \f2\-trustcacerts\fP option was specified). .LP -The methods of determining whether the certificate reply is trusted are described in the following: -.LP +The methods of determining whether the certificate reply is trusted are described in the following: .RS 3 .TP 2 o @@ -817,12 +850,8 @@ o o \f3If the reply is a PKCS#7 formatted certificate chain or a sequence of X.509 certificates\fP, 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 \f2\-trustcacerts\fP option was specified, \f3keytool\fP will attempt to match it with any of the trusted certificates in the keystore or the "cacerts" keystore file. If the chain does not end with a self\-signed root CA certificate and the \f2\-trustcacerts\fP option was specified, \f3keytool\fP will try to find one from the trusted certificates in the keystore or the "cacerts" keystore file and add it to the end of the chain. If the certificate is not found and \f2\-noprompt\fP option is not specified, the information of the last certificate in the chain is printed out, and the user is prompted to verify it. .RE - .LP -.LP -If the public key in the certificate reply matches the user's public key already stored with under \f2alias\fP, the old certificate chain is replaced with the new certificate chain in the reply. The old chain can only be replaced if a valid \f2keypass\fP, 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. -.LP -.RE +If the public key in the certificate reply matches the user's public key already stored with under \f2alias\fP, the old certificate chain is replaced with the new certificate chain in the reply. The old chain can only be replaced if a valid \f2keypass\fP, 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. .LP This command was named \f2\-import\fP in previous releases. This old name is still supported in this release and will be supported in future releases, but for clarify the new name, \f2\-importcert\fP, is preferred going forward. .TP 3 @@ -842,12 +871,10 @@ Note that if \f2\-noprompt\fP is provided, the user will not be prompted for a n .LP Prints the content of a PKCS #10 format certificate request, which can be generated by the keytool \-certreq command. The command reads the request from file; if omitted, from the standard input. .RE -.RE + +.LP .SS Exporting Data -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -879,12 +906,8 @@ This command was named \f2\-export\fP in previous releases. This old name is sti .RE .LP -.RE .SS Displaying Data -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -896,25 +919,34 @@ This command by default prints the SHA1 fingerprint of a certificate. If the \f2 .LP You cannot specify both \f2\-v\fP and \f2\-rfc\fP. .TP 3 -\-printcert {\-file cert_file | \-sslserver host[:port]} {\-rfc} {\-v} {\-Jjavaoption} +\-printcert {\-file cert_file | \-sslserver host[:port]} {\-jarfile JAR_file {\-rfc} {\-v} {\-Jjavaoption} .LP +Reads the certificate from the file \f2cert_file\fP, the SSL server located at \f2host:port\fP, or the signed JAR file \f2JAR_file\fP (with the option \f2\-jarfile\fP and prints its contents in a human\-readable format. When no port is specified, the standard HTTPS port 443 is assumed. Note that \f2\-sslserver\fP and \f2\-file\fP options cannot be provided at the same time. Otherwise, an error is reported. If neither option is given, the certificate is read from stdin. .LP If \f2\-rfc\fP is specified, keytool prints the certificate in PEM mode as defined by the Internet RFC 1421 standard. .LP If the certificate is read from a file or stdin, it may be either binary encoded or in printable encoding format, as defined by the Internet RFC 1421 standard .LP -If the SSL server is behind a firewall, \f2\-J\-Dhttps.proxyHost=proxyhost\fP and \f2\-J\-Dhttps.proxyPort=proxyport\fP can be specified on the command line for proxy tunneling. See the JSSE Reference Guide for more information. +If the SSL server is behind a firewall, \f2\-J\-Dhttps.proxyHost=proxyhost\fP and \f2\-J\-Dhttps.proxyPort=proxyport\fP can be specified on the command line for proxy tunneling. See the +.na +\f2JSSE Reference Guide\fP @ +.fi +http://download.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html for more information. +.LP +\f3Note\fP: This option can be used independently of a keystore. +.TP 3 +\-printcrl \-file crl_ {\-v} +.LP +Reads the certificate revocation list (CRL) from the file \f2crl_file\fP. +.LP +A Certificate Revocation List (CRL) is a list of digital certificates which have been revoked by the Certificate Authority (CA) that issued them. The CA generates \f2crl_file\fP. .LP \f3Note\fP: This option can be used independently of a keystore. .RE .LP -.RE .SS Managing the Keystore -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -940,34 +972,33 @@ Move an existing keystore entry from the specified \f2alias\fP to a new alias, \ .RE .LP -.RE .SS Getting Help -.LP -.RS 3 - .LP .RS 3 .TP 3 \-help .LP -Lists the basic commands and their options. +Lists the basic commands and their options. +.LP +For more information about a specific command, enter the following, where \f2command_name\fP is the name of the command: +.nf +\f3 +.fl + keytool \-\fP\f4command_name\fP\f3 \-help +.fl +\fP +.fi .RE .LP -.RE .SH "EXAMPLES" -.LP - .LP .LP Suppose you want to create a keystore for managing your public/private key pair and certificates from entities you trust. .LP .SS Generating Your Key Pair -.LP -.RS 3 - .LP .LP The first thing you need to do is create a keystore and generate the key pair. You could use a command such as the following: @@ -975,11 +1006,11 @@ The first thing you need to do is create a keystore and generate the key pair. Y .nf \f3 .fl - keytool \-genkeypair \-dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" + keytool \-genkeypair \-dname "cn=Mark Jones, ou=Java, o=Oracle, c=US" .fl - \-alias business \-keypass kpi135 \-keystore /working/mykeystore + \-alias business \-keypass \fP\f4<new password for private key>\fP\f3 \-keystore /working/mykeystore .fl - \-storepass ab987c \-validity 180 + \-storepass \fP\f4<new password for keystore>\fP\f3 \-validity 180 .fl \fP .fi @@ -989,10 +1020,10 @@ The first thing you need to do is create a keystore and generate the key pair. Y (Please note: This must be typed as a single line. Multiple lines are used in the examples just for legibility purposes.) .LP .LP -This command creates the keystore named "mykeystore" in the "working" directory (assuming it doesn't already exist), and assigns it the password "ab987c". It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "JavaSoft", organization of "Sun" and two\-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long. +This command creates the keystore named "mykeystore" in the "working" directory (assuming it doesn't already exist), and assigns it the password specified by \f2<new password for keystore>\fP. It generates a public/private key pair for the entity whose "distinguished name" has a common name of "Mark Jones", organizational unit of "Java", organization of "Oracle" and two\-letter country code of "US". It uses the default "DSA" key generation algorithm to create the keys, both 1024 bits long. .LP .LP -It creates a self\-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password "kpi135". +It creates a self\-signed certificate (using the default "SHA1withDSA" signature algorithm) that includes the public key and the distinguished name information. This certificate will be valid for 180 days, and is associated with the private key in a keystore entry referred to by the alias "business". The private key is assigned the password specified by \f2<new password for private key>\fP. .LP .LP The command could be significantly shorter if option defaults were accepted. As a matter of fact, no options are required; defaults are used for unspecified options that have default values, and you are prompted for any required values. Thus, you could simply have the following: @@ -1006,16 +1037,14 @@ The command could be significantly shorter if option defaults were accepted. As .fi .LP -In this case, a keystore entry with alias "mykey" is created, with a newly\-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password. .LP -The rest of the examples assume you executed the \f2\-genkeypair\fP command without options specified, and that you responded to the prompts with values equal to those given in the first \f2\-genkeypair\fP command, above (a private key password of "kpi135", etc.) +In this case, a keystore entry with alias "mykey" is created, with a newly\-generated key pair and a certificate that is valid for 90 days. This entry is placed in the keystore named ".keystore" in your home directory. (The keystore is created if it doesn't already exist.) You will be prompted for the distinguished name information, the keystore password, and the private key password. +.LP +.LP +The rest of the examples assume you executed the \f2\-genkeypair\fP command without options specified, and that you responded to the prompts with values equal to those given in the first \f2\-genkeypair\fP command, above (for example, a distinguished name of "cn=Mark Jones, ou=Java, o=Oracle, c=US"). .LP -.RE .SS Requesting a Signed Certificate from a Certification Authority -.LP -.RS 3 - .LP .LP So far all we've got is a self\-signed certificate. A certificate is more likely to be trusted by others if it is signed by a Certification Authority (CA). To get such a signature, you first generate a Certificate Signing Request (CSR), via the following: @@ -1028,14 +1057,12 @@ So far all we've got is a self\-signed certificate. A certificate is more likely \fP .fi +.LP .LP This creates a CSR (for the entity identified by the default alias "mykey") and puts the request in the file named "MarkJ.csr". Submit this file to a CA, such as VeriSign, Inc. The CA will authenticate you, the requestor (usually off\-line), and then will return a certificate, signed by them, authenticating your public key. (In some cases, they will actually return a chain of certificates, each one authenticating the public key of the signer of the previous certificate in the chain.) -.RE +.LP .SS Importing a Certificate for the CA -.LP -.RS 3 - .LP .LP You need to replace your 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. @@ -1054,7 +1081,7 @@ If the certificate reply is a single certificate, you need a certificate for the .LP .LP -The "cacerts" keystore file ships with five VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate". +The "cacerts" keystore file ships with several VeriSign root CA certificates, so you probably won't need to import a VeriSign certificate as a trusted certificate in your keystore. But if you request a signed certificate from a different CA, and a certificate authenticating that CA's public key hasn't been added to "cacerts", you will need to import a certificate from the CA as a "trusted certificate". .LP .LP A certificate from a CA is usually either self\-signed, or signed by another CA (in which case you also need a certificate authenticating that CA's public key). Suppose company ABC, Inc., is a CA, and you obtain a file named "ABCCA.cer" that is purportedly a self\-signed certificate from ABC, authenticating that CA's public key. @@ -1073,14 +1100,12 @@ If you trust that the certificate is valid, then you can add it to your keystore \fP .fi +.LP .LP This creates a "trusted certificate" entry in the keystore, with the data from the file "ABCCA.cer", and assigns the alias "abc" to the entry. -.RE +.LP .SS Importing the Certificate Reply from the CA -.LP -.RS 3 - .LP .LP Once you've imported a certificate authenticating the public key of the CA you submitted your certificate signing request to (or there's already such a certificate in the "cacerts" file), you can import the certificate reply and thereby replace your self\-signed certificate with a certificate chain. This chain is the one returned by the CA in response to your request (if the CA reply is a chain), or one constructed (if the CA reply is a single certificate) using the certificate reply and trusted certificates that are already available in the keystore where you import the reply or in the "cacerts" keystore file. @@ -1095,16 +1120,14 @@ For example, suppose you sent your certificate signing request to VeriSign. You .fl \fP .fi -.RE .LP .SS Exporting a Certificate Authenticating Your Public Key .LP -.RS 3 - .LP -Suppose you have used the jarsigner(1) tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature. +Suppose you have used the jarsigner(1) tool to sign a Java ARchive (JAR) file. Clients that want to use the file will want to authenticate your signature. +.LP .LP One way they can do this is by first importing your public key certificate into their keystore as a "trusted" entry. You can export the certificate and supply it to your clients. As an example, you can copy your certificate to a file named \f2MJ.cer\fP via the following, assuming the entry is aliased by "mykey": .LP @@ -1116,14 +1139,12 @@ One way they can do this is by first importing your public key certificate into \fP .fi +.LP .LP Given that certificate, and the signed JAR file, a client can use the \f3jarsigner\fP tool to authenticate your signature. -.RE +.LP .SS Importing Keystore -.LP -.RS 3 - .LP .LP The command "importkeystore" is used to import an entire keystore into another keystore, which means all entries from the source keystore, including keys and certificates, are all imported to the destination keystore within a single command. You can use this command to import entries from a different type of 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 \f3keytool\fP has difficulties recover the private keys or secret keys from the source keystore, it will prompt you for a password. If it detects alias duplication, it will ask you for a new one, you can specify a new alias or simply allow \f3keytool\fP to overwrite the existing one. @@ -1134,128 +1155,108 @@ For example, to import entries from a normal JKS type keystore key.jks into a PK .nf \f3 .fl -keytool \-importkeystore + keytool \-importkeystore .fl \-srckeystore key.jks \-destkeystore NONE .fl \-srcstoretype JKS \-deststoretype PKCS11 .fl - \-srcstorepass changeit \-deststorepass topsecret + \-srcstorepass \fP\f4<source keystore password>\fP\f3 \-deststorepass \fP\f4<destination keystore password>\fP\f3 .fl \fP .fi .LP .LP -The importkeystore 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 see in the above example, you need to specify the alias you want to import. With the srcalias option given, you can also specify the desination alias name in the command line, as well as protection password for a secret/private key and the destination protection password you want. In this way, you can issue a \f3keytool\fP command that will never ask you a question. This makes it very convenient to include a \f3keytool\fP command into a script file, like this: +The importkeystore 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 see in the above example, you need to specify the alias you want to import. With the srcalias option given, you can also specify the destination alias name in the command line, as well as protection password for a secret/private key and the destination protection password you want. The following command demonstrates this: .LP .nf \f3 .fl -keytool \-importkeystore + keytool \-importkeystore .fl \-srckeystore key.jks \-destkeystore NONE .fl \-srcstoretype JKS \-deststoretype PKCS11 .fl - \-srcstorepass changeit \-deststorepass topsecret + \-srcstorepass \fP\f4<source keystore password>\fP\f3 \-deststorepass \fP\f4<destination keystore password>\fP\f3 .fl \-srcalias myprivatekey \-destalias myoldprivatekey .fl - \-srckeypass oldkeypass \-destkeypass mynewkeypass + \-srckeypass \fP\f4<source entry password>\fP\f3 \-destkeypass \fP\f4<destination entry password>\fP\f3 .fl \-noprompt .fl \fP .fi -.RE .LP .SS -Generating Certificates for a typical SSL Server -.LP -.RS 3 - +Generating Certificates for a Typical SSL Server .LP .LP -Keytool commands to generate keypairs and certificates for three entities, namely, Root CA (root), Intermadiate CA (ca), and SSL server (server) are as follows: +The following are keytool commands to generate keypairs and certificates for three entities, namely, Root CA (root), Intermediate CA (ca), and SSL server (server). Ensure that you store all the certificates in the same keystore. In these examples, it is recommended that you specify RSA as the key algorithm. .LP .nf \f3 .fl -keytool \-keystore root.jks \-genkeypair \-alias root \-ext bc:c +keytool \-genkeypair \-keystore root.jks \-alias root \-ext bc:c .fl -keytool \-keystore ca.jks \-alias ca +keytool \-genkeypair \-keystore ca.jks \-alias ca \-ext bc:c .fl -keytool \-keystore server.jks \-alias server +keytool \-genkeypair \-keystore server.jks \-alias server .fl - + .fl -keytool \-keystore root.jks \-alias root \-exportcert > root.pem +keytool \-keystore root.jks \-alias root \-exportcert \-rfc > root.pem .fl - + .fl -keytool \-keystore ca.jks \-certreq \-alias ca | keytool \-keystore root.jks \-gencert \-alias root \-ext BC=0 > ca.pem +keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore ca.jks \-certreq \-alias ca | keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore root.jks \-gencert \-alias root \-ext BC=0 \-rfc > ca.pem .fl keytool \-keystore ca.jks \-importcert \-alias ca \-file ca.pem .fl - + .fl -keytool \-keystore server.jks \-certreq \-alias server | keytool \-keystore ca.jks \-gencert \-alias ca \-ext ku:c=dig,kE >server.pem +keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore server.jks \-certreq \-alias server | keytool \-storepass \fP\f4<storepass>\fP\f3 \-keystore ca.jks \-gencert \-alias ca \-ext ku:c=dig,kE \-rfc > server.pem .fl cat root.pem ca.pem server.pem | keytool \-keystore server.jks \-importcert \-alias server .fl \fP .fi -.RE .LP .SH "TERMINOLOGY and WARNINGS" -.LP - .LP .SS KeyStore .LP -.RS 3 - .LP A keystore is a storage facility for cryptographic keys and certificates. -.RE +.LP .RS 3 .TP 2 o -.TP 2 -o \f3KeyStore Entries\fP -.RS 3 - .LP Keystores may have different types of entries. The two most applicable entry types for \f3keytool\fP include: .RS 3 .TP 3 1. -\f3key entries\fP \- each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. 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. The \f3keytool\fP can handle both types od entry, while \f3jarsigner\fP tool only handle the latter type of entry, that is private keys and their associated certificate chains. +\f3key entries\fP \- each holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access. 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. The \f3keytool\fP can handle both types of entries, while the \f3jarsigner\fP tool only handle the latter type of entry, that is private keys and their associated certificate chains. .TP 3 2. \f3trusted certificate entries\fP \- each contains a single public key certificate belonging to another party. It is called a "trusted certificate" because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the "subject" (owner) of the certificate. The issuer of the certificate vouches for this, by signing the certificate. .RE - -.LP -.RE .TP 2 o \f3KeyStore Aliases\fP -.RS 3 .LP -All keystore entries (key and trusted certificate entries) are accessed via unique \f2aliases\fP. +All keystore entries (key and trusted certificate entries) are accessed via unique \f2aliases\fP. .LP +An alias is specified when you add an entity to the keystore using the \-genseckey command to generate a secret key, \-genkeypair command to generate a key pair (public and private key) or the \-importcert command to add a certificate or certificate chain to the list of trusted certificates. Subsequent \f3keytool\fP commands must use this same alias to refer to the entity. .LP -An alias is specified when you add an entity to the keystore using the \-genseckey command to generate a secret key, \-genkeypair command to generate a key pair (public and private key) or the \-importcert command to add a certificate or certificate chain to the list of trusted certificates. Subsequent \f3keytool\fP commands must use this same alias to refer to the entity. -.LP -.LP -For example, suppose you use the alias \f2duke\fP to generate a new public/private key pair and wrap the public key into a self\-signed certificate (see Certificate Chains) via the following command: -.LP +For example, suppose you use the alias \f2duke\fP to generate a new public/private key pair and wrap the public key into a self\-signed certificate (see Certificate Chains) via the following command: .nf \f3 .fl @@ -1263,9 +1264,8 @@ For example, suppose you use the alias \f2duke\fP to generate a new public/priva .fl \fP .fi - .LP -This specifies an inital password of "dukekeypasswd" required by subsequent commands to access the private key assocated with the alias \f2duke\fP. If you later want to change duke's private key password, you use a command like the following: +This specifies an initial password of "dukekeypasswd" required by subsequent commands to access the private key associated with the alias \f2duke\fP. If you later want to change duke's private key password, you use a command like the following: .nf \f3 .fl @@ -1273,49 +1273,37 @@ This specifies an inital password of "dukekeypasswd" required by subsequent comm .fl \fP .fi - .LP This changes the password from "dukekeypasswd" to "newpass". .LP -Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. -.LP -.RE +Please note: A password should not actually be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system. If you don't specify a required password option on a command line, you will be prompted for it. .TP 2 o \f3KeyStore Implementation\fP -.RS 3 -The \f2KeyStore\fP class provided in the \f2java.security\fP 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 \f2type\fP of keystore. -.LP -Currently, two command\-line tools (\f3keytool\fP and \f3jarsigner\fP) and a GUI\-based tool named \f3Policy Tool\fP make use of keystore implementations. Since \f2KeyStore\fP is publicly available, users can write additional security applications that use it. .LP +The \f2KeyStore\fP class provided in the \f2java.security\fP 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 \f2type\fP of keystore. .LP -There is a built\-in default implementation, provided by Sun Microsystems. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. +Currently, two command\-line tools (\f3keytool\fP and \f3jarsigner\fP) and a GUI\-based tool named \f3Policy Tool\fP make use of keystore implementations. Since \f2KeyStore\fP is publicly available, users can write additional security applications that use it. .LP +There is a built\-in default implementation, provided by Oracle. It implements the keystore as a file, utilizing a proprietary keystore type (format) named "JKS". It protects each private key with its individual password, and also protects the integrity of the entire keystore with a (possibly different) password. .LP Keystore implementations are provider\-based. More specifically, the application interfaces supplied by \f2KeyStore\fP are implemented in terms of a "Service Provider Interface" (SPI). That is, there is a corresponding abstract \f2KeystoreSpi\fP class, also in the \f2java.security\fP package, which 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.) Thus, to provide a keystore implementation, clients must implement a "provider" and supply a KeystoreSpi subclass implementation, as described in .na \f2How to Implement a Provider for the Java Cryptography Architecture\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html. -.LP +http://download.oracle.com/javase/7/docs/technotes/guides/security/crypto/HowToImplAProvider.html. .LP -Applications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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 itself. Keystore implementations of different types are not compatible. +Applications can choose different \f2types\fP of keystore implementations from different providers, using the "getInstance" factory method supplied in the \f2KeyStore\fP 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 itself. Keystore implementations of different types are not compatible. .LP +\f3keytool\fP works on any file\-based keystore implementation. (It treats the keystore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. .LP -\f3keytool\fP works on any file\-based keystore implementation. (It treats the keytore location that is passed to it at the command line as a filename and converts it to a FileInputStream, from which it loads the keystore information.) The \f3jarsigner\fP and \f3policytool\fP tools, on the other hand, can read a keystore from any location that can be specified using a URL. +For \f3keytool\fP and \f3jarsigner\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Keystore" menu. .LP +If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the \f2keystore.type\fP property specified in the security properties file. The security properties file is called \f2java.security\fP, and it resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). .LP -For \f3keytool\fP and \f3jarsigner\fP, you can specify a keystore type at the command line, via the \f2\-storetype\fP option. For \f3Policy Tool\fP, you can specify a keystore type via the "Keystore" menu. -.LP -.LP -If you don't explicitly specify a keystore type, the tools choose a keystore implementation based simply on the value of the \f2keystore.type\fP property specified in the security properties file. The security properties file is called \f2java.security\fP, and it resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). -.LP -.LP -Each tool gets the \f2keystore.type\fP value and then examines all the currently\-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider. -.LP -.LP -The \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that lets applications and applets retrieve the value of the \f2keystore.type\fP property. The following line of code creates an instance of the default keystore type (as specified in the \f2keystore.type\fP property): +Each tool gets the \f2keystore.type\fP value and then examines all the currently\-installed providers until it finds one that implements keystores of that type. It then uses the keystore implementation from that provider. .LP +The \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that lets applications and applets retrieve the value of the \f2keystore.type\fP property. The following line of code creates an instance of the default keystore type (as specified in the \f2keystore.type\fP property): .nf \f3 .fl @@ -1323,11 +1311,8 @@ The \f2KeyStore\fP class defines a static method named \f2getDefaultType\fP that .fl \fP .fi - -.LP -.LP -The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Sun). This is specified by the following line in the security properties file: .LP +The default keystore type is "jks" (the proprietary type of the keystore implementation provided by Oracle). This is specified by the following line in the security properties file: .nf \f3 .fl @@ -1335,14 +1320,10 @@ The default keystore type is "jks" (the proprietary type of the keystore impleme .fl \fP .fi - -.LP -.LP -To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. .LP +To have the tools utilize a keystore implementation other than the default, you can change that line to specify a different keystore type. .LP -For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to -.LP +For example, if you have a provider package that supplies a keystore implementation for a keystore type called "pkcs12", change the line to .nf \f3 .fl @@ -1350,50 +1331,45 @@ For example, if you have a provider package that supplies a keystore implementat .fl \fP .fi - .LP -Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks". -.RE +Note: case doesn't matter in keystore type designations. For example, "JKS" would be considered the same as "jks". .RE + +.LP .SS Certificate .LP +A \f3certificate\fP (also known as a \f3public\-key certificate\fP) is a digitally signed statement from one entity (the \f2issuer\fP), saying that the public key (and some other information) of another entity (the \f2subject\fP) has some specific value. .RS 3 - -.LP -A \f3certificate\fP (also known as a \f3public\-key certificate\fP) is a digitally signed statement from one entity (the \f2issuer\fP), saying that the public key (and some other information) of another entity (the \f2subject\fP) has some specific value. -.RE -.RS 3 -.TP 2 -o .TP 2 o \f3Certificate Terms\fP .RS 3 - -.LP -.RS 3 .TP 3 Public Keys -These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures. +.LP +These are numbers associated with a particular entity, and are intended to be known to everyone who needs to have trusted interactions with that entity. Public keys are used to verify signatures. .TP 3 Digitally Signed -If some data is \f2digitally signed\fP it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key. +.LP +If some data is \f2digitally signed\fP it has been stored with the "identity" of an entity, and a signature that proves that entity knows about the data. The data is rendered unforgeable by signing with the entity's private key. .TP 3 Identity -A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name. +.LP +A known way of addressing an entity. In some systems the identity is the public key, in others it can be anything from a Unix UID to an Email address to an X.509 Distinguished Name. .TP 3 Signature -A signature is computed over some data using the private key of an entity (the \f2signer\fP, which in the case of a certificate is also known as the \f2issuer\fP). +.LP +A signature is computed over some data using the private key of an entity (the \f2signer\fP, which in the case of a certificate is also known as the \f2issuer\fP). .TP 3 Private Keys -These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures. +.LP +These are numbers, each of which is supposed to be known only to the particular entity whose private key it is (that is, it's supposed to be kept secret). Private and public keys exist in pairs in all public key cryptography systems (also referred to as "public key crypto systems"). In a typical public key crypto system, such as DSA, a private key corresponds to exactly one public key. Private keys are used to compute signatures. .TP 3 Entity -An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree. -.RE - .LP +An entity is a person, organization, program, computer, business, bank, or something else you are trusting to some degree. +.RE .LP Basically, public key cryptography requires access to users' public keys. In a large\-scale networked environment it is impossible to guarantee that prior relationships between communicating entities have been established or that a trusted repository exists with all used public keys. Certificates were invented as a solution to this public key distribution problem. Now a \f2Certification Authority\fP (CA) can act as a trusted third party. CAs are entities (for example, businesses) that are trusted to sign (issue) certificates for other entities. It is assumed that CAs will only create valid and reliable certificates, as they are bound by legal agreements. There are many public Certification Authorities, such as .na @@ -1407,26 +1383,22 @@ http://www.thawte.com/, .na \f2Entrust\fP @ .fi -http://www.entrust.com/, and so on. You can also run your own Certification Authority using products such as the Netscape/Microsoft Certificate Servers or the Entrust CA product for your organization. -.LP +http://www.entrust.com/, 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. .LP -Using \f3keytool\fP, it is possible to display, import, and export certificates. It is also possible to generate self\-signed certificates. +Using \f3keytool\fP, it is possible to display, import, and export certificates. It is also possible to generate self\-signed certificates. .LP -.LP -\f3keytool\fP currently handles X.509 certificates. -.LP -.RE +\f3keytool\fP currently handles X.509 certificates. .TP 2 o \f3X.509 Certificates\fP -.RS 3 -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 using two related standards called ASN.1/DER. \f2Abstract Syntax Notation 1\fP describes data. The \f2Definite Encoding Rules\fP describe a single way to store and transfer that data. .LP -All X.509 certificates have the following data, in addition to the signature: +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 using two related standards called ASN.1/DER. \f2Abstract Syntax Notation 1\fP describes data. The \f2Definite Encoding Rules\fP describe a single way to store and transfer that data. .LP +All X.509 certificates have the following data, in addition to the signature: .RS 3 .TP 3 Version +.LP 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. \f3keytool\fP can import and export v1, v2, and v3 certificates. It generates v3 certificates. .LP \f2X.509 Version 1\fP has been available since 1988, is widely deployed, and is the most generic. @@ -1436,475 +1408,86 @@ This identifies which version of the X.509 standard applies to this certificate, \f2X.509 Version 3\fP is the most recent (1996) and supports the notion of extensions, whereby anyone can define an extension and include it in the certificate. Some common extensions in use today are: \f2KeyUsage\fP (limits the use of the keys to particular purposes such as "signing\-only") and \f2AlternativeNames\fP (allows other identities to also be associated with this public key, e.g. DNS names, Email addresses, IP addresses). Extensions can be marked \f2critical\fP to indicate that the extension should be checked and enforced/used. For example, if a certificate has the KeyUsage extension marked critical and set to "keyCertSign" then if this certificate is presented during SSL communication, it should be rejected, as the certificate extension indicates that the associated private key should only be used for signing certificates and not for SSL use. .TP 3 Serial Number -The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL). +.LP +The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. This information is used in numerous ways, for example when a certificate is revoked its serial number is placed in a Certificate Revocation List (CRL). .TP 3 Signature Algorithm Identifier -This identifies the algorithm used by the CA to sign the certificate. +.LP +This identifies the algorithm used by the CA to sign the certificate. .TP 3 Issuer Name -The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as \f2root or top\-level\fP CA certificates, the issuer signs its own certificate.) +.LP +The X.500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. (Note that in some cases, such as \f2root or top\-level\fP CA certificates, the issuer signs its own certificate.) .TP 3 Validity Period -Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised. +.LP +Each certificate is valid only for a limited amount of time. This period is described by a start date and time and an end date and time, and can be as short as a few seconds or almost as long as a century. The validity period chosen depends on a number of factors, such as the strength of the private key used to sign the certificate or the amount one is willing to pay for a certificate. This is the expected period that entities can rely on the public value, if the associated private key has not been compromised. .TP 3 Subject Name +.LP The name of the entity whose public key the certificate identifies. This name uses the X.500 standard, so it is intended to be unique across the Internet. This is the X.500 Distinguished Name (DN) of the entity, for example, .nf \f3 .fl - CN=Java Duke, OU=Java Software Division, O=Sun Microsystems Inc, C=US + CN=Java Duke, OU=Java Software Division, O=Oracle Corporation, C=US .fl \fP .fi -(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.) +.LP +(These refer to the subject's Common Name, Organizational Unit, Organization, and Country.) .TP 3 Subject Public Key Information -This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters. -.RE - .LP +This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters. .RE .TP 2 o \f3Certificate Chains\fP -.RS 3 -.LP -\f3keytool\fP 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 corresponding to the private key. -.LP -.LP -When keys are first generated (see the \-genkeypair command), the chain starts off containing a single element, a \f2self\-signed certificate\fP. A self\-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the \f2\-genkeypair\fP command is called to generate a new public/private key pair, it also wraps the public key into a self\-signed certificate. -.LP .LP -Later, after a Certificate Signing Request (CSR) has been generated (see the \-certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see \-importcert), 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's public key. The next certificate in the chain is one that authenticates the \f2CA\fP's public key. +\f3keytool\fP 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 corresponding to the private key. .LP +When keys are first generated (see the \-genkeypair command), the chain starts off containing a single element, a \f2self\-signed certificate\fP. A self\-signed certificate is one for which the issuer (signer) is the same as the subject (the entity whose public key is being authenticated by the certificate). Whenever the \f2\-genkeypair\fP command is called to generate a new public/private key pair, it also wraps the public key into a self\-signed certificate. .LP -In many cases, this is a self\-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may 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 entry), but the second certificate in the chain is a certificate signed by a \f2different\fP CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self\-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain. +Later, after a Certificate Signing Request (CSR) has been generated (see the \-certreq command) and sent to a Certification Authority (CA), the response from the CA is imported (see \-importcert), 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's public key. The next certificate in the chain is one that authenticates the \f2CA\fP's public key. .LP +In many cases, this is a self\-signed certificate (that is, a certificate from the CA authenticating its own public key) and the last certificate in the chain. In other cases, the CA may 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 entry), but the second certificate in the chain is a certificate signed by a \f2different\fP CA, authenticating the public key of the CA you sent the CSR to. Then, the next certificate in the chain will be a certificate authenticating the second CA's key, and so on, until a self\-signed "root" certificate is reached. Each certificate in the chain (after the first) thus authenticates the public key of the signer of the previous certificate in the chain. .LP -Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore. +Many CAs only return the issued certificate, with no supporting chain, especially when there is a flat hierarchy (no intermediates CAs). In this case, the certificate chain must be established from trusted certificate information already stored in the keystore. .LP +A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by \f3keytool\fP. .LP -A different reply format (defined by the PKCS#7 standard) also includes the supporting certificate chain, in addition to the issued certificate. Both reply formats can be handled by \f3keytool\fP. -.LP -.LP -The top\-level (root) CA certificate is self\-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self\-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. 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's public key. Before you add the root CA certificate to your keystore, you should view it (using the \f2\-printcert\fP option) and compare the displayed fingerprint with the well\-known fingerprint (obtained from a newspaper, the root CA's webpage, etc.). -.LP -.RE +The top\-level (root) CA certificate is self\-signed. However, the trust into the root's public key does not come from the root certificate itself (anybody could generate a self\-signed certificate with the distinguished name of say, the VeriSign root CA!), but from other sources like a newspaper. 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's public key. Before you add the root CA certificate to your keystore, you should view it (using the \f2\-printcert\fP option) and compare the displayed fingerprint with the well\-known fingerprint (obtained from a newspaper, the root CA's Web page, etc.). .TP 2 o \f3The cacerts Certificates File\fP -.RS 3 -.LP -A certificates file named \f3"cacerts"\fP resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). .LP +A certificates file named \f3"cacerts"\fP resides in the security properties directory, \f2java.home\fP/lib/security, where \f2java.home\fP is the runtime environment's directory (the \f2jre\fP directory in the SDK or the top\-level directory of the Java 2 Runtime Environment). .LP -The "cacerts" file represents a system\-wide keystore with CA certificates. System administrators can configure and manage that file using \f3keytool\fP, specifying "jks" as the keystore type. The "cacerts" keystore file ships with several root CA certificates with the following aliases and X.500 owner distinguished names: -.LP -.RS 3 -.TP 2 -* -\f3Alias\fP: thawtepersonalfreemailca -.br -\f3Owner DN\fP: EmailAddress=personal\-freemail@thawte.com, -.br -CN=Thawte Personal Freemail CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawtepersonalbasicca -.br -\f3Owner DN\fP: EmailAddress=personal\-basic@thawte.com, -.br -CN=Thawte Personal Basic CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawtepersonalpremiumca -.br -\f3Owner DN\fP: EmailAddress=personal\-premium@thawte.com, -.br -CN=Thawte Personal Premium CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawteserverca -.br -\f3Owner DN\fP: EmailAddress=server\-certs@thawte.com, -.br -CN=Thawte Server CA, OU=Certification Services Division, -.br -O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: thawtepremiumserverca -.br -\f3Owner DN\fP: EmailAddress=premium\-server@thawte.com, -.br -CN=Thawte Premium Server CA, -.br -OU=Certification Services Division, -.br -O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA -.TP 2 -* -\f3Alias\fP: verisignclass1ca -.br -\f3Owner DN\fP: OU=Class 1 Public Primary Certification Authority, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass2ca -.br -\f3Owner DN\fP: OU=Class 2 Public Primary Certification Authority, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass3ca -.br -\f3Owner DN\fP: OU=Class 3 Public Primary Certification Authority, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignserverca -.br -\f3Owner DN\fP: OU=Secure Server Certification Authority, -.br -O="RSA Data Security, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass1g2ca -.br -\f3Owner DN\fP: OU=VeriSign Trust Network, -.br -OU="(c) 1998 VeriSign, Inc. \- For authorized use only", -.br -OU=Class 1 Public Primary Certification Authority \- G2, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass1g3ca -.br -\f3Owner DN\fP: CN=VeriSign Class 1 Public Primary Certification Authority \- G3, OU="(c) 1999 VeriSign, Inc. \- For authorized use only", -.br -OU=VeriSign Trust Network, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass2g2ca -.br -\f3Owner DN\fP: OU=VeriSign Trust Network, -.br -OU="(c) 1998 VeriSign, Inc. \- For authorized use only", -.br -OU=Class 2 Public Primary Certification Authority \- G2, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass2g3ca -.br -\f3Owner DN\fP: CN=VeriSign Class 2 Public Primary Certification Authority \- G3, -.br -OU="(c) 1999 VeriSign, Inc. \- For authorized use only", -.br -OU=VeriSign Trust Network, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass3g2ca -.br -\f3Owner DN\fP: OU=VeriSign Trust Network, -.br -OU="(c) 1998 VeriSign, Inc. \- For authorized use only", -.br -OU=Class 3 Public Primary Certification Authority \- G2, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: verisignclass3g3ca -.br -\f3Owner DN\fP: CN=VeriSign Class 3 Public Primary Certification Authority \- G3, -.br -OU="(c) 1999 VeriSign, Inc. \- For authorized use only", -.br -OU=VeriSign Trust Network, -.br -O="VeriSign, Inc.", C=US -.TP 2 -* -\f3Alias\fP: baltimorecodesigningca -.br -\f3Owner DN\fP: CN=Baltimore CyberTrust Code Signing Root, -.br -OU=CyberTrust, O=Baltimore, C=IE -.TP 2 -* -\f3Alias\fP: gtecybertrustglobalca -.br -\f3Owner DN\fP: CN=GTE CyberTrust Global Root, -.br -OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US -.TP 2 -* -\f3Alias\fP: baltimorecybertrustca -.br -\f3Owner DN\fP: CN=Baltimore CyberTrust Root, -.br -OU=CyberTrust, O=Baltimore, C=IE -.TP 2 -* -\f3Alias\fP: gtecybertrust5ca -.br -\f3Owner DN\fP: CN=GTE CyberTrust Root 5, -.br -OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US -.TP 2 -* -\f3Alias\fP: entrustclientca -.br -\f3Owner DN\fP: CN=Entrust.net Client Certification Authority, -.br -OU=(c) 1999 Entrust.net Limited, -.br -OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., -.br -O=Entrust.net, C=US -.TP 2 -* -\f3Alias\fP: entrustglobalclientca -.br -\f3Owner DN\fP: CN=Entrust.net Client Certification Authority, -.br -OU=(c) 2000 Entrust.net Limited, -.br -OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), -.br -O=Entrust.net -.TP 2 -* -\f3Alias\fP: entrust2048ca -.br -\f3Owner DN\fP: CN=Entrust.net Certification Authority (2048), -.br -OU=(c) 1999 Entrust.net Limited, -.br -OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), -.br -O=Entrust.net -.TP 2 -* -\f3Alias\fP: entrustsslca -.br -\f3Owner DN\fP: CN=Entrust.net Secure Server Certification Authority, -.br -OU=(c) 1999 Entrust.net Limited, -.br -OU=www.entrust.net/CPS incorp. by ref. (limits liab.), -.br -O=Entrust.net, C=US -.TP 2 -* -\f3Alias\fP: entrustgsslca -.br -\f3Owner DN\fP: CN=Entrust.net Secure Server Certification Authority, -.br -OU=(c) 2000 Entrust.net Limited, -.br -OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), -.br -O=Entrust.net -.TP 2 -* -\f3Alias\fP: godaddyclass2ca -.br -\f3Owner DN\fP: OU=Go Daddy Class 2 Certification Authority, -.br -O="The Go Daddy Group, Inc.", C=US -.TP 2 -* -\f3Alias\fP: starfieldclass2ca -.br -\f3Owner DN\fP: OU=Starfield Class 2 Certification Authority, -.br -O="Starfield Technologies, Inc.", C=US -.TP 2 -* -\f3Alias\fP: valicertclass2ca -.br -\f3Owner DN\fP: EMAILADDRESS=info@valicert.com, -.br -CN=http://www.valicert.com/, -.br -OU=ValiCert Class 2 Policy Validation Authority, -.br -O="ValiCert, Inc.", L=ValiCert Validation Network -.TP 2 -* -\f3Alias\fP: geotrustglobalca -.br -\f3Owner DN\fP: CN=GeoTrust Global CA, -.br -O=GeoTrust Inc., C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureca -.br -\f3Owner DN\fP: OU=Equifax Secure Certificate Authority, -.br -O=Equifax, C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureebusinessca1 -.br -\f3Owner DN\fP: CN=Equifax Secure eBusiness CA\-1, -.br -O=Equifax Secure Inc., C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureebusinessca2 -.br -\f3Owner DN\fP: OU=Equifax Secure eBusiness CA\-2, -.br -O=Equifax Secure, C=US -.TP 2 -* -\f3Alias\fP: equifaxsecureglobalebusinessca1 -.br -\f3Owner DN\fP: CN=Equifax Secure Global eBusiness CA\-1, -.br -O=Equifax Secure Inc., C=US -.TP 2 -* -\f3Alias\fP: soneraclass1ca -.br -\f3Owner DN\fP: CN=Sonera Class1 CA, O=Sonera, C=FI -.TP 2 -* -\f3Alias\fP: soneraclass2ca -.br -\f3Owner DN\fP: CN=Sonera Class2 CA, O=Sonera, C=FI -.TP 2 -* -\f3Alias\fP: comodoaaaca -.br -\f3Owner DN\fP: CN=AAA Certificate Services, -.br -O=Comodo CA Limited, L=Salford, ST=Greater Manchester, C=GB -.TP 2 -* -\f3Alias\fP: addtrustclass1ca -.br -\f3Owner DN\fP: CN=AddTrust Class 1 CA Root, -.br -OU=AddTrust TTP Network, O=AddTrust AB, C=SE -.TP 2 -* -\f3Alias\fP: addtrustexternalca -.br -\f3Owner DN\fP: CN=AddTrust External CA Root, -.br -OU=AddTrust External TTP Network, O=AddTrust AB, C=SE -.TP 2 -* -\f3Alias\fP: addtrustqualifiedca -.br -\f3Owner DN\fP: CN=AddTrust Qualified CA Root, -.br -OU=AddTrust TTP Network, O=AddTrust AB, C=SE -.TP 2 -* -\f3Alias\fP: utnuserfirsthardwareca -.br -\f3Owner DN\fP: CN=UTN\-USERFirst\-Hardware, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.TP 2 -* -\f3Alias\fP: utnuserfirstclientauthemailca -.br -\f3Owner DN\fP: CN=UTN\-USERFirst\-Client Authentication and Email, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.TP 2 -* -\f3Alias\fP: utndatacorpsgcca -.br -\f3Owner DN\fP: CN=UTN \- DATACorp SGC, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.TP 2 -* -\f3Alias\fP: utnuserfirstobjectca -.br -\f3Owner DN\fP: CN=UTN\-USERFirst\-Object, -.br -OU=http://www.usertrust.com, O=The USERTRUST Network, -.br -L=Salt Lake City, ST=UT, C=US -.RE - -.LP -.LP -The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the SDK. -.LP -.RS 3 - -.LP - -.LP -\f3IMPORTANT: Verify Your \fP\f4cacerts\fP\f3 File\fP -.br - -.LP -Since you trust the CAs in the \f2cacerts\fP file as entities for signing and issuing certificates to other entities, you must manage the \f2cacerts\fP file carefully. The \f2cacerts\fP file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the \f2cacerts\fP file and make your own trust decisions. To remove an untrusted CA certificate from the \f2cacerts\fP file, use the delete option of the \f2keytool\fP command. You can find the \f2cacerts\fP file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file. -.br - +The "cacerts" file represents a system\-wide keystore with CA certificates. System administrators can configure and manage that file using \f3keytool\fP, specifying "jks" as the keystore type. The "cacerts" keystore file ships with a default set of root CA certificates; list them with the following command: +.nf +\f3 +.fl +keytool \-list \-keystore \fP\f4java.home\fP\f3/lib/security/cacerts +.fl +\fP +.fi .LP -.RE - +The initial password of the "cacerts" keystore file is "changeit". System administrators should change that password and the default access permission of that file upon installing the SDK. .LP -.RE +\f3IMPORTANT: Verify Your \fP\f4cacerts\fP\f3 File\fP: Since you trust the CAs in the \f2cacerts\fP file as entities for signing and issuing certificates to other entities, you must manage the \f2cacerts\fP file carefully. The \f2cacerts\fP file should contain only certificates of the CAs you trust. It is your responsibility to verify the trusted root CA certificates bundled in the \f2cacerts\fP file and make your own trust decisions. To remove an untrusted CA certificate from the \f2cacerts\fP file, use the delete option of the \f2keytool\fP command. You can find the \f2cacerts\fP file in the JRE installation directory. Contact your system administrator if you do not have permission to edit this file. .TP 2 o \f3The Internet RFC 1421 Certificate Encoding Standard\fP -.RS 3 -.LP -Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism. -.LP -.LP -Certificates read by the \f2\-importcert\fP and \f2\-printcert\fP commands can be in either this format or binary encoded. -.LP -.LP -The \f2\-exportcert\fP command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the \f2\-rfc\fP option is specified. .LP +Certificates are often stored using the printable encoding format defined by the Internet RFC 1421 standard, instead of their binary encoding. This certificate format, also known as "Base 64 encoding", facilitates exporting certificates to other applications by email or through some other mechanism. .LP -The \f2\-list\fP command by default prints the SHA1 fingerprint of a certificate. If the \f2\-v\fP option is specified, the certificate is printed in human\-readable format, while if the \f2\-rfc\fP option is specified, the certificate is output in the printable encoding format. +Certificates read by the \f2\-importcert\fP and \f2\-printcert\fP commands can be in either this format or binary encoded. .LP +The \f2\-exportcert\fP command by default outputs a certificate in binary encoding, but will instead output a certificate in the printable encoding format, if the \f2\-rfc\fP option is specified. .LP -In its printable encoding format, the encoded certificate is bounded at the beginning by +The \f2\-list\fP command by default prints the SHA1 fingerprint of a certificate. If the \f2\-v\fP option is specified, the certificate is printed in human\-readable format, while if the \f2\-rfc\fP option is specified, the certificate is output in the printable encoding format. .LP +In its printable encoding format, the encoded certificate is bounded at the beginning by .nf \f3 .fl @@ -1912,11 +1495,8 @@ In its printable encoding format, the encoded certificate is bounded at the begi .fl \fP .fi - -.LP -.LP -and at the end by .LP +and at the end by .nf \f3 .fl @@ -1925,23 +1505,21 @@ and at the end by \fP .fi .RE -.RE .LP .SS X.500 Distinguished Names .LP -.RS 3 - .LP -X.500 Distinguished Names are used to identify entities, such as those which are named by the \f2subject\fP and \f2issuer\fP (signer) fields of X.509 certificates. \f3keytool\fP supports the following subparts: +X.500 Distinguished Names are used to identify entities, such as those which are named by the \f2subject\fP and \f2issuer\fP (signer) fields of X.509 certificates. \f3keytool\fP supports the following subparts: +.LP .RS 3 .TP 2 o \f2commonName\fP \- common name of a person, e.g., "Susan Jones" .TP 2 o -\f2organizationUnit\fP \- small organization (e.g, department or division) name, e.g., "Purchasing" +\f2organizationUnit\fP \- small organization (e.g., department or division) name, e.g., "Purchasing" .TP 2 o \f2organizationName\fP \- large organization name, e.g., "ABCSystems, Inc." @@ -1975,7 +1553,7 @@ where all the italicized items represent actual values and the above keywords ar .nf \f3 .fl - CN=commonName + CN=commonName .fl OU=organizationUnit .fl @@ -1997,17 +1575,19 @@ A sample distinguished name string is .nf \f3 .fl -CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US +CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US .fl \fP .fi .LP -and a sample command using such a string is +.LP +and a sample command using such a string is +.LP .nf \f3 .fl -keytool \-genkeypair \-dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, +keytool \-genkeypair \-dname "CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, .fl S=California, C=US" \-alias mark .fl @@ -2024,7 +1604,7 @@ Order matters; each subcomponent must appear in the designated order. However, i .nf \f3 .fl -CN=Steve Meier, OU=SunSoft, O=Sun, C=US +CN=Steve Meier, OU=Java, O=Oracle, C=US .fl \fP .fi @@ -2036,7 +1616,7 @@ If a distinguished name string value contains a comma, the comma must be escaped .nf \f3 .fl - cn=peter schuster, o=Sun Microsystems\\, Inc., o=sun, c=us + cn=Peter Schuster, ou=Java\\, Product Development, o=Oracle, c=US .fl \fP .fi @@ -2045,14 +1625,12 @@ If a distinguished name string value contains a comma, the comma must be escaped .LP It is never necessary to specify a distinguished name string on a command line. If it 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 does not need to be escaped by a "\\". .LP -.RE .SS WARNING Regarding Importing Trusted Certificates .LP -.RS 3 - .LP -IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate! +IMPORTANT: Be sure to check a certificate very carefully before importing it as a trusted certificate! +.LP .LP View it first (using the \f2\-printcert\fP command, or the \f2\-importcert\fP command without the \f2\-noprompt\fP option), and make sure that the displayed certificate fingerprint(s) match the expected ones. For example, suppose someone sends or emails you a certificate, and you put it in a file named \f2/tmp/cert\fP. Before you consider adding the certificate to your list of trusted certificates, you can execute a \f2\-printcert\fP command to view its fingerprints, as in .LP @@ -2083,16 +1661,14 @@ View it first (using the \f2\-printcert\fP command, or the \f2\-importcert\fP co .fi .LP -Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside). +.LP +Then call or otherwise contact the person who sent the certificate, and compare the fingerprint(s) that you see with the ones that they show. Only if the fingerprints are equal is it guaranteed that the certificate has not been replaced in transit with somebody else's (for example, an attacker's) certificate. If such an attack took place, and you did not check the certificate before you imported it, you would end up trusting anything the attacker has signed (for example, a JAR file with malicious class files inside). +.LP .LP Note: it is not required that you execute a \f2\-printcert\fP command prior to importing a certificate, since before adding a certificate to the list of trusted certificates in the keystore, the \f2\-importcert\fP command prints out the certificate information and prompts you to verify it. You then have the option of aborting the import operation. Note, however, this is only the case if you invoke the \f2\-importcert\fP command without the \f2\-noprompt\fP option. If the \f2\-noprompt\fP option is given, there is no interaction with the user. .LP -.RE .SS Warning Regarding Passwords -.LP -.RS 3 - .LP .LP Most commands operating on a keystore require the store password. Some commands require a private/secret key password. @@ -2103,12 +1679,8 @@ Passwords can be specified on the command line (in the \f2\-storepass\fP and \f2 .LP If you don't specify a required password option on a command line, you will be prompted for it. .LP -.RE .SS Warning Regarding Certificate Conformance -.LP -.RS 3 - .LP .LP The Internet standard @@ -2117,38 +1689,30 @@ The Internet standard .fi http://tools.ietf.org/rfc/rfc5280.txt has defined a profile on conforming X.509 certificates, which includes what values and value combinations are valid for certificate fields and extensions. \f3keytool\fP has not enforced all these rules so it can generate certificates which do not conform to the standard, and these certificates might be rejected by JRE or other applications. Users should make sure that they provide the correct options for \f2\-dname\fP, \f2\-ext\fP, etc. .LP -.RE .SH "SEE ALSO" -.LP - .LP .RS 3 .TP 2 o -.LP -jar(1) tool documentation +jar(1) tool documentation .TP 2 o -.LP -jarsigner(1) tool documentation +jarsigner(1) tool documentation .TP 2 o -.LP the .na \f4Security\fP @ .fi -http://java.sun.com/docs/books/tutorial/security/index.html trail of the +http://download.oracle.com/javase/tutorial/security/index.html trail of the .na \f4Java Tutorial\fP @ .fi -http://java.sun.com/docs/books/tutorial for examples of the use of \f3keytool\fP +http://download.oracle.com/javase/tutorial/ for examples of the use of \f3keytool\fP .RE .LP .SH "CHANGES" -.LP - .LP .LP The command interface for keytool changed in Java SE 6. @@ -2184,19 +1748,19 @@ o .na \f2\-keyclone\fP @ .fi -http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#keycloneCmd +http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#keycloneCmd .TP 2 o .na \f2\-identitydb\fP @ .fi -http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#identitydbCmd +http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#identitydbCmd .TP 2 o .na \f2\-selfcert\fP @ .fi -http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#selfcertCmd +http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#selfcertCmd .RE .LP diff --git a/src/solaris/doc/sun/man/man1/native2ascii.1 b/src/solaris/doc/sun/man/man1/native2ascii.1 index f455eaf01f308bb7304838c73eb21224370169a2..54beff1d0ab83ce5e7664b151377b5728f191d8e 100644 --- a/src/solaris/doc/sun/man/man1/native2ascii.1 +++ b/src/solaris/doc/sun/man/man1/native2ascii.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH native2ascii 1 "02 Jun 2010" +.TH native2ascii 1 "10 May 2011" .LP .SH "Name" native2ascii \- Native\-to\-ASCII Converter -.LP -.RS 3 - .LP .LP -Converts a file with native\-encoded characters (characters which are non\-Latin 1 and non\-Unicode) to one with Unicode\-encoded characters. +Converts a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes, or visa versa. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -45,32 +39,30 @@ Converts a file with native\-encoded characters (characters which are non\-Latin .LP .SH "DESCRIPTION" -.LP - .LP .LP -The Java compiler and other Java tools can only process files which contain Latin\-1 and/or Unicode\-encoded (\\udddd notation) characters. \f2native2ascii\fP converts files which contain other character encodings into files containing Latin\-1 and/or Unicode\-encoded charaters. +\f2native2ascii\fP converts files that are encoded to any character encoding that is supported by the Java runtime environment to files encoded in ASCII, using Unicode escapes ("\\uxxxx" notation) for all characters that are not part of the ASCII character set. This process is required for properties files containing characters not in ISO\-8859\-1 character sets. The tool can also perform the reverse conversion. .LP .LP If \f2outputfile\fP is omitted, standard output is used for output. If, in addition, \f2inputfile\fP is omitted, standard input is used for input. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 \-reverse -Perform the reverse operation: convert a file with Latin\-1 and/or Unicode encoded characters to one with native\-encoded characters. +Perform the reverse operation: Convert a file encoded in ISO\-8859\-1 with Unicode escapes to a file in any character encoding supported by the Java runtime environment. .br .br .TP 3 \-encoding encoding_name -Specify the encoding name which is used by the conversion procedure. The default encoding is taken from System property \f2file.encoding\fP. The \f2encoding_name\fP string must be taken from the first column of the table of supported encodings in the +Specifies the name of the character encoding to be used by the conversion procedure. If this option is not present, the default character encoding (as determined by the \f2java.nio.charset.Charset.defaultCharset\fP method) is used. The \f2encoding_name\fP string must be the name of a character encoding that is supported by the Java runtime environment \- see the .na \f4Supported Encodings\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html document. +http://download.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html document. +.br +.br .TP 3 \-Joption Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. diff --git a/src/solaris/doc/sun/man/man1/orbd.1 b/src/solaris/doc/sun/man/man1/orbd.1 index 0c2b5bbbe3060a07b182eef334c5df9c3989ac1c..108ad9e1ce2eede9c9c400a360f4da697490c84d 100644 --- a/src/solaris/doc/sun/man/man1/orbd.1 +++ b/src/solaris/doc/sun/man/man1/orbd.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,14 +19,11 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH orbd 1 "02 Jun 2010" +.TH orbd 1 "10 May 2011" .LP .SH "Name" orbd \- The Object Request Broker Daemon -.LP -.RS 3 - .LP .LP \f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. @@ -36,12 +33,9 @@ orbd \- The Object Request Broker Daemon .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -53,8 +47,6 @@ orbd <\fP\f3options\fP\f3> .LP .SH "DESCRIPTION" -.LP - .LP .LP The Server Manager included with the \f3orbd\fP tool is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. The persistent servers, while publishing the persistent object references in the Naming Service, include the port number of the ORBD in the object reference instead of the port number of the Server. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages: @@ -77,7 +69,7 @@ When \f2orbd\fP starts up, it also starts a naming service. For more information .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html. .LP .SH "OPTIONS" .LP @@ -141,11 +133,11 @@ A Naming Service is a CORBA service that allows .na \f2CORBA objects\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The .na \f2name binding\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference. .LP .LP Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service. @@ -224,7 +216,7 @@ For more information on the Naming Service included with ORBD, see .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html. .LP .SH "Server Manager" .LP @@ -239,7 +231,7 @@ Using the .na \f2sample tutorial\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application: +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application: .LP .LP Start \f2orbd\fP. @@ -362,7 +354,7 @@ o .na \f2Naming Service\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html .br .TP 2 o diff --git a/src/solaris/doc/sun/man/man1/pack200.1 b/src/solaris/doc/sun/man/man1/pack200.1 index 299a96f5a22b5d986c889ee558793f1cfe172c22..8f34d6dd51a51982d962dded9a7e98a9c4bd173f 100644 --- a/src/solaris/doc/sun/man/man1/pack200.1 +++ b/src/solaris/doc/sun/man/man1/pack200.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,24 +19,19 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH pack200 1 "02 Jun 2010" +.TH pack200 1 "10 May 2011" .LP .SH "Name" pack200 \- JAR Packing tool .LP .SH "SYNOPSIS" -.LP - .LP .LP \f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP .LP .LP Options may be in any order. The last option on the command line or in a properties file supersedes all previously specified options. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -51,10 +46,7 @@ Name of the input file. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP The \f2pack200\fP tool is a Java application that transforms a JAR file into a compressed \f2pack200\fP file using the Java \f2gzip\fP compressor. The \f2pack200\fP files are highly compressed files that can be directly deployed, saving bandwidth and reducing download time. @@ -64,32 +56,20 @@ The \f2pack200\fP tool uses several options to fine\-tune and set the compressio .LP .SS Typical usage: -.LP -.RS 3 - .LP .LP \f2% pack200 myarchive.pack.gz myarchive.jar\fP .LP -.RE .LP In this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings. .LP .SH "OPTIONS" -.LP - .LP .LP \f4\-r \-\-repack\fP -.LP -.RS 3 - .LP .LP Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. The resulting file can be used as an input to the \f2jarsigner(1)\fP tool. -.LP -.RS 3 - .LP .LP \f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP @@ -97,50 +77,35 @@ Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. Th .LP \f2% pack200 \-\-repack myarchive.jar\fP .LP -.RE -.RE .LP \f4\-g \-\-no\-gzip\fP -.LP -.RS 3 - .LP .LP Produces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser. -.LP -.RS 3 - .LP .LP \f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP .LP -.RE -.RE .LP \f4\-G \-\-strip\-debug\fP -.LP -.RS 3 - .LP .LP Strips attributes used for debugging from the output. These include \f2SourceFile\fP, \f2LineNumberTable\fP, \f2LocalVariableTable\fP and \f2LocalVariableTypeTable\fP. Removing these attributes reduces the size of both downloads and installations but reduces the usefulness of debuggers. .LP -.RE .LP -\f4\-O \-\-no\-keep\-file\-order\fP +\f4\-\-keep\-file\-order\fP .LP -.RS 3 - +.LP +Preserve the order of files in the input file; this is the default behavior. +.LP +.LP +\f4\-O \-\-no\-keep\-file\-order\fP .LP .LP The packer will reorder and transmit all elements. Additionally, the packer may remove JAR directory names. This will reduce the download size; however, certain JAR file optimizations, such as indexing, may not work correctly. .LP -.RE .LP \f4\-Svalue \-\-segment\-limit=\fP\f2value\fP -.LP -.RS 3 - .LP .LP The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires @@ -151,17 +116,13 @@ more than N bytes, it will be given its own archive segment. As a special case, The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties. .LP .LP -The default is \f21000000\fP (a million bytes). This allows input JAR files of moderate size to be transmitted in one segment. It also puts a limit on memory requirements for packers and unpackers. +The default is \-1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs. .LP .LP A 10MB JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit). .LP -.RE .LP \f4\-Evalue \-\-effort=\fP\f2value\fP -.LP -.RS 3 - .LP .LP If the value is set to a single decimal digit, the packer will use the indicated amount of effort in compressing the archive. Level \f21\fP may produce somewhat larger size and faster compression speed, while level \f29\fP will take much longer but may produce better compression. The special value \f20\fP instructs the packer to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass\-through of the entire archive. @@ -169,12 +130,8 @@ If the value is set to a single decimal digit, the packer will use the indicated .LP The default is \f25\fP, investing a modest amount of time to produce reasonable compression. .LP -.RE .LP \f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP -.LP -.RS 3 - .LP .LP Overrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are: @@ -195,12 +152,8 @@ Preserve deflation hints observed in the input JAR. (This is the default.) .RE .LP -.RE .LP \f4\-mvalue \-\-modification\-time=\fP\f2value\fP -.LP -.RS 3 - .LP .LP The possible values are: @@ -215,22 +168,14 @@ Preserves modification times observed in the input JAR. (This is the default.) .RE .LP -.RE .LP \f4\-Pfile \-\-pass\-file=\fP\f2file\fP -.LP -.RS 3 - .LP .LP Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files may be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator "\f2/\fP". The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, all files under that directory will be passed. .LP -.RE .LP \f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP -.LP -.RS 3 - .LP .LP Overrides the default behavior; i.e., the classfile containing the unknown attribute will be passed through with the specified action. The possible values for actions are: @@ -248,7 +193,6 @@ Upon encountering this attribute, the entire class will be transmitted as though .RE .LP -.RE .LP \f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP .br @@ -257,9 +201,6 @@ Upon encountering this attribute, the entire class will be transmitted as though \f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP .br \f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP -.LP -.RS 3 - .LP .LP With the above four options, the attribute layout can be specified for a class entity, such as Class attribute, Field attribute, Method attribute, and Code attribute. The attribute\-name is the name of the attribute for which the layout or action is being defined. The possible values for action are: @@ -282,18 +223,11 @@ Upon encountering this attribute, the attribute will be removed from the output. .LP Example: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing this attribute to be passed through without further action by the packer. .LP -.RE .LP \f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP -.LP -.RS 3 - .LP .LP A configuration file, containing Java properties to initialize the packer, may be specified on the command line. -.LP -.RS 3 - .LP .LP \f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP @@ -317,62 +251,47 @@ A configuration file, containing Java properties to initialize the packer, may b \f2# Change the segment limit to be unlimited.\fP .br \f2segment.limit=\-1\fP -.LP -.RE -.RE -.RS 3 - .LP .LP \f4\-v \-\-verbose\fP -.LP -.RS 3 - .LP .LP Outputs minimal messages. Multiple specification of this option will output more verbose messages. .LP -.RE .LP \f4\-q \-\-quiet\fP -.LP -.RS 3 - .LP .LP Specifies quiet operation with no messages. .LP -.RE .LP \f4\-lfilename \-\-log\-file=\fP\f2filename\fP -.LP -.RS 3 - .LP .LP Specifies a log file to output messages. .LP -.RE .LP -\f4\-Joption\fP +\f4\-? \-h \-\-help\fP .LP -.RS 3 - .LP +Prints help information about this command. .LP -Passes option to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java. .LP -.RE -.RE -.SH "EXIT STATUS" +\f4\-V \-\-version\fP .LP - .LP +Prints version information about this command. .LP -The following exit values are returned: .LP -.RS 3 - +\f4\-J\fP\f2option\fP +.LP +.LP +Passes \f2option\fP to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java. +.LP +.SH "EXIT STATUS" +.LP +.LP +The following exit values are returned: .LP .LP \f2\ 0\fP for successful completion; @@ -380,7 +299,6 @@ The following exit values are returned: .LP \f2>0\fP if an error occurs. .LP -.RE .SH "SEE ALSO" .LP .RS 3 @@ -392,13 +310,13 @@ o .na \f2Java SE Documentation\fP @ .fi -http://java.sun.com/javase/6/docs/index.html +http://download.oracle.com/javase/7/docs/index.html .TP 2 o .na \f2Java Deployment Guide \- Pack200\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/pack200.html +http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html .TP 2 o jar(1) \- Java Archive Tool @@ -412,8 +330,6 @@ o .LP .SH "NOTES" -.LP - .LP .LP This command should not be confused with \f2pack(1)\fP. They are distinctly separate products. diff --git a/src/solaris/doc/sun/man/man1/policytool.1 b/src/solaris/doc/sun/man/man1/policytool.1 index 5d339637f3977b030600614120dab4a21f6482e6..8fd33bcdbf427c324934bfe34f3e4aa62546a68c 100644 --- a/src/solaris/doc/sun/man/man1/policytool.1 +++ b/src/solaris/doc/sun/man/man1/policytool.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH policytool 1 "02 Jun 2010" +.TH policytool 1 "10 May 2011" .LP .SH "Name" @@ -27,8 +27,6 @@ policytool \- PolicyTool Administration GUI Utility .LP \f3policytool\fP reads and writes a plain text policy file based on user input via the utility GUI. .SH "SYNOPSIS" -.LP - .LP .RS 3 .TP 3 @@ -57,7 +55,7 @@ The file name .na \f2the Policytool Users Guide\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyGuide.html. +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html. .SH "OPTIONS" .RS 3 .TP 3 @@ -67,22 +65,22 @@ Loads \f2filename\fP. .na \f2Default Policy Implementation and Syntax\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html .br .na \f2Policy Tool Users' Guide\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyGuide.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html .br .na \f2Security Permissions\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/permissions.html .br .na \f2Security Overview\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/security/overview/jsoverview.html +http://download.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html .br .RE .RE diff --git a/src/solaris/doc/sun/man/man1/rmic.1 b/src/solaris/doc/sun/man/man1/rmic.1 index ffe0b1c04fcdbcf013bf6d7afd89ee06bfeb20a9..95f166206f2506fe8ba158533c6d3a29da30a9ea 100644 --- a/src/solaris/doc/sun/man/man1/rmic.1 +++ b/src/solaris/doc/sun/man/man1/rmic.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH rmic 1 "02 Jun 2010" +.TH rmic 1 "10 May 2011" .LP .SH "Name" rmic \- The Java RMI Compiler -.LP -.RS 3 - .LP .LP \f3rmic\fP generates stub, skeleton, and tie classes for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,8 +40,6 @@ rmic [ \fP\f3options\fP\f3 ] \fP\f4package\-qualified\-class\-name(s)\fP\f3 .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3rmic\fP compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface \f2java.rmi.Remote\fP. The class names in the \f3rmic\fP command must be for classes that have been compiled successfully with the \f3javac\fP command and must be fully package qualified. For example, running \f3rmic\fP on the class file name \f2HelloImpl\fP as shown here: @@ -80,8 +72,6 @@ By default, \f3rmic\fP generates stub classes that use the 1.2 JRMP stub protoco A stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built\-in operators for casting and type checking. For IIOP, the \f2PortableRemoteObject.narrow\fP method must be used. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -90,9 +80,6 @@ Overrides location of bootstrap class files .TP 3 \-classpath path Specifies the path \f3rmic\fP uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is: -.RS 3 - -.LP .nf \f3 .fl @@ -100,11 +87,7 @@ Specifies the path \f3rmic\fP uses to look up classes. This option overrides the .fl \fP .fi -.RE For example: -.RS 3 - -.LP .nf \f3 .fl @@ -112,13 +95,9 @@ For example: .fl \fP .fi -.RE .TP 3 \-d directory Specifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the command -.RS 3 - -.LP .nf \f3 .fl @@ -126,7 +105,6 @@ Specifies the root destination directory for the generated class hierarchy. You .fl \fP .fi -.RE would place the stub and skeleton classes derived from \f2MyClass\fP into the directory \f2/java/classes/foo\fP. If the \f2\-d\fP option is not specified, the default behavior is as if \f2"\-d\ ."\fP were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. (Note that in some previous versions of \f3rmic\fP, if \f2\-d\fP was not specified, then the package hierarchy was \f2not\fP created, and all of the output files were placed directly in the current directory.) .br \ @@ -136,16 +114,16 @@ Overrides location of installed extensions .TP 3 \-g Enables generation of all debugging information, including local variables. By default, only line number information is generated. -.LP .TP 3 \-idl Causes \f2rmic\fP to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language\-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the .na \f2Java Language to IDL Mapping\fP @ .fi -http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description. -.LP -When the \f2\-idl\fP option is used, other options also include: +http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description. +.br +.br +When the \f2\-idl\fP option is used, other options also include: .RS 3 .TP 3 \-always or \-alwaysgenerate @@ -160,31 +138,22 @@ Specifies IDLEntity package mapping. For example:\ \f2\-idlModule foo.bar my::r \-idlFile\ fromJavaPackage[.class]\ toIDLFile Specifies IDLEntity file mapping. For example:\ \f2\-idlFile test.pkg.X TEST16.idl\fP.\ .RE -.LP .TP 3 \-iiop -Causes \f2rmic\fP to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class. -.LP +Causes \f2rmic\fP to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class. +.br +.br Invoking \f2rmic\fP with the \f2\-iiop\fP generates stubs and ties that conform to this naming convention: -.RS 3 - -.LP .nf \f3 .fl _<implementationName>_stub.class .fl -\fP -.br -\f3 -.fl _<interfaceName>_tie.class .fl \fP .fi -.RE -.LP -When the \f2\-iiop\fP option is used, other options also include: +When the \f2\-iiop\fP option is used, other options also include: .RS 3 .TP 3 \-always or \-alwaysgenerate @@ -197,13 +166,11 @@ Do not create stubs optimized for same\-process clients and servers. Must be used with the \f2\-idl\fP option. Prevents addition of \f2valuetype\fP methods and initializers to emitted IDL. These methods and initializers are optional for \f2valuetype\fPs, and are generated unless the \f2\-noValueMethods\fP option is specified when using the \f2\-idl\fP option. .TP 3 \-poa -Changes the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. -.LP -The \f2PortableServer\fP module for the +Changes the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. The \f2PortableServer\fP module for the .na \f2Portable Object Adapter\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf. .RE .TP 3 \-J @@ -214,18 +181,18 @@ Retains the generated \f2.java\fP source files for the stub, skeleton, and/or ti .TP 3 \-nowarn Turns off warnings. If used the compiler does not print out any warnings. -.LP +.TP 3 +\-nowrite +Does not write compiled classes to the file system. .TP 3 \-vcompat Generates stub and skeleton classes compatible with both the 1.1 and 1.2 JRMP stub protocol versions. (This option was the default in releases prior to 5.0.) The generated stub classes will use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and will use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes will support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large in order to support both modes of operation. .TP 3 \-verbose Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded. -.LP .TP 3 \-v1.1 Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. Note that this option is only useful for generating stub classes that are serialization\-compatible with pre\-existing, statically\-deployed stub classes that were generated by the \f3rmic\fP tool from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used). -.LP .TP 3 \-v1.2 (default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated with this option because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes will not work if they are loaded into a JDK 1.1 virtual machine. @@ -233,16 +200,11 @@ Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. .LP .SH "ENVIRONMENT VARIABLES" -.LP - .LP .RS 3 .TP 3 CLASSPATH Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example, -.RS 3 - -.LP .nf \f3 .fl @@ -251,18 +213,15 @@ Used to provide the system a path to user\-defined classes. Directories are sepa \fP .fi .RE -.RE .LP .SH "SEE ALSO" -.LP - .LP .LP java(1), javac(1), .na \f2CLASSPATH\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath .LP diff --git a/src/solaris/doc/sun/man/man1/rmid.1 b/src/solaris/doc/sun/man/man1/rmid.1 index 20171febd0e026db20b798180576075fe6796588..763ee378af94f6fc196f26e71056cf30f7b5e737 100644 --- a/src/solaris/doc/sun/man/man1/rmid.1 +++ b/src/solaris/doc/sun/man/man1/rmid.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1998, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH rmid 1 "02 Jun 2010" +.TH rmid 1 "10 May 2011" .LP .SH "Name" rmid \- The Java RMI Activation System Daemon -.LP -.RS 3 - .LP .LP \f3rmid\fP starts the activation system daemon that allows objects to be registered and activated in a virtual machine (VM). .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,19 +40,17 @@ rmid [options] .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3rmid\fP tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a VM. See the .na \f2Java RMI Specification\fP @ .fi -http://java.sun.com/javase/6/docs/platform/rmi/spec/rmiTOC.html and +http://download.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.html and .na \f2Activation tutorials\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects. +http://download.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects. .LP .LP The daemon can be started by executing the \f2rmid\fP command, and specifying a security policy file, as follows: @@ -132,8 +124,6 @@ The \f2\-log\fP option is required. If this option is not specified, \f2rmid\fP See the man pages for \f2inetd\fP (Solaris) or \f2xinetd\fP (Linux) for details on how to configure services to be started on demand. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -169,7 +159,6 @@ Specifies an option that is passed to the \f2java\fP interpreter running \f2rmid .TP 3 \-J\-Dsun.rmi.activation.execPolicy=<policy> Specifies the policy that \f2rmid\fP employs to check commands and command\-line options used to launch the VM in which an activation group runs. Please note that this option exists only in Sun's implementation of the Java RMI activation daemon. If this property is not specified on the command line, the result is the same as if \f2\-J\-Dsun.rmi.activation.execPolicy=default\fP were specified. The possible values of \f2<policy>\fP can be \f2default\fP, \f2<policyClassName>\fP, or \f2none\fP: -.LP .RS 3 .TP 2 o @@ -255,19 +244,11 @@ The first permission granted allow \f2rmid\fP to execute the 1.7.0 version of th The third permission granted, an \f2ExecOptionPermission\fP, allows \f2rmid\fP to launch an activation group that defines the security policy file to be \f2/files/policies/group.policy\fP. The next permission allows the \f2java.security.debug\fP property to be used by an activation group. The last permission allows any property in the \f2sun.rmi\fP property name hierarchy to be used by activation groups. .LP To start \f2rmid\fP with a policy file, the \f2java.security.policy\fP property needs to be specified on \f2rmid\fP's command line, for example: -.RS 3 - -.LP -.LP -\f2rmid \-J\-Djava.security.policy=rmid.policy\fP .LP -.RE +\f2rmid \-J\-Djava.security.policy=rmid.policy\fP .RE .TP 2 o -.LP -.TP 2 -o \f4<policyClassName>\fP .LP If the default behavior is not flexible enough, an administrator can provide, when starting \f2rmid\fP, the name of a class whose \f2checkExecCommand\fP method is executed in order to check commands to be executed by rmid. @@ -285,7 +266,6 @@ The \f2policyClassName\fP specifies a public class with a public, no\-argument c \fP .fi Before launching an activation group, \f2rmid\fP calls the policy's \f2checkExecCommand\fP method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the \f2checkExecCommand\fP throws a \f2SecurityException\fP, \f2rmid\fP will not launch the activation group and an \f2ActivationException\fP will be thrown to the caller attempting to activate the object. -.LP .TP 2 o \f3none\fP @@ -318,9 +298,9 @@ Specifies the port \f2rmid\fP's registry uses. The activation system daemon bind \-stop Stops the current invocation of \f2rmid\fP, for a port specified by the \f2\-port\fP option. If no port is specified, it will stop the \f2rmid\fP running on port 1098. .RE -.SH "ENVIRONMENT VARIABLES" -.LP +.LP +.SH "ENVIRONMENT VARIABLES" .LP .RS 3 .TP 3 @@ -337,14 +317,12 @@ Used to provide the system a path to user\-defined classes. Directories are sepa .LP .SH "SEE ALSO" -.LP - .LP .LP rmic(1), .na \f2CLASSPATH\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath, java(1) +http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath, java(1) .LP diff --git a/src/solaris/doc/sun/man/man1/rmiregistry.1 b/src/solaris/doc/sun/man/man1/rmiregistry.1 index f3bc87b0b39735a0e662520a1fbe2daeca89332d..c94d270d623c99c80524581e230e7b436d0554ef 100644 --- a/src/solaris/doc/sun/man/man1/rmiregistry.1 +++ b/src/solaris/doc/sun/man/man1/rmiregistry.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,18 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH rmiregistry 1 "02 Jun 2010" +.TH rmiregistry 1 "10 May 2011" .LP .SH "Name" rmiregistry \- The Java Remote Object Registry .LP .RS 3 +The \f3rmiregistry\fP command starts a remote object registry on the specified port on the current host. +.RE .LP -.LP -The \f3rmiregistry\fP command starts a remote object registry on the specified port on the current host. -.LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -46,8 +42,6 @@ rmiregistry [\fP\f4port\fP\f3] .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f3rmiregistry\fP command creates and starts a remote object registry on the specified \f2port\fP on the current host. If \f2port\fP is omitted, the registry is started on port 1099. The \f3rmiregistry\fP command produces no output and is typically run in the background. For example: @@ -68,8 +62,6 @@ The methods of the \f2java.rmi.registry.LocateRegistry\fP class are used to get The URL\-based methods of the \f2java.rmi.Naming\fP class operate on a registry and can be used to look up a remote object on any host, and on the local host: bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -80,17 +72,12 @@ Used in conjunction with any \f2java\fP option, it passes the option following t .LP .SH "SEE ALSO" .LP - -.LP -.LP java(1), .na \f2java.rmi.registry.LocateRegistry\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/rmi/registry/LocateRegistry.html and +http://download.oracle.com/javase/7/docs/api/java/rmi/registry/LocateRegistry.html and .na \f2java.rmi.Naming\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/rmi/Naming.html -.LP - +http://download.oracle.com/javase/7/docs/api/java/rmi/Naming.html diff --git a/src/solaris/doc/sun/man/man1/schemagen.1 b/src/solaris/doc/sun/man/man1/schemagen.1 index f23cae2052f0804c9249875af738e235e82a661c..59c4c97ea58ae8236bf1986d8b4b7ee2f4f12ffd 100644 --- a/src/solaris/doc/sun/man/man1/schemagen.1 +++ b/src/solaris/doc/sun/man/man1/schemagen.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH schemagen 1 "02 Jun 2010" +.TH schemagen 1 "10 May 2011" .LP .SH "Name" @@ -30,8 +30,7 @@ schemagen \- Java(TM) Architecture for XML Binding Schema Generator .br \f3Implementation Version:\fP 2.1.3 .LP -.SS -Launching schemagen +.SH "Launching schemagen" .LP .LP The schema generator can be launched using the appropriate \f2schemagen\fP shell script in the \f2bin\fP directory for your platform. @@ -45,9 +44,6 @@ We also provide an Ant task to run the schema generator \- see the instructions \f2using schemagen with Ant\fP @ .fi https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html. -.LP -.RS 3 - .LP .nf \f3 @@ -58,19 +54,13 @@ Note: Writing schema1.xsd .fl \fP .fi -.RE .LP .LP If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need to be given to the tool by using the \f2\-classpath\fP/\f2\-cp\fP options. Otherwise you will see errors when generating your schema. .LP -.RS 3 - -.LP -\f3Command Line Options\fP -.LP -.RS 3 - +.SS +Command Line Options .LP .nf \f3 @@ -79,24 +69,29 @@ Usage: schemagen [\-options ...] <java files> .fl .fl -Options: +Options: +.fl + \-d <path> : specify where to place processor and javac generated class files +.fl + \-cp <path> : specify where to find user specified files +.fl + \-classpath <path> : specify where to find user specified files +.fl + \-encoding <encoding> : specify encoding to be used for apt/javac invocation .fl - \-d <path> : Specify where to place processor and javac generated class files + .fl - \-cp <path> : Specify where to find user specified files + \-episode <file> : generate episode file for separate compilation .fl - \-classpath <path> : Specify where to find user specified files + \-version : display version information .fl - \-help : Display this usage message + \-help : display this usage message .fl \fP .fi -.RE .LP -.RE -.SS -Generated Resource Files +.SH "Generated Resource Files" .LP .LP The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control the name of the generated schema files at this time. For that purpose, use @@ -105,7 +100,8 @@ The current schema generator simply creates a schema file for each namespace ref .fi https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html. .LP -.SH "See Also" +.SH "Name" +See Also .LP .RS 3 .TP 2 @@ -124,7 +120,7 @@ o .na \f2Java Architecture for XML Binding (JAXB)\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/xml/jaxb/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/xml/jaxb/index.html .RE .LP diff --git a/src/solaris/doc/sun/man/man1/serialver.1 b/src/solaris/doc/sun/man/man1/serialver.1 index 5b15b5423a81e910469e840f0cca0cdcfc737049..cb653146ba7bcb959e97c3db2ab935c354199d33 100644 --- a/src/solaris/doc/sun/man/man1/serialver.1 +++ b/src/solaris/doc/sun/man/man1/serialver.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1997, 2011, 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,22 +19,16 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH serialver 1 "02 Jun 2010" +.TH serialver 1 "10 May 2011" .LP .SH "Name" serialver \- The Serial Version Command -.LP -.RS 3 - .LP .LP The \f3serialver\fP command returns the \f2serialVersionUID\fP. .LP -.RE .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -43,9 +37,6 @@ The \f3serialver\fP command returns the \f2serialVersionUID\fP. .fl .fi -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -57,17 +48,12 @@ One or more class names .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP \f3serialver\fP returns the \f2serialVersionUID\fP for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -87,37 +73,25 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "NOTES" -.LP - .LP .LP The \f3serialver\fP command loads and initializes the specified classes in its virtual machine, and by default, it does not set a security manager. If \f3serialver\fP is to be run with untrusted classes, a security manager can be set with the following option: -.LP -.RS 3 - .LP .LP \f2\-J\-Djava.security.manager\fP .LP -.RE .LP and, if necessary, a security policy can be specified with the following option: -.LP -.RS 3 - .LP .LP \f2\-J\-Djava.security.policy=<policy file>\fP .LP -.RE .SH "SEE ALSO" -.LP - .LP .LP .na \f2java.io.ObjectStreamClass\fP @ .fi -http://java.sun.com/javase/6/docs/api/java/io/ObjectStreamClass.html +http://download.oracle.com/javase/7/docs/api/java/io/ObjectStreamClass.html .LP diff --git a/src/solaris/doc/sun/man/man1/servertool.1 b/src/solaris/doc/sun/man/man1/servertool.1 index 5606aa1b7ab9e0293cacefd29b5972d257162450..fbb0829a124f15e75714af4162ccfa891d5c2ceb 100644 --- a/src/solaris/doc/sun/man/man1/servertool.1 +++ b/src/solaris/doc/sun/man/man1/servertool.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2001, 2011, 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,20 +19,14 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH servertool 1 "02 Jun 2010" +.TH servertool 1 "10 May 2011" .LP .SH "Name" servertool \- The Java(TM) IDL Server Tool .LP -.RS 3 - -.LP -\f3servertool\fP provides a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. -.RE +\f3servertool\fP provides a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. .SH "SYNOPSIS" -.LP - .LP .nf \f3 @@ -53,15 +47,11 @@ If you enter a command when starting \f2servertool\fP, the Java IDL Server Tool The \f2\-ORBInitialPort\fP \f2nameserverport\fP option is \f3required\fP. The value for \f2nameserverport\fP must specify the port on which \f2orbd\fP is running and listening for incoming requests. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024 for the \f2nameserverport\fP. .LP .SH "DESCRIPTION" -.LP - .LP .LP The \f2servertool\fP provides the command\-line interface for the application programmers to register, unregister, startup, and shutdown a persistent server. Other commands are provided to obtain various statistical information about the server. .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -74,8 +64,6 @@ Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the .LP .SH "COMMANDS" -.LP - .LP .RS 3 .TP 3 @@ -121,7 +109,5 @@ Exit the server tool. .LP .SH "SEE ALSO" -.LP - .LP orbd(1) diff --git a/src/solaris/doc/sun/man/man1/tnameserv.1 b/src/solaris/doc/sun/man/man1/tnameserv.1 index bdafd440d25c19844d536d113f9a27a2a7152725..2279b17520e1edfca5408dac6bb80f6dc543b2a4 100644 --- a/src/solaris/doc/sun/man/man1/tnameserv.1 +++ b/src/solaris/doc/sun/man/man1/tnameserv.1 @@ -1,4 +1,4 @@ -." Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 1999, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH tnameserv 1 "02 Jun 2010" +.TH tnameserv 1 "10 May 2011" .LP .SH "Name" @@ -30,7 +30,7 @@ This document discusses using the Java IDL Transient Naming Service, \f2tnameser .na \f2Java IDL Naming Service Included with ORBD\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html topic. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html topic. .LP .LP Topics in this section include: @@ -120,11 +120,11 @@ For the client and server to find the Naming Service, they must be made aware of .na \f2The Hello World Example Using RMI\-IIOP\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/rmi\-iiop/rmiiiopexample.html. You could also use the command line options \f2\-ORBInitialPort\fP \f2nameserverport#\fP and \f2\-ORBInitialHost\fP \f2nameserverhostname\fP to tell the client and server where to find the Naming Service. +http://download.oracle.com/javase/7/docs/technotes/guides/rmi\-iiop/rmiiiopexample.html. You could also use the command line options \f2\-ORBInitialPort\fP \f2nameserverport#\fP and \f2\-ORBInitialHost\fP \f2nameserverhostname\fP to tell the client and server where to find the Naming Service. .na \f2Java IDL: Running the Hello World Example on TWO Machines\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/idl/tutorial/jidl2machines.html shows one way of doing this using the command line option. +http://download.oracle.com/javase/7/docs/technotes/guides/idl/tutorial/jidl2machines.html shows one way of doing this using the command line option. .LP .LP For example, suppose the Transient Naming Service, \f2tnameserv\fP is running on port 1050 on host \f2nameserverhost\fP. The client is running on host \f2clienthost\fP and the server is running on host \f2serverhost\fP. @@ -170,16 +170,12 @@ The \-J option .LP This command\-line option is available for use with \f2tnameserve\fP: .RS 3 - -.LP -.RS 3 .TP 3 \-Joption Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine. .RE .LP -.RE .SH "Stopping the Java\ IDL Transient Naming Service" .LP .LP @@ -190,28 +186,27 @@ To stop the Java\ IDL naming service, use the relevant operating system command, .LP The following sample program illustrates how to add names to the namespace. It is a self\-contained Transient Naming Service client that creates the following simple tree. .LP -.nf -\f3 -.fl -\fP\f3 -.fl - \fP\f4Initial\fP\f3 -.fl - \fP\f4Naming Context\fP\f3 -.fl - / \\ -.fl - / \\ -.fl - plans \fP\f4Personal\fP\f3 -.fl - / \\ -.fl - / \\ -.fl - calendar schedule\fP -.fl -.fi +.RS 3 +.TP 2 +o +\f4Initial Naming Context\fP +.RS 3 +.TP 2 +* +\f3plans\fP +.TP 2 +* +\f4Personal\fP +.RS 3 +.TP 2 +- +\f3calendar\fP +.TP 2 +- +\f3schedule\fP +.RE +.RE +.RE .LP .LP diff --git a/src/solaris/doc/sun/man/man1/unpack200.1 b/src/solaris/doc/sun/man/man1/unpack200.1 index 13ec2b19667d2e119ff956fafd5fe4fb6c892f51..ff6eb2240909a6be6e40ef3379f8db1e2347483e 100644 --- a/src/solaris/doc/sun/man/man1/unpack200.1 +++ b/src/solaris/doc/sun/man/man1/unpack200.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2004, 2011, 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,24 +19,19 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH unpack200 1 "02 Jun 2010" +.TH unpack200 1 "10 May 2011" .LP .SH "Name" unpack200 \- JAR Unpacking tool .LP .SH "SYNOPSIS" -.LP - .LP .LP \f4unpack200\fP\f2 [ \fP\f2options\fP ] \f2input\-file\fP \f2JAR\-file\fP .LP .LP Options may be in any order. The last option on the command line supersedes all previously specified options. -.LP -.RS 3 - .LP .RS 3 .TP 3 @@ -48,99 +43,71 @@ Name of the output JAR file. .RE .LP -.RE .SH "DESCRIPTION" -.LP - .LP .LP \f2unpack200\fP is a native implementation that transforms a packed file produced by \f2pack200\fP(1) into a JAR file. Typical usage: -.LP -.RS 3 - .LP .LP \f2% unpack200 myarchive.pack.gz myarchive.jar\fP .LP -.RE .LP In this example, the \f2myarchive.jar\fP is produced from \f2myarchive.pack.gz\fP using the default \f2unpack200\fP settings. .LP .SH "OPTIONS" -.LP -.SS -Standard Options -.LP -.RS 3 - .LP .LP \f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP -.LP -.RS 3 - .LP .LP Sets the deflation to be \f2true\fP, \f2false\fP, or \f2keep\fP on all entries within a JAR file. The default mode is \f2keep\fP. If \f2true\fP or \f2false\fP, overrides the default behavior and sets the deflation mode on all entries within the output JAR file. -.LP -.RE -.RE -.SS -Non\-Standard Options -.LP -.RS 3 - .LP .LP \f4\-r \-\-remove\-pack\-file\fP -.LP -.RS 3 - .LP .LP Removes the input packed file. .LP -.RE .LP \f4\-v \-\-verbose\fP -.LP -.RS 3 - .LP .LP Outputs minimal messages. Multiple specification of this option will output more verbose messages. .LP -.RE .LP \f4\-q \-\-quiet\fP -.LP -.RS 3 - .LP .LP Specifies quiet operation with no messages. .LP -.RE .LP \f4\-lfilename \-\-log\-file=\fP\f2filename\fP -.LP -.RS 3 - .LP .LP Specifies a log file to output messages. .LP -.RE -.RE -.SH "EXIT STATUS" .LP - +\f4\-? \-h \-\-help\fP .LP .LP -The following exit values are returned: +Prints help information about this command. .LP -.RS 3 - +.LP +\f4\-V \-\-version\fP +.LP +.LP +Prints version information about this command. +.LP +.LP +\f4\-J\fP\f2option\fP +.LP +.LP +Passes \f2option\fP to the Java launcher called by \f2unpack200\fP. +.LP +.SH "EXIT STATUS" +.LP +.LP +The following exit values are returned: .LP .LP \f2\ 0\fP if successful completion; @@ -148,7 +115,6 @@ The following exit values are returned: .LP \f2>0\fP if an error occurred. .LP -.RE .SH "SEE ALSO" .LP .RS 3 @@ -160,13 +126,13 @@ o .na \f2Java SE Documentation\fP @ .fi -http://java.sun.com/javase/6/docs/index.html +http://download.oracle.com/javase/7/docs/index.html .TP 2 o .na \f2Java Deployment Guide \- Pack200\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/pack200.html +http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html .TP 2 o jar(1) \- Java Archive Tool @@ -180,8 +146,6 @@ o .LP .SH "NOTES" -.LP - .LP .LP This command should not be confused with \f2unpack(1)\fP. They are distinctly separate products. diff --git a/src/solaris/doc/sun/man/man1/wsgen.1 b/src/solaris/doc/sun/man/man1/wsgen.1 index e210f1c2364a2c1f216271c4b0659ab16da8fda5..49acb9efd0720e7de519d0079b4e8bfd0798bee2 100644 --- a/src/solaris/doc/sun/man/man1/wsgen.1 +++ b/src/solaris/doc/sun/man/man1/wsgen.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,21 +19,15 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH wsgen 1 "02 Jun 2010" +.TH wsgen 1 "10 May 2011" .SH "Name" wsgen \- Java(TM) API for XML Web Services (JAX\-WS) 2.0 -.RS 3 - -.LP .LP \f3Specification Version:\fP 2.1 .br \f3Implementation Version:\fP 2.1.1 .LP -.LP The \f2wsgen\fP tool generates JAX\-WS portable artifacts used in JAX\-WS web services. The tool reads a web service endpoint implementation class (SEI) and generates all the required artifacts for web service deployment, and invocation -.LP -.RE .SH "Overview" .LP The \f2wsgen\fP tool generates JAX\-WS portable artifacts used in JAX\-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment, and invocation. JAXWS 2.1.1 RI also provides a wsgen ant task, see @@ -354,7 +348,7 @@ Used only in conjunction with the \f2\-wsdl\fP option. Used to specify a particu .nr 41 \n(80+(3*\n(38) .nr 81 +\n(41 .nr TW \n(81 -.if t .if \n(TW>\n(.li .tm Table at line 139 file Input is too wide - \n(TW units +.if t .if \n(TW>\n(.li .tm Table at line 133 file Input is too wide - \n(TW units .fc   .nr #T 0-1 .nr #a 0-1 diff --git a/src/solaris/doc/sun/man/man1/wsimport.1 b/src/solaris/doc/sun/man/man1/wsimport.1 index 6e10e4177aa37c8c874f19966e29e6d0b528f75d..424a4cb98d98ce7a5d103c7270b755ce82abec1e 100644 --- a/src/solaris/doc/sun/man/man1/wsimport.1 +++ b/src/solaris/doc/sun/man/man1/wsimport.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,7 +19,7 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH wsimport 1 "02 Jun 2010" +.TH wsimport 1 "10 May 2011" .SH "Name" wsimport \- Java(TM) API for XML Web Services (JAX\-WS) 2.0 .LP @@ -684,15 +684,296 @@ Multiple JAX\-WS and JAXB binding files can be specified using \f2\-b\fP option \f2customization documentation\fP @ .fi https://jax\-ws.dev.java.net/nonav/2.1.1/docs/customizations.html. +.LP +The following table lists \f2wsimport\fP non\-standard options: +.LP +.TS +.if \n+(b.=1 .nr d. \n(.c-\n(c.-1 +.de 35 +.ps \n(.s +.vs \n(.vu +.in \n(.iu +.if \n(.u .fi +.if \n(.j .ad +.if \n(.j=0 .na +.. +.nf +.nr #~ 0 +.if n .nr #~ 0.6n +.ds #d .d +.if \(ts\n(.z\(ts\(ts .ds #d nl +.fc +.nr 33 \n(.s +.rm 80 81 +.nr 34 \n(.lu +.eo +.am 81 +.br +.di a+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Map headers not bound to request or response message to Java method parameters. +.br +.di +.nr a| \n(dn +.nr a- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di b+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +WSDL URI that specifies the file that contains authorization information; this URI is in the following format: http://\f2<user name>\fP:\f2<password>\fP@\f2<host name>\fP/\f2<Web service name>\fP?wsdl +.br +.di +.nr b| \n(dn +.nr b- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di c+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Print debugging information. +.br +.di +.nr c| \n(dn +.nr c- \n(dl +.. +.ec \ +.eo +.am 80 +.br +.di d+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(80 .ll \n(80u +.in 0 +\f3\-Xno\-addressing\-databinding\fP +.br +.di +.nr d| \n(dn +.nr d- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di e+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Enable binding of W3C \f2EndpointReferenceType\fP to Java. +.br +.di +.nr e| \n(dn +.nr e- \n(dl +.. +.ec \ +.eo +.am 81 +.br +.di f+ +.35 +.ft \n(.f +.ll \n(34u*1u/3u +.if \n(.l<\n(81 .ll \n(81u +.in 0 +Do not compile generated Java files. +.br +.di +.nr f| \n(dn +.nr f- \n(dl +.. +.ec \ +.35 +.nf +.ll \n(34u +.nr 80 0 +.nr 38 \w\f3Option\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-XadditionalHeaders\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-Xauthfile <file>\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-Xdebug\fP +.if \n(80<\n(38 .nr 80 \n(38 +.nr 38 \w\f3\-Xnocompile\fP +.if \n(80<\n(38 .nr 80 \n(38 +.80 +.rm 80 +.nr 38 \n(d- +.if \n(80<\n(38 .nr 80 \n(38 +.nr 81 0 +.nr 38 \w\f3Description\fP +.if \n(81<\n(38 .nr 81 \n(38 +.81 +.rm 81 +.nr 38 \n(a- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(b- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(c- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(e- +.if \n(81<\n(38 .nr 81 \n(38 +.nr 38 \n(f- +.if \n(81<\n(38 .nr 81 \n(38 +.35 +.nf +.ll \n(34u +.nr 38 1n +.nr 79 0 +.nr 40 \n(79+(0*\n(38) +.nr 80 +\n(40 +.nr 41 \n(80+(3*\n(38) +.nr 81 +\n(41 +.nr TW \n(81 +.if t .if \n(TW>\n(.li .tm Table at line 193 file Input is too wide - \n(TW units +.fc   +.nr #T 0-1 +.nr #a 0-1 +.eo +.de T# +.ds #d .d +.if \(ts\n(.z\(ts\(ts .ds #d nl +.mk ## +.nr ## -1v +.ls 1 +.ls +.. +.ec +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3Option\fP\h'|\n(41u'\f3Description\fP +.ne \n(a|u+\n(.Vu +.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-XadditionalHeaders\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.a+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(b|u+\n(.Vu +.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-Xauthfile <file>\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.b+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(c|u+\n(.Vu +.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-Xdebug\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.c+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(d|u+\n(.Vu +.ne \n(e|u+\n(.Vu +.if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v) +.if (\n(e|+\n(#^-1v)>\n(#- .nr #- +(\n(e|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(40u +.in +\n(37u +.d+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.e+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.ne \n(f|u+\n(.Vu +.if (\n(f|+\n(#^-1v)>\n(#- .nr #- +(\n(f|+\n(#^-\n(#--1v) +.ta \n(80u \n(81u +.nr 31 \n(.f +.nr 35 1m +\&\h'|\n(40u'\f3\-Xnocompile\fP\h'|\n(41u' +.mk ## +.nr 31 \n(## +.sp |\n(##u-1v +.nr 37 \n(41u +.in +\n(37u +.f+ +.in -\n(37u +.mk 32 +.if \n(32>\n(31 .nr 31 \n(32 +.sp |\n(31u +.fc +.nr T. 1 +.T# 1 +.35 +.rm a+ +.rm b+ +.rm c+ +.rm d+ +.rm e+ +.rm f+ +.TE +.if \n-(b.=0 .nr c. \n(.c-\n(d.-26 + .LP .SH "Example" .nf \f3 .fl -\fP\f3wsimport \-p stockquote http://stockquote.xyz/quote?wsdl\fP +\fP\f3wsimport \-p stockquote http://stockquote.example.com/quote?wsdl\fP .fl .fi .LP -This will generate the Java artifacts and compile them by importing the \f2http://stockquote.xyz/quote?wsdl\fP. +This will generate the Java artifacts and compile them by importing the \f2http://stockquote.example.com/quote?wsdl\fP. .br diff --git a/src/solaris/doc/sun/man/man1/xjc.1 b/src/solaris/doc/sun/man/man1/xjc.1 index a739d7d7acb89f37d86eab059f987797af2c6444..0425ba6480c0f99cb42955fb0c629d5bb24207c4 100644 --- a/src/solaris/doc/sun/man/man1/xjc.1 +++ b/src/solaris/doc/sun/man/man1/xjc.1 @@ -1,4 +1,4 @@ -." Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +." Copyright (c) 2005, 2011, 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,19 +19,18 @@ ." or visit www.oracle.com if you need additional information or have any ." questions. ." -.TH xjc 1 "02 Jun 2010" +.TH xjc 1 "10 May 2011" .LP -.ad c .SH "Name" xjc \- Java(TM) Architecture for XML Binding .br -Binding Compiler +Binding Compiler +.LP .LP \f3Specification Version:\fP 2.1 .br -\f3Reference Implementation (RI) Version:\fP 2.1.3 .ad l - +\f3Reference Implementation (RI) Version:\fP 2.1.3 .LP .SH "Launching xjc" .LP @@ -41,84 +40,87 @@ The binding compiler can be launched using the appropriate \f2xjc\fP shell scrip \f2using the XJC Ant task\fP @ .fi https://jaxb.dev.java.net/nonav/2.1.3/docs/xjcTask.html. -.LP -.RS 3 - .LP .LP \f2% xjc \-help\fP .LP -.RE -\f3Output\fP -.LP -.RS 3 - +.SS +Output .LP .nf \f3 .fl -Usage: xjc [\-options ...] <schema_file/URL/dir> ... [\-b <bindinfo>] ... +Usage: xjc [\-options ...] <schema file/URL/dir/jar> ... [\-b <bindinfo>] ... +.fl +If dir is specified, all schema files in it will be compiled. +.fl +If jar is specified, /META\-INF/sun\-jaxb.episode binding file will be compiled. .fl Options: .fl - \-nv : do not perform strict validation of the input schema(s) + \-nv : do not perform strict validation of the input schema(s) +.fl + \-extension : allow vendor extensions \- do not strictly follow the Compatibility Rules and App E.2 from the JAXB Spec +.fl + \-b <file/dir> : specify external bindings files (each <file> must have its own \-b); if a directory is given, **/*.xjb is searched .fl - \-extension : allow vendor extensions \- do not strictly follow the + \-d <dir> : generated files will go into this directory .fl - Compatibility Rules and App E.2 from the JAXB Spec + \-p <pkg> : specifies the target package .fl - \-b <file/dir> : specify external bindings files (each <file> must have its own \-b) + \-httpproxy <proxy> : set HTTP/HTTPS proxy; format is [user[:password]@]proxyHost:proxyPort .fl - If a directory is given, **/*.xjb is searched + \-httpproxyfile <f> : works like \-httpproxy but takes the argument in a file to protect password .fl - \-d <dir> : generated files will go into this directory + \-classpath <arg> : specify where to find user class files .fl - \-p <pkg> : specifies the target package + \-catalog <file> : specify catalog files to resolve external entity references; support TR9401, XCatalog, and OASIS XML Catalog format .fl - \-httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort + \-readOnly : generated files will be in read\-only mode .fl - \-httpproxyfile <file>: set the proxy string (same format as above). + \-npa : suppress generation of package level annotations (**/package\-info.java) .fl - \-classpath <arg> : specify where to find user class files + \-no\-header : suppress generation of a file header with timestamp .fl - \-catalog <file> : specify catalog files to resolve external entity references + \-target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features .fl - support TR9401, XCatalog, and OASIS XML Catalog format. + \-xmlschema : treat input as W3C XML Schema (default) .fl - \-readOnly : generated files will be in read\-only mode + \-relaxng : treat input as RELAX NG (experimental,unsupported) .fl - \-npa : suppress generation of package level annotations (**/package\-info.java) + \-relaxng\-compact : treat input as RELAX NG compact syntax (experimental,unsupported) .fl - \-no\-header : suppress generation of a file header with timestamp + \-dtd : treat input as XML DTD (experimental,unsupported) .fl - \-target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features. + \-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported) .fl - \-xmlschema : treat input as W3C XML Schema (default) + \-verbose : be extra verbose .fl - \-relaxng : treat input as RELAX NG (experimental,unsupported) + \-quiet : suppress compiler output .fl - \-relaxng\-compact : treat input as RELAX NG compact syntax (experimental,unsupported) + \-help : display this help message .fl - \-dtd : treat input as XML DTD (experimental,unsupported) + \-version : display version information +.fl + +.fl + .fl - \-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported) +Extensions: .fl - \-verbose : be extra verbose + \-Xlocator : enable source location support for generated code .fl - \-quiet : suppress compiler output + \-Xsync\-methods : generate accessor methods with the 'synchronized' keyword .fl - \-help : display this help message + \-mark\-generated : mark the generated code as @javax.annotation.Generated .fl - \-version : display version information + \-episode <FILE> : generate the episode file for separate compilation .fl \fP .fi -.RE .LP .SH "OPTIONS" -.LP - .LP .RS 3 .TP 3 @@ -129,15 +131,9 @@ By default, the XJC binding compiler performs strict validation of the source sc By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification. Appendix E.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1.0. In some cases, you may be allowed to use them in the "\-extension" mode enabled by this switch. In the default (strict) mode, you are also limited to using only the binding customizations defined in the specification. By using the "\-extension" switch, you will be allowed to use the JAXB Vendor Extensions .TP 3 \-b <file> -Specify one or more external binding files to process. (Each binding file must have its own \f2"\-b"\fP switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizations into multiple bindings files: -.RS 3 - -.LP -\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings123.xjb\fP +Specify one or more external binding files to process. (Each binding file must have its own \f2"\-b"\fP switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizations into multiple bindings files: \f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings123.xjb\fP .br -\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings1.xjb \-b bindings2.xjb \-b bindings3.xjb\fP -.RE -In addition, the ordering of the schema files and binding files on the command line does not matter. +\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings1.xjb \-b bindings2.xjb \-b bindings3.xjb\fP In addition, the ordering of the schema files and binding files on the command line does not matter. .TP 3 \-d <dir> By default, the XJC binding compiler will generate the Java content classes in the current directory. Use this option to specify an alternate output directory. The output directory must already exist, the XJC binding compiler will not create it for you. @@ -199,11 +195,29 @@ Display the compiler version information. <schema file/URL/dir> Specify one or more schema files to compile. If you specify a directory, then xjc will scan it for all schema files and compile them. .RE + +.LP .SS -Summary of Deprecated and Removed Command Line Options +Non\-Standard Command Line Options .LP .RS 3 +.TP 3 +\-Xlocator +Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling. +.TP 3 +\-Xsync\-methods +Causes all of the generated method signatures to include the \f2synchronized\fP keyword. +.TP 3 +\-mark\-generated +Mark the generated code with the annotation \f2@javax.annotation.Generated\fP. +.TP 3 +\-episode <file> +Generate the specified episode file for separate compilation. +.RE +.LP +.SS +Deprecated and Removed Command Line Options .LP .RS 3 .TP 3 @@ -215,13 +229,9 @@ Since the JAXB 2.0 specification has defined a portable runtime, it is no longer .TP 3 \-source The \-source compatibility switch was introduced in the first JAXB 2.0 Early Access release. We have decided to remove this switch from future releases of JAXB 2.0. If you need to generate 1.0.x code, please use an installation of the 1.0.x codebase. -.TP 3 -\-Xlocator & \-Xsync\-methods -These switches have been disabled for now. We plan on releasing this functionality as a separate download in the future. .RE .LP -.RE .SS Compiler Restrictions .LP @@ -280,7 +290,7 @@ o .na \f2Java Architecture for XML Binding (JAXB)\fP @ .fi -http://java.sun.com/javase/6/docs/technotes/guides/xml/jaxb/index.html +http://download.oracle.com/javase/7/docs/technotes/guides/xml/jaxb/index.html .RE .LP