to create a jar file execute this command given below
jar cf jar-file input-file(s)
For more you can see this Creating JAR files
After creation you must specify the main class using menifest.
Ways to update a jar file with manifest......
I have created a text file as manifest like aaa.txt which contains
then I have executed command given below
updating e jar file with main class
jar umf aaa.txt calender.jar
jar xvf calender.jar