JAR file operations in Java

Below are some of the common JAR File operations in Java.

JAR file operations in Java

jar cf

This command creates a JAR file.
Syntax : jar cf jar-file input-file

jar tf

This command is used to view the contents of the JAR file.
Syntax : jar tf jar-file

jar xf

This command is used to extract the contents of a JAR file.
Syntax : jar xf jar-file

%d