Below are some of the common JAR File operations in Java.
JAR file operations in Java
This command creates a JAR file.
Syntax : jar cf jar-file input-file
This command is used to view the contents of the JAR file.
Syntax : jar tf jar-file
This command is used to extract the contents of a JAR file.
Syntax : jar xf jar-file