Programming exercises sources should be submitted electronically.
The electronic submision process involves:
Here you can find a brief introduction to the jar utility, instructions
how to create a jar file of your exercise for electronic submission, and
how to use the submit page to submit your exercise electronically. Be sure
to go over the checklist before you submit your
jar file.
Important: Your submissions will be extracted, compiled and partialy tested by an automatic utility. For this reason it is very important that you submit the exercise exactly as required. Failure to follow these requirements may cause up to 10 points reduction in your grade and the grading will be delayed.
You use the jar utility from the shell window. The jar command should be invoked in the same directory as the files you want to enclose into the jar file.
To create a jar file you type (in the command prompt):
jar -cvf allfiles.jar *.*The above example creates a jar file named allfiles.jar that consists of all the files in the current directory and all its subdirectories.
To extract the files from a jar file:
jar -xvf allfiles.jarImportant Note: Do not give the jar file a name that already exists, as it will run over this file.
Remove all files that are not relevant to the submission (all .class
files, all .zip files etc.).
Go to the Command Prompt (cmd window or dos window) and change directory to the root directory of the
exercise - c:\my_exercises\ex3. In the command prompt window write the following
command:
jar -cvf ex3.jar *.*This will create the file ex3.jar which encloses all files for the submission and preserve the directory structure. To check that the jar file was created successfuly copy the file into a temporary directory and open it there:
cd temp copy c:\my_exercises\ex3\ex3.jar *.* jar -xvf ex3.jarThis should extract all the files in ex3.jar into c:\temp, the resulting directory structure should look like the following:
c:\temp
3.2
PerfectPolygon.java
3.3
CelsiusToFahrenheit.java
Meta-inf
Manifest.mf
Note: Do not pay any attention to the extra Meta-inf directory that was added, it is used for advanced jar options.
Go to the submit page. Fill in your user name and password. Use the "browse" button to choose your jar file for submitting. Press the "upload the file" to upload the file.
You may upload as many times as you want before the deadline. Uploading after the deadline will be regarded as late submission. The upload utility records the date of the upload. The penalty, if any, for late submission will be calculated according to this date.
Be sure that: