JAR File Using Java Commands
JAR File Using Java Commands
The JAR file format is based on the popular ZIP file format. Usually these file are used for archiving and distribution the files and implementing various libraries, components and plug-ins in java applications. Compiler and JVMs (Java Virtual Machine) can understand and implement these formats for java application.
Note that we have used v (verbose) option to see the detail of JAR.
1 2 3
1 2
Where MyMainClass is the name of the class that contents main method. Also note that you have to specify fully qualified class name here. Use following command to create an executable JAR file.
Provide the Destination path and click on Finish to create the JAR.