jar cvf my.jar someDir/
The jar utility is used to manipulate Java Archive ( .jar ) files. These are ZIP format
files that contain Java classes, additional resources, and (usually) metadata. The tool
has five major modes of operation—Create, Update, Index, List, and Extract—on
a .jar file.
These are controlled by passing a command option character (not a switch) to jar .
Only one command character can be specified, but optional modifier characters can
also be used.
Create a new archive
Index an archive
List an archive
x Extract an archive
Operate on a named file, rather than standard input
Store, but do not compress, files added to the archive
Add the contents of the specified file to the jar metadata manifest
Make this jar executable, with the specified class as the entry point