You put your class files into a jar file along with an extra file called a manifest in which you specify which class's main method you want to start with. The jar file can then be double-clcked to run the program.
There's loads of info on the web, now you know what to look for.
I created manifest.txt
inside it says "Main-Class: MainGui
(MainGui is the name of my main class) and I put the txt file into the project folder.
then I created jar file (I didn't understand any other way that was suggested on the web to do it ,so I went "File->export->jar file..etc) and I checked the box to include the manifest.txt
but when I click on the jar file on my desktop I only hear an error sound! I guess I did something wrong.
I still don't understand what I'm doing, for example how would it know that the manifest.txt has the info about which class is main? I've got another txt files in the folder..