The jar (Java Archive) tool of JDK provides the facility to create the executable jar file. An executable jar file calls the main method of the class if you double click it.
To create the executable jar file, you need to create .mf file, also known as manifest file.
To create manifest file, you need to write Main-Class, then colon, then space, then classname then enter. For example:
The jar tool provides many switches, some of them are as follows:
Now, let's write the code to generated the executable jar using mf file.
Near fortis Hostipal