All Posts programming Java applications/libraries packager | Jar commands cheat-sheet

Java applications/libraries packager | Jar commands cheat-sheet

· 108 words · 1 minute read

jar is Java applications/libraries packager.

Recursively archive all files in the current directory into a .jar file:

jar cf file.jar *

Unzip .jar/.war file to the current directory:

jar -xvf file.jar

List a .jar/.war file content:

jar tf path/to/file.jar

List a .jar/.war file content with verbose output:

jar tvf path/to/file.jar

More information: https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html .

I hope you enjoyed reading this post as much as I enjoyed writing it. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , and GitHub .