JAR Utility and running archived projects in Java

Java archive file format (JAR Utility) is using popular ZIP file format. JAR utility provides a convenient way to bundle and deploy java programs. JAR file is created using jar tool and it contains the files and other other resources (image and audio files) required by the application. It also includes a manifest file that contains pertinent information about class having main method for starting the application.

The jar command has many options (akin to the Unix tar command). A typical command for making a JAR file for an application has the following syntax:

>jar cmf whereismain.txt bundledApp.jar wizard

One can package all the class files and other dependent resources in archive file for distribution. Java based applications must required JRE (Java Run Time Environment) and it must be installed. If it is not installed one can download it from oracle website.

No Responses