CS574 News

----------------------------------------------------------------------

Fri, 21 Mar 2008

Assignment 1 Tools

Quite a few people seemed uncertain about how I would obtain an instance of your classes for grading.

I have a minimal tool for loading your classes available for you to play with. You can either directly invoke the java class, or run a simple script that will attempt to recreate your jar file and then run the java program.

The simplest way to run the Java program directly is to put a jar file somewhere on rohan (let's say you're calling it my.jar), and run:

% java -cp ~stremler/Grading/test.jar:~stremler/Grading/as1.jar:my.jar Loader

This will inform you that you need to specify what class(es) you want to load. Use -k to specify your KeyObject implementation, use -r to specify your RSAAlgorithm implementation, and use -b to specify your BlockMode implementation.

For example, let's say your implementation of the KeysObject had the fully qualified name of edu.sdsu.as1.RSAKey; you'd verify that I would be able to load your code by running:

% java -cp ~stremler/Grading/test.jar:~stremler/Grading/as1.jar:my.jar Loader -k edu.sdsu.as1.RSAKey

If there's a problem, you ought to see a stack trace. Success should be obvious.

For those folks who want something a little more interactive, there's a script test1. To use it, cd to the root of your project directory, and type:

% ~stremler/Grading/test1

This script will check to make sure that there's a build.xml file, and will invoke "ant clean jar" to rebuild your code and package it up into a jar file. It will then ask you for the fully-qualified names of your implementations, and it will pass all three names to the Loader program in test.jar.



posted at: 22:42 | path: | permanent link to this entry


----------------------------------------------------------------------

CS574 News    RSS Class Page