Here's what you need to do:
1. You should have a Manifest.mf file, which will contain the following lines.
I am using HelloWorld.java as example.
Main-Class: your.package.HelloWorld
NOTE: Make sure you hit ENTER at the end of the line (Manifest.mf file).
2. Next create your jar file, as follow:
>jar cmf Manifest.mf hello.jar *.*
That's it. You can run it by double clicking on it and or as follow: