Extracting a JAR File's Contents

The basic command to use for extracting the contents of a JAR file is:
jar xf jar-file

The order in which the x and f options appear in the command doesn't matter, but there must not be a space between them.


Caution: When it extracts files, the Jar tool overwrites existing files having the same pathname as the extracted files.

Example

META-INF/MANIFEST.MF
TicTacToe.class
audio/
audio/beep.au
audio/ding.au
audio/return.au
audio/yahoo1.au
audio/yahoo2.au
images/
images/cross.gif
images/not.gif

Use this command:

jar xf TicTacToe.jar

The original TicTacToe JAR file remains unchanged.