I have a JAR file named helloworld.jar. In order to run it, I\'m executing the following command in a command-line window:
If you use eclipse for making your java files, you can choose to export it as a runnable jar file. I did this with my programs and I can just click on the jar and it will run just like that. This will work on both windows, as well as os x.