JERPA is a utility that sets up all required directories and classpaths and allows you to compile and run a program with a few mouse clicks. In CS16, all students will use JERPA, whether you choose to program on a Linux or Windows platform. (JERPA has not yet been developed for Macs, but can be run on Mac OS X if you're not afraid of a little hacking).
Enter /course/cs016/bin/jerpa-init in a shell, and
you will be prompted for an installation location. The default is
your home directory, and we recommend using that (simply hit enter).
You can choose to install JERPA in any existing directory, however. A
directory will be created (in the installation location) named
jerpa, and several subdirectories within that.
jerpa directory, then enter
run-jerpa in a shell.
When you first run the client, you will see a "login" window:
The JERPA client supports multiple local user "profiles". Your username should already be in the "Select a local user" drop box. If it isn't, click "New User" and enter your CS login for your username. Entering your name is optional.
Ensure that your ID is selected and click Login to run the client.
The JERPA Client main interface is shown above. The window at the top is what you will be using to install CS16 assignments on your machine. To its left is the "JERPA Output" window, which will display any messages from the Client. (The other window is the Java output window. This will display all messages printed to the System.out and System.err streams; it is unlikely that you will need to refer to this.)
You will need to set up JERPA so that it knows you are taking CS16. In the WorkManager window, under "Courses," click on "Add Course." You will be prompted for the online location of the course data. The location for CS16, "www.cs.brown.edu/courses/cs016/dle/", should already be displayed here. If this is not the case, enter this string here, and click OK. You will then see a window displaying any courses found at this location. "cs16" should be the only entry listed. Click on this entry, then on the "Install Course" button. "cs16" should now show up as an entry in the "Courses" list in the WorkManager. Click on this entry and all assignments found for CS16 will be listed under "Assignments/Projects".
Now, select the desired assignment from the "Assignments" list, and click on the "Install" button. This will copy all of the files needed for that assignment to the proper places. You should see a flurry of messages in the "JERPA Output" window, with occasional pauses as larger files are downloaded/copied. Once the process is complete, the "status" for that assignment in the assignments list should change from "Avail; not Installed" to "Installed Locally."
Installing an assignment does the following:
/u/[your-login]/jerpa/users/[your-login]/courses/cs16/asgn/[assigment-name]
compile script: run this to compile your code
using the "javac" compiler. (Simply enter compile in a
shell to run it.)
run script: run this to execute your program
with the "java" program.
rundemo script: run this to run the demo.
Using a Text Editor (such as XEmacs) and the Run/Compile scripts
Edit your java files with any text editor, then compile and run them as described below.
To compile your program, enter compile in a shell from
within the assignment directory. Enter run or
rundemo from the same directory to run your code or the
demo, respectively. Any compile or runtime errors will be displayed in
the shell from which you ran the compile or run script.
NOTE: If you get "permission denied" errors when trying to
run these scripts, you need to make the files executable. To do this,
enter
"chmod 700 compile run rundemo" in a shell from
within the assignment directory.
1. Make sure you have saved all of your java files, and that they are all still located in the directory in which the stencil was originally installed by the JERPA client. Also, check that all files end in the ".java" extension, as the JERPA client will not transfer any other file types.
2. Open the JERPA Client, select "cs16" in the "Courses" list and the
assignment in the "Assignments" list. Click on the "Prepare Handin"
button. This will compress all of your java files into a single ".zip"
file, and a dialog will display the location of this file. It is
typically of the format:
/u/[your-login]/jerpa/users/[your-login]/courses/cs16/handin/[assignment-name]-handin.zip
3. To hand in the zip file, go to the programs portion of the web site, and follow the prompts. More information on this to follow.