Easy way to decompress Linux and compress JAR packages

  • 2020-05-14 05:46:52
  • OfStack

Package all the files in the current directory as project.jar

jar -cvfM0 project.jar ./

-c creates the jar package
-v displays process information
-f
-M
-0, this is an Arabic number, it's just packed, it's not compressed

Unpack the project jar

jar -xvf project.jar

Unzip to the current directory. Note that instead of creating a single game folder, unzip all the contents of the jar package to the current folder.


Related articles: