The DCS grading programs — installing on your own machine

Installing your own copy of the grading programs is very easy.

Check your Java

Make sure you have Java installed; you need version 1.6 or 1.7. Open a command-line window and type this command:

            java -version
        

You should see about three lines telling you which Java run-time environment you have installed.

If you need to install Java ...

You can get Java 1.6 or 1.7 from Oracle's web site at http://www.oracle.com/technetwork/java/javase/downloads/index.html.

There's one exception: if you're using a Mac and you want Java 1.6, then you need to visit Apple's web site, http://support.apple.com/downloads/#java. However, as explained in some bad-tempered comments in the "Change history" page, you could reasonably choose to use Java 1.7 even on a Mac.

If you only need to run the grading programs, and are not planning to write and compile Java programs yourself, you only need the "JRE" (Java Runtime Environment), not the full "JDK" (Java Development Kit). The JDK includes a JRE, so don't install both, even if you think you might want to write programs of your own as well as running the grading programs.

What is this "Java", anyway?

Java is a compiled language, but it's compiled to code for a "virtual machine" (more precisely, a "process virtual machine") that translates the compiled code, one step at a time, to instructions of the actual machine it's running on. This means that the compiled program can run on various computers running various operating systems without having to be recompiled.

That's the idea, and though it gets a little shaky in some cases, such as with GUIs, it does mean that there only needs to be one compiled version of the grading programs that can be used on any of your computers. The next section tells you to copy one file, grade.jar, which is the compiled program. You don't need the source code, because you don't need to compile the program yourself.

Copy the files you need

You need two files, "grade.jar" and "makecmds". They are in the directory containing the grading programs listed in the section "Where are the grading programs?" in the introductory page of this site.

As mentioned in the previous section, grade.jar contains the compiled Java code for all the grading programs. You can't just run all that code, because the various grading programs are put together from different subsets of the code. Each program is a command-line script that chooses the relevant bits. The second file that you need to copy, makecmds, is also command-line script that you run (once!) to create all the individual grading programs. The next, astonishingly brief section tells you how to do that.

Set up the scripts for each command

Read the makecmds file, which tells you what to do. The first step is to edit makecmds itself. The next is to execute it.

You're finished. Try it out.

Wait … you're on Windows?

We're not quite ready for that yet: the programs work on Windows, but there aren't scripts to run them conveniently — though you might be able to write your own scripts by looking at makecmds.