We have developed an "assignment submission" tool to help with
encrypting and submitting jar files. Essentially, you will write your
stuff in a directory, jar the directory, copy the jar file to your
submit directory and run our tool on the jar file.
All submissions are to be done on shell - login to shell.seas.gwu.edu using ssh (Linux/OS X) or PuTTY (Windows) and your SEAS login/password.
Before we get to submissions, you should create a directory for this
course under your home directory:
% cd
% mkdir cs1112
(Don't type the percentage symbol - that's there merely to show the
Unix prompt).
Here's how to submit an assignment, using the first in class assignment as an example.
Substitute your actual Unix username in place of username below.
- For the first exercise, create a directory under your
cs1112 directory called username-in1. For example, if your username is beavis then your directory will be named beavis-in1 (if this were the first out of class assignment, then your directory would be named beavis-out1).
- Select an 8-digit encrypting key using ONLY alphabets and digits,
for example qfgk9816. Email
this key and your SEAS user ID to the grader (jinho10 AT gwu.edu) and DO NOT
share this key with anyone.
- Now, let's assume you've written your code for the first in-class assignment
in cs1112/username-in1.
Go to your cs1112 directory and type the following command:
% jar cvf username-in1.jar username-in1
This "jars" your username-in1 directory into a single jar file.
You should see a username-in1.jar file in your cs1112 directory.
- Next, encrypt:
% gpg -c -o beavis-in1.jar.crypt beavis-in1.jar
Of course, you should use your crypt key above.
- Place the encrypted version in a subdirectory called /submit
(a subdirectory off of your home directory).
% cp beavis-in1.jar.crypt ~/submit/.
- Make the crypt file accessible:
% cd
% chmod a+rx submit
% cd submit
% chmod a+r beavis-in1.jar.crypt
At this point, the grader will be able to copy your
encrypted file, decrypt it, and un-jar it to test your code.
Anyone else can copy your crypt file, but should not be able to decrypt it.
- Important: You should follow the instructions closely,
else we will not be able to access your file, for which you will lose points.
- Important: Use the same key for future submissions.
Do NOT make other directories/files accessible. (Points may be taken off if this
occurs).
- If specified, submit a
printout (hardcopy) of your code before the due date either in my mailbox, in
class, or slip it under my door.
- In your submissions, please include only your Java source files
(not class files, since we will compile).
You may include other files only if directed to
do so in an assignment/exercise.