Typical usage to combine files into a jar file is:
Is almost identical to the syntax for the tar command.Ī jar archive can be used as a class path entry, whether or not it is compressed. In addition, it allows individualĮntries in a file to be signed by the applet author so that This dramatically improvesĭownload times. (.class files, images and sounds) are combined into a singleĪrchive, they may be downloaded by a java agent (like aīrowser) in a single HTTP transaction, rather than requiring a When the components of an applet or application Packaging of java applets or applications into a singleĪrchive. However, jar was designed mainly to facilitate the jar is a general-purpose archiving andĬompression tool, based on ZIP and the ZLIB compression format. The jar tool combines multiple files into a single JARĪrchive file. J option Option passed into the Java runtime environment. Multiple -C dir inputfiles sets are allowed. Processing the following inputfiles argument. C dir Temporarily changes directories to dir while The -e option and entrypointĪre a pair - if either is present, they must both appear. Point for stand-alone applications bundled intoĮxecutable jar file. entrypoint The name of the class that set as the application entry M and f must appear in the same order that Option and filename manifest are a pair - ifĮither is present, they must both appear. manifest Pre-existing manifest file whose inputfiles Files or directories separated by spaces, to beĬombined into jarfile (for c and u), or to beĮxtracted (for x) or listed (for t) from jarfile.Īll directories are processed recursively. Jar file to standard output (for c and u). Jar file from standard input (for x and t) or sends Pair - if either is present, they must both appear. jarfile File name of the Jar file to be created ( c), updated Where: cuxtiv0Mmf Options that control the jar command. List table of contents of jar file jar t f jarfile jar u inputfiles jar u m manifest inputfiles Extract jar file jar x f jarfile
jar c inputfiles jar c m manifest inputfiles Update jar file jar u f jarfile inputfiles jar u mf manifest jarfile inputfiles
SYNOPSIS Create jar file jar c f jarfile inputfiles jar c mf manifest jarfile inputfiles Jar-The Java Archive Tool jar combines multiple files into a single JAR archive file.