Creating a Jar File

Once you have successfully completed your programming assignment, you will need to create a Jar file to submit your assignment. This will help me grade your assignment. You will lose points if you do not submit your programming assignments in a JAR file.

* To check the contents of your JAR file, open it with an Archive Reader, such as WinZip, WinRAR, or Windows Archive Manager
Please be sure that your JAR file contains both the class file(s) and the java file(s) needed for the assignment.

* To check that your MANIFEST file is correct, you can run your jar file. To do this, open a C: Prompt (Windows) or the Terminal application (MAC) and change your directory to the location of your jar file. (Google how to do this if you do not know). Then type in the following command: java -jar nameofyourjarfile.jar

What's a Jar File?

Jar stands for "Java Archive". It's much like a compressed ZIP file that you may have used before. You'll be adding each Java source file in your assignment (usually only one file) to a Jar file before submitting. The size of the final Jar file will be smaller than the original programs and therefore be easier to e-mail.

How Do I Create a Jar File?