First you need a manifest file. This just tells the jar which
classes 'main' is to be run when the file is double-clicked on. The
manifest file is usually two lines:
Manifest-Version: 1.0
Main-Class: FileToBeRun
(Although you can probably leave out the version number.)
Note lack of extension on 'FileToBeRun'.
Then, at the command prompt, type:
jar -cmf MyProgManifest.txt MyProg.jar *.class
The options after -cmf must come in that order too.