jar commands

Execute a jar (with common args):
java -jar -cp /foo:/foo/bar/* -D... -X... myApp.jar appArg1=foo appArg2=bar

Create a jar (create, output jar file) in the current directory:
jar cf app.jar input-file(s)

Extract a jar (extract, verbose, input jar file) in the current directory:
jar -xvf app.jar

Extract a war in the current directory:
Similar to the jar way.

Update the jar content for some files without recompiling classes :
jar uf myApp.jar file1 foo/file2
The path of external files matters to perform a replace (and not a file adding to another location)

Ce contenu a été publié dans Non classé. Vous pouvez le mettre en favoris avec ce permalien.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *