Line 1: |
Line 1: |
− | Download the [https://submit.cs.umd.edu:8443/data/DownloadProjectStarterFiles?projectPK=276 starter files] from the submit server. Then in Eclipse, right-click on your project root, choose Import, then Archive, then find the starter files you downloaded. Then import everything from the archive except the META-INF folder.
| + | For any method, you will need to first download the starter files from the submit server. Under the [https://submit.cs.umd.edu/ projects main page], click 'download' under 'download starter files' for the appropriate project. You will need the .submit file in this archive. |
| | | |
− | You can submit from Eclipse using the [http://www.cs.umd.edu/~pugh/IntroProgramming/eclipseUpdate/ submit plugin]. Once you've installed it, make sure you have the .submit file from the starter files in your project root directory. Then just right-click your project, Properties, Course Project Management, check enable. When you want to submit, right-click the project and choose Submit. You may get a weird message on your first submit, but it should work.
| + | == Using Eclipse == |
| + | === Method 1: Course Project Manager Plugin === |
| + | This is the easiest method; however, to use this method, your Eclipse project needs to be in [[CVS HowTo|CVS]]. |
| | | |
− | You can also submit via the web; select your .java files and the .submit, .classpath, and .project files, right click and say Export, then Java Jar File, make sure you're exporting all the code you wrote and nothing more, then save it to your hard drive. Then on the main submit server page, click submit under project 2 and give it the .jar file you saved.
| + | # Download and install the [http://www.cs.umd.edu/~pugh/IntroProgramming/eclipseUpdate/ Course Project Manager Plugin] for Eclipse. |
| + | # Ensure that you have the .submit file from the starter files in your project root directory, and that your project is under revision control using CVS. |
| + | # Right-click your project -> Properties -> Course Project Management -> check enable. |
| + | * To submit: right-click the project and choose Submit. You may get a weird message on your first submit, but it will still go through. |
| | | |
− | You can also submit from the command-line using the same .submit file; grab the submit.jar from the public directory on GRACE. | + | === Method 2: Create a Jar file and Submit Via The Web === |
| + | You can also submit via the web. This method does not require your project to be in CVS. |
| | | |
− | Your code will be run from the <code>public static void main(String[])</code> method of the <code>Main</code> class in the default package. It will read in its input from stdin and write its output to stdout.
| + | # Right-click on your project, select Export... |
| + | # Choose Java -> Jar file (General -> Archive File will also work) |
| + | # Check only the .java files that you wrote for this assignment, as well as the .submit, .classpath, and .project files. |
| + | # Ensure 'Export java source files and resources' is checked; do not export anything else (clear the other Export checkboxes). You do ''not'' need to submit your .class files. |
| + | # Give the file a name and put it in a location you will remember. |
| + | # Click Next and then Finish. |
| + | # Navigate to the [https://submit.cs.umd.edu submit server] in your browser. |
| + | # Click 'submit' under project 2 and upload the .jar file you just created. |
| | | |
− | You can see exactly how your code will be tested by examining the public tests. | + | You may find this [[Media:Export.xml|Ant build file]] useful for automating the process of creating a jar file. |
| | | |
− | '''Troubleshooting Submit Plugin''' | + | == Hard-Core Command Line H4X0RZ == |
− | If you have followed the above directions and are still not seeing "submit project" try right clicking on the project root -> Properties -> Course Project Management -> Enable Course Project Management
| + | You can also submit from the command line using Marmoset's Java submission tool. |
| + | |
| + | # Ensure your project root directory, let's call it <code>projectroot</code>, contains the .submit file. |
| + | # Download [https://submit.cs.umd.edu:8443/docs/MarmosetHelp/samples/submit.jar submit.jar] to someplace you will remember; let's say <code>~/bin/</code> |
| + | # <code>cd projectroot</code> |
| + | # <code>java -jar ~/bin/submit.jar</code> |
| + | * The first time you submit it will ask you for your password. After that, it will store a "one-time password" (which can be used as many times as you want for a given project) unencrypted in a text file called .submitUser in your project root directory. 414 Pop Quiz: is this good security? |
| + | |
| + | For less hard-core Unix hackers, see the [https://submit.cs.umd.edu:8443/docs/MarmosetHelp/StudentGuide/commandlinesubmission.html Marmoset command line submission documentation]. |