Run the automatic lab grader

Click here to run the autograder.

The autograder is a program that uses a test harness to test your java lab. The autograder executes the following steps:

  1. Download the test harness program to your computer.
  2. Compile the test harness and your lab code.
  3. Execute the test harness, which calls your code and tests it.
  4. Gather the results and calculate a grade for your lab.
  5. Send the results back to the server.

To run the autograder, you need to supply both of the following:

On the computers in the PCWest lab at SOU, the full path to the directory containing tools.jar is C:\Program Files\Java\jdk1.5.0_09\lib

You will also be asked for:

Your userID is the same ID you use to log into the SOU network.

You supply all information after you click to run the autograder.

Hints:

System.out.print()

Write all other outputs, including input prompts for the user to:

System.err.print()
"\n"

in the parameter you pass to println(). The autograder does not handle it correctly.

System.exit()

It kills your program and the autograder as well, so the autograder is unable to report your results to the server.

·        If your program is required to read input from the user:

You must declare your Scanner variable in class level scope (outside of any method) as follows:

   private static Scanner scan = new Scanner(System.in);

 

The autograder will throwing a NoSuchElement exception if you declare use a local variable to hold a reference to your Scanner object.

 

Troubleshooting:

“Unsupported JRE version” error:

Occasionally computers on the SOU network give an “Unsupported JRE version” error, and java web start (javaws) is unable to start the autograder.  The error will look something like this:

UnsupportedJREVersionError

You can solve this problem by doing the following:

1.    Close All autograder windows, including any windows (javaws windows)

2.    Delete:

C:\Documents Settings\<User Name>\Application Data\Sun

F:\Windows NT 5.1 Workstation Profile\Application Data\Sun

3.    Start the autograder again.

Running the autograder on a mac OS X:  (Many thanks to Andrew Krug for the following hints.)

Step 1 - Install the XCode set of tools that came on your Mac OS X Tiger CD.

            (Hint: You can customize the install to just install JAVA Development tools if file size is a concern.)

 

Step 2 - Browse to the /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar file.

 

Step 3 - Drag classes.jar onto the desktop. This will make a copy.  Rename classes.jar to tools.jar.

 

Step 4 - Drag tools.jar back into /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/

 

Step 5 - A message box will pop up that states. "This folder can not be modified." There will be two buttons.  "Okay" and Authenticate.  Select the Authenticate option.  Authenticate with your admin user name and password and it will copy your new tools.jar file into the Classes directory.

 

Step 6 - Run the autograder. 

 

Step 7 - Point the autograder at your files using the Unix path system.  If you are just using your Home Directory the path will look something like /Users/YourName/Documents/CS257 (Hint: Remember Unix is cases sensitive)

 

Step 8 - Point to the new tools.jar file you just created by pasting in /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ you have the option to leave off tools.jar or append it.  The autograder will automatically look for tools.jar in whatever director you point it at. 

 

Step 9 - Run the autograder like normal.

 

Notes on other issues. 

 

If you are using a network drive or a pen drive.

            Mac OS X creates a number of hidden files in the directory with _classroom.java or _put.java. The autograder will tell you these are illegal characters.  You can either delete these files via the command line or you can you use an application called Tinker Tool.  A free download from http://www.bresink.com/osx/TinkerTool.html it will allow you to turn off creation of these files as well as many other features in OS X. 

 

Best of luck to you. Please contact Pete Nordquist with questions or comments about the autograder. If you get exceptions that you do not understand, please copy the entire output log into an email message and send it to me. Thank you.

The autograder is licensed under the GNU GPL.
Click here for source code (in zip format) for the autograder.
Click here for a sample test harness.