4176N/A." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A."
0N/A." This code is free software; you can redistribute it and/or modify it
0N/A." under the terms of the GNU General Public License version 2 only, as
0N/A." published by the Free Software Foundation.
0N/A."
0N/A." This code is distributed in the hope that it will be useful, but WITHOUT
0N/A." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A." version 2 for more details (a copy is included in the LICENSE file that
0N/A." accompanied this code).
0N/A."
0N/A." You should have received a copy of the GNU General Public License version
0N/A." 2 along with this work; if not, write to the Free Software Foundation,
0N/A." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A."
2362N/A." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A." or visit www.oracle.com if you need additional information or have any
2362N/A." questions.
0N/A."
4880N/A.TH jar 1 "16 Mar 2012"
1178N/A
0N/A.LP
1178N/A.SH "Name"
0N/Ajar\-The Java Archive Tool
0N/A.LP
4176N/A\f3jar\fP combines multiple files into a single JAR archive file.
0N/A.SH "SYNOPSIS"
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/ACreate jar file
0N/A\f4jar c\fP\f2[v0Mmfe] [\fP\f2manifest\fP\f2] [\fP\f2jarfile\fP\f2] [\fP\f2entrypoint\fP\f2] [\-C\fP \f2dir\fP\f2]\fP \f2inputfiles\fP \f2[\-J\fP\f2option\fP\f2]\fP
0N/A.TP 3
0N/AUpdate jar file
0N/A\f4jar u\fP\f2[v0Mmfe] [\fP\f2manifest\fP\f2] [\fP\f2jarfile\fP\f2] [\fP\f2entrypoint\fP\f2] [\-C\fP \f2dir\fP\f2]\fP \f2inputfiles\fP \f2[\-J\fP\f2option\fP\f2]\fP
0N/A.TP 3
0N/AExtract jar file
0N/A\f4jar x\fP\f2[vf] [\fP\f2jarfile\fP\f2] [\fP\f2inputfiles\fP\f2] [\-J\fP\f2option\fP\f2]\fP
0N/A.TP 3
0N/AList table of contents of jar file
0N/A\f4jar t\fP\f2[vf] [\fP\f2jarfile\fP\f2] [\fP\f2inputfiles\fP\f2] [\-J\fP\f2option\fP\f2]\fP
0N/A.TP 3
0N/AAdd index to jar file
0N/A\f4jar i\fP \f2jarfile\fP \f2[\-J\fP\f2option\fP\f2]\fP
1178N/A.RE
1178N/A
0N/A.LP
0N/A.LP
0N/Awhere:
0N/A.LP
0N/A.RS 3
0N/A.TP 3
0N/Acuxtiv0Mmfe
0N/AOptions that control the \f2jar\fP command.
0N/A.TP 3
1178N/Ajarfile
0N/AJar file to be created (\f2c\fP), updated (\f2u\fP), extracted (\f2x\fP), or have its table of contents viewed (\f2t\fP). The \f2\-f\fP option and filename \f2jarfile\fP are a pair \-\- if either is present, they must both appear. Note that omitting \f2f\fP and \f2jarfile\fP accepts a "jar file" from standard input (for x and t) or sends the "jar file" to standard output (for c and u).
0N/A.TP 3
0N/Ainputfiles
0N/AFiles or directories, separated by spaces, to be combined into \f2jarfile\fP (for c and u), or to be extracted (for x) or listed (for t) from \f2jarfile\fP. All directories are processed recursively. The files are compressed unless option \f20\fP (zero) is used.
0N/A.TP 3
1178N/Amanifest
0N/APre\-existing manifest file whose \f2name\fP\f2:\fP \f2value\fP pairs are to be included in MANIFEST.MF in the jar file. The \f2\-m\fP option and filename \f2manifest\fP are a pair \-\- if either is present, they must both appear. The letters \f3m\fP, \f3f\fP and \f3e\fP must appear in the same order that \f2manifest\fP, \f2jarfile\fP, \f2entrypoint\fP appear.
0N/A.TP 3
0N/Aentrypoint
0N/AThe name of the class that set as the application entry point for stand\-alone applications bundled into executable jar file. The \f2\-e\fP option and entrypoint are a pair \-\- if either is present, they must both appear. The letters \f3m\fP, \f3f\fP and \f3e\fP must appear in the same order that \f2manifest\fP, \f2jarfile\fP, \f2entrypoint\fP appear.
0N/A.TP 3
0N/A\-C\ dir
0N/ATemporarily changes directories to \f2dir\fP while processing the following \f2inputfiles\fP argument. Multiple \f2\-C\ \fP\f2dir\fP \f2inputfiles\fP sets are allowed.
0N/A.TP 3
0N/A\-Joption
0N/AOption to be passed into the Java runtime environment. (There must be no space between \f2\-J\fP and \f2option\fP).
1178N/A.RE
1178N/A
0N/A.LP
0N/A.SH "DESCRIPTION"
0N/A.LP
0N/AThe \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
0N/A.na
0N/A\f2ZLIB\fP @
0N/A.fi
1178N/Ahttp://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.
0N/A.LP
0N/ATypical usage to combine files into a jar file is:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar cf myFile.jar *.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/AIn 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
0N/A.na
0N/A\f2JAR file specification\fP @
0N/A.fi
4880N/Ahttp://docs.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.
0N/A.LP
0N/AIf a jar file should include \f2name\ :\ value\fP pairs contained in an existing manifest file, specify that file using the \f2\-m\fP option:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar cmf myManifestFile myFile.jar *.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/AAn 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.
0N/A.br
0N/A
0N/A.LP
0N/A.br
0N/A
0N/A.LP
0N/A\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:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar cfm myFile.jar myManifestFile *.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/AThe manifest is in a text format inspired by RFC822 ASCII format, so it is easy to view and process manifest\-file contents.
0N/A.LP
0N/ATo extract the files from a jar file, use \f2x\fP:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar xf myFile.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/ATo extract individual files from a jar file, supply their filenames:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar xf myFile.jar foo bar
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
2509N/ABeginning with version 1.3 of the JDK, the \f2jar\fP utility supports
0N/A.na
0N/A\f2JarIndex\fP @
0N/A.fi
4880N/Ahttp://docs.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.
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar i main.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/AIn this example, an \f2INDEX.LIST\fP file is inserted into the \f2META\-INF\fP directory of \f2main.jar\fP.
0N/A.br
0N/A.br
0N/AThe application class loader uses the information stored in this file for efficient class loading.\ For details about how location information is stored in the index file, refer to the \f2JarIndex\fP specification.
0N/A.br
0N/A.br
0N/ATo 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):
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% (cd dir1; jar c .) | (cd dir2; jar x)
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/ATo review command samples which use \f2jar\fP to opeate on jar files and jar file manifests, see Examples, below. Also refer to the jar trail of the
0N/A.na
0N/A\f2Java Tutorial\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/tutorial/deployment/jar.
0N/A.LP
0N/A.SH "OPTIONS"
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/Ac
0N/ACreates a new archive file named \f2jarfile\fP (if \f2f\fP is specified) or to standard output (if \f2f\fP and \f2jarfile\fP are omitted). Add to it the files and directories specified by \f2inputfiles\fP.
0N/A.TP 3
0N/Au
0N/AUpdates an existing file \f2jarfile\fP (when \f2f\fP is specified) by adding to it files and directories specified by \f2inputfiles\fP. For example:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar uf foo.jar foo.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/Awould 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:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar umf manifest foo.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/Aupdates the \f2foo.jar\fP manifest with the \f2name : value\fP pairs in \f2manifest\fP.
0N/A.TP 3
0N/Ax
0N/AExtracts files and directories from \f2jarfile\fP (if \f2f\fP is specified) or standard input (if \f2f\fP and \f2jarfile\fP are omitted). If \f2inputfiles\fP is specified, only those specified files and directories are extracted. Otherwise, all files and directories are extracted. The time and date of the extracted files are those given in the archive.
0N/A.TP 3
0N/At
0N/ALists the table of contents from \f2jarfile\fP (if \f2f\fP is specified) or standard input (if \f2f\fP and \f2jarfile\fP are omitted). If \f2inputfiles\fP is specified, only those specified files and directories are listed. Otherwise, all files and directories are listed.
0N/A.TP 3
0N/Ai
0N/AGenerate index information for the specified \f2jarfile\fP and its dependent jar files. For example:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar i foo.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/A.LP
4176N/Awould 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.
0N/A.TP 3
0N/Af
0N/ASpecifies 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).
0N/A.TP 3
0N/Av
0N/AGenerates verbose output to standard output. Examples shown below.
0N/A.TP 3
0N/A0
0N/A(zero) Store without using ZIP compression.
0N/A.TP 3
0N/AM
0N/ADo not create a manifest file entry (for c and u), or delete a manifest file entry if one exists (for u).
0N/A.TP 3
0N/Am
4176N/AIncludes \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.
4176N/A.br
4176N/A.br
0N/AOn 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:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar cmf myManifestFile myFile.jar *.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/AYou 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
0N/A.na
0N/A\f2JAR Files\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/tutorial/deployment/jar/ trail in the Java Tutorial for examples of using the \f4\-m\fP option.
0N/A.TP 3
0N/Ae
0N/ASets \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.
0N/A.br
0N/A.br
4176N/A.br
0N/AFor example, this command creates \f2Main.jar\fP where the \f2Main\-Class\fP attribute value in the manifest is set to \f2Main\fP:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar cfe Main.jar Main Main.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/AThe java runtime can directly invoke this application by running the following command:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajava \-jar Main.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/AIf 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:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar \-cfe Main.jar foo/Main foo/Main.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/Aor
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar \-cfe Main.jar foo.Main foo/Main.class
0N/A.fl
0N/A\fP
0N/A.fi
4176N/A\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.
0N/A.TP 3
4176N/A\-C\ dir
0N/ATemporarily 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.
0N/A.br
0N/A.br
0N/AFor example, this command changes to the \f2classes\fP directory and adds the \f2bar.class\fP from that directory to \f2foo.jar\fP:
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar uf foo.jar \-C classes bar.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/AThis 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.
0N/A.nf
0N/A\f3
0N/A.fl
0N/Ajar uf foo.jar \-C classes . \-C bin xyz.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/AIf \f2classes\fP holds files \f2bar1\fP and \f2bar2\fP, then here's what the jar file will contain using \f2jar tf foo.jar\fP:
0N/A.nf
0N/A\f3
0N/A.fl
0N/AMETA\-INF/
0N/A.fl
0N/AMETA\-INF/MANIFEST.MF
0N/A.fl
0N/Abar1
0N/A.fl
0N/Abar2
0N/A.fl
0N/Axyz.class
0N/A.fl
0N/A\fP
0N/A.fi
0N/A.LP
0N/A.TP 3
0N/A\-Joption
1178N/APass \f2option\fP to the Java runtime environment, where \f2option\fP is one of the options described on the reference page for the java application launcher. For example, \f4\-J\-Xmx48M\fP sets the maximum memory to 48 megabytes. It is a common convention for \f2\-J\fP to pass options to the underlying runtime environment.
1178N/A.RE
1178N/A
0N/A.LP
0N/A.SH "COMMAND LINE ARGUMENT FILES"
0N/A.LP
0N/ATo 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.
0N/A.LP
1178N/AAn argument file can include options and filenames. The arguments within a file can be space\-separated or newline\-separated. Filenames within an argument file are relative to the current directory, not relative to the location of the argument file. Wildcards (*) that might otherwise be expanded by the operating system shell are not expanded. 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.
0N/A.LP
0N/A.LP
0N/AWhen executing \f2jar\fP, pass in the path and name of each argument file with the \f2@\fP leading character. When \f2jar\fP encounters an argument beginning with the character \f2@\fP, it expands the contents of that file into the argument list.
0N/A.br
0N/A.br
0N/AThe example below, \f2classes.list\fP holds the names of files output by a \f2find\fP command:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% find \fP\f3.\fP \-name '*.class' \-print > classes.list
0N/A.fl
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/AYou can then execute the \f2jar\fP command on \f2Classes.list\fP by passing it to \f2jar\fP using argfile syntax:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar cf my.jar @classes.list
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/AAn 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:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar @path1/classes.list
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/A
0N/A.LP
0N/A.SH "EXAMPLES"
0N/A.LP
0N/ATo 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.
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% ls
0N/A.fl
0N/A1.au Animator.class monkey.jpg
0N/A.fl
0N/A2.au Wave.class spacemusic.au
0N/A.fl
0N/A3.au at_work.gif
0N/A.fl
0N/A
0N/A.fl
0N/A% jar cvf bundle.jar *
0N/A.fl
0N/Aadded manifest
0N/A.fl
0N/Aadding: 1.au(in = 2324) (out= 67)(deflated 97%)
0N/A.fl
0N/Aadding: 2.au(in = 6970) (out= 90)(deflated 98%)
0N/A.fl
0N/Aadding: 3.au(in = 11616) (out= 108)(deflated 99%)
0N/A.fl
0N/Aadding: Animator.class(in = 2266) (out= 66)(deflated 97%)
0N/A.fl
0N/Aadding: Wave.class(in = 3778) (out= 81)(deflated 97%)
0N/A.fl
0N/Aadding: at_work.gif(in = 6621) (out= 89)(deflated 98%)
0N/A.fl
0N/Aadding: monkey.jpg(in = 7667) (out= 91)(deflated 98%)
0N/A.fl
0N/Aadding: spacemusic.au(in = 3079) (out= 73)(deflated 97%)
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/AIf you already have separate subdirectories for images, audio files and classes, you can combine them into a single jar file:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% ls \-F
0N/A.fl
0N/Aaudio/ classes/ images/
0N/A.fl
0N/A
0N/A.fl
0N/A% jar cvf bundle.jar audio classes images
0N/A.fl
0N/Aadded manifest
0N/A.fl
0N/Aadding: audio/(in = 0) (out= 0)(stored 0%)
0N/A.fl
0N/Aadding: audio/1.au(in = 2324) (out= 67)(deflated 97%)
0N/A.fl
0N/Aadding: audio/2.au(in = 6970) (out= 90)(deflated 98%)
0N/A.fl
0N/Aadding: audio/3.au(in = 11616) (out= 108)(deflated 99%)
0N/A.fl
0N/Aadding: audio/spacemusic.au(in = 3079) (out= 73)(deflated 97%)
0N/A.fl
0N/Aadding: classes/(in = 0) (out= 0)(stored 0%)
0N/A.fl
0N/Aadding: classes/Animator.class(in = 2266) (out= 66)(deflated 97%)
0N/A.fl
0N/Aadding: classes/Wave.class(in = 3778) (out= 81)(deflated 97%)
0N/A.fl
0N/Aadding: images/(in = 0) (out= 0)(stored 0%)
0N/A.fl
0N/Aadding: images/monkey.jpg(in = 7667) (out= 91)(deflated 98%)
0N/A.fl
0N/Aadding: images/at_work.gif(in = 6621) (out= 89)(deflated 98%)
0N/A.fl
0N/A
0N/A.fl
0N/A% ls \-F
0N/A.fl
0N/Aaudio/ bundle.jar classes/ images/
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/ATo see the entry names in the jarfile, use the \f2t\fP option:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar tf bundle.jar
0N/A.fl
0N/AMETA\-INF/
0N/A.fl
0N/AMETA\-INF/MANIFEST.MF
0N/A.fl
0N/Aaudio/1.au
0N/A.fl
0N/Aaudio/2.au
0N/A.fl
0N/Aaudio/3.au
0N/A.fl
0N/Aaudio/spacemusic.au
0N/A.fl
0N/Aclasses/Animator.class
0N/A.fl
0N/Aclasses/Wave.class
0N/A.fl
0N/Aimages/monkey.jpg
0N/A.fl
0N/Aimages/at_work.gif
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/ATo add an index file to the jar file for speeding up class loading, use the \f2i\fP option.
0N/A.br
0N/A.br
0N/AExample:
0N/A.br
0N/A
0N/A.LP
0N/AIf 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.
0N/A.br
0N/A
0N/A.LP
0N/A.br
0N/A
0N/A.LP
0N/AIf you specify the \f2Class\-path\fP attribute in the \f2main.jar\fP manifest as:
0N/A.nf
0N/A\f3
0N/A.fl
0N/AClass\-Path: buy.jar sell.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/Athen you can use the \f2\-i\fP option to speed up the class loading time for your application:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% jar i main.jar
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
4176N/AAn \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.
0N/A.SH "SEE ALSO"
0N/A.LP
0N/A.LP
0N/A.na
0N/A\f2The Jar Overview\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/jar/jarGuide.html
4176N/A.LP
0N/A.LP
0N/A.na
0N/A\f2The Jar File Specification\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html
4176N/A.LP
0N/A.LP
0N/A.na
0N/A\f2The JarIndex Spec\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Index
4176N/A.LP
0N/A.LP
0N/A.na
0N/A\f2Jar Tutorial\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/tutorial/deployment/jar/index.html
4176N/A.LP
0N/A.LP
4176N/Apack200(1)
4176N/A.LP
4176N/A