I have a program which consists of two simple Java Swing files.
How do I make an executable JAR file for my program?
jar cvfe myjar.jar package.MainClass *.class
where MainClass is the class with your main method, and package is MainClass's package.
Note you have to compile your .java files to .class files before doing this.
c  create new archive
v  generate verbose output on standard output
f  specify archive file name
e  specify application entry point for stand-alone application bundled into an executable jar file
This answer inspired by Powerslave's comment on another answer.