A jar file is nothing more than a zip file that contains your compiled .class files and the resources needed by your application (html files, pictures, ...). A jar file might also contain a manifest file that stores some properties for your jar file, one of these properties is the "Main-Class" property that tells java which class should be executed when someone launches your jar file (with "java -jar <jarfile>" or by double-clicking/enter-pressing it if the .jar extension is associated with the "java -jar" command on your system).
In a large program every class can contain a main function (I often used this to write simple tests for each class), this is why you need to select one class file in the manifest as your main class.
A simply "Hello World" jar tutorial.
http://www.herongyang.com/Java-Tools/jar-Create-First-JAR-File.html[
^]
The only problem with this tutorial is that it didn't set the "Main-Class" attribute in the manifest file. Create your manifest.mf file and write the "Main-Class: Hello" line into it and then redo the tutorial by specifying the "-m manfiest.mf" parameter too when you create your jar file. If your main class is inside a package (not in the default package) then specify the package as well: "Main-Class: package1.package2.Hello"
Run your jar: "java -jar hello.jar"