Mega Code Archive

 
Categories / Java Tutorial / Language
 

The jar Tool

The jar tool creates a JAR archive file by combining multiple files of a Java application. The jar tool compresses content based on the ZIP and ZLIB compression formats. You can also use the jar tool to extract the content of a JAR file. The syntax to use the jar tool is: Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files OptionDescription cCreates a new archive. tLists the contents of an archive. xExtracts contents from an archive. uUpdates an existing archive. vDisplays output at the command prompt while the jar tool performs an operation. fSpecifies the name of the archive file. mIncludes a specified manifest file in the archive. oInstructs the jar tool not to compress content. MInstructs the jar tool not to create a manifest file for an archive. The jar tool, by default, creates an empty manifest file in an archive. CSpecifies the directories to include in the archive.