/* Create a JAR file from files */
jar cf jar-file.jar input-file(s)
Options ☕
- c: indicates you want to create a JAR file
- f: indicates you want to direct output to a file rather than stdout
/* View contents of a JAR file */
jar tf jar-file.jar
Options ☕
- t: indicates that you want to view the table of contents of the JAR file
- f: indicates that the JAR file whose contents are to be viewed is specified on the command line
/* Extract contents of a JAR file */
jar xf jar-file.jar
Options ☕
- x: indicates that you want to extract files from the JAR archive
- f: ndicates that the JAR file from which files are to be extracted is specified on the command line