JERPA for Windows

Installing the JDK

JERPA is a Java application, so you will need a recent version of Sun's Standard Development Kit (SDK) for java. (Note that SDK and JDK are used interchangeably and sometimes confusingly.) The SDK is a set of applications and libraries which allow for the development and deployment of Java programs on a specific platform (in this case, Windows). The SDK can be downloaded for free from Sun's web site (see link below). It is necessary that you download version 1.5 as this is the current version of Java and we use it in our support code.

If you know that you already have a version of the SDK installed locally, please ensure that it is version 1.5. If so, you do not need to download and install a new version of the SDK. If you have a version of the SDK that predates this, you must upgrade to 1.5.

To download the SDK 1.5., visit http://java.sun.com/j2se/1.5.0/download.html.
Scroll down to where it says "Download JDK 5.0 Update 6," and download the SDK. Make sure you download the SDK and NOT the JRE.

You may also want to check out Sun's main Java resource page (http://java.sun.com).

The file you download will be an executable installation utility. Simply run this file and follow any on-screen instructions and prompts. Note: installing JERPA will be easier if you accept the default SDK install directory. Do NOT choose an install directory that contains spaces (e.g. C:\Program Files).

Installing the JERPA Student Client

Once you have set up the SDK on your computer, you can download and install JERPA Student Client. The JERPA installation utility is an Executable JAR File. A JAR ("Java ARchive") file is a compressed collection of Java programs/libraries and is used to conveniently bundle and transfer a large Java program. An Executable JAR File is one that can also be run as a program by double-clicking on it in Windows Explorer (this association should have been set up by the SDK installer).

The first step is to download the JERPA Client JAR file. The link to this file is provided below. Important Note for Netscape Users: Do not download this file by simply clicking on it. Some versions of Netscape will try to display the file as text, and saving this will result in a corrupted version of the file. Instead, right-click on the link, select "Save Link As..," then save it to your system.

JERPA Client Executable JAR File

To test that the JAR file was downloaded successfully, you should check that the size of the file you downloaded matches that of the file on the server (to get a file's size, right-click on the file and select "Properties"). It should be 11,718 bytes. If you downloaded using Netscape using the above method and there is still a mismatch in sizes, try using Internet Explorer.

Once you have the JAR file on your local system, you can execute it by double clicking on the file in Windows Explorer or on the Desktop (if you stored it there). After a few seconds, a window labeled "JERPA Client Installer" should appear. If this does not happen, there are two likely explanations:

Once you have the installer running, you will be prompted for the SDK install directory. If you installed the sdk to the default directory, you should enter "c:\j2sdk1.5.0. Otherwise, provide the appropriate SDK install directory.

You will also be prompted for the directory where you want JERPA client to be installed. "C:\jerpa" is the default; you may specify a different one if you'd like (however, avoid choosing a directory with spaces in the name, such as "C:\Program Files"; this may result in errors running the client or your Java programs).

Running the JERPA Client for the first time

The installer will set up an executable "batch" file named jerpa.bat which you will use to run JERPA. When you run this file, an MS-DOS window will show up. You may safely ignore this window for now (but do not close it while the Client is running -- this will terminate the Java process, and hence, the Client). MS-DOS windows are a common sight when you are working with Java under Windows (they are the closest equivalent of UNIX shells that Windows has).

Go into the jerpa directory, then run the file jerpa.bat. When you first run the client, you will see a "login" window:

The JERPA client supports multiple local user "profiles." If your username doesn't appear in the "local user" drop box, 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. Enter the location for CS16, "www.cs.brown.edu/courses/cs016/dle/", in the box 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".

Using the JERPA Client to Install Assignments

Run JERPA client if it is not already running. In the WorkManager window, click on the "cs16" entry under "Courses". This will list all assignments for this course found on the server.

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."

Note: The first time you run the Jerpa client, you may not be able to install any assignments. So if "Avail; not Installed" does not change to "Installed Locally", simply quit the client and re-run it. Everything should work fine. We are working to track down this bug.

Working on Assignments

Installing an assignment does the following:

Using a Text Editor and the Run/Compile batch files

This most closely resembles the process for working on assignments that you are familiar with from the Sunlab. It involves using a text editor along with the javac and java utilities to edit, compile, and test your programs.

You may use any text editor you like; the default Windows "Notepad" will work, though there are a number of more powerful ones available as shareware.

The compile.bat and run.bat files described above will be used to compile and execute your program. compile.bat will open a DOS prompt and run javac on all of the java files found in the assignment directory. Any errors will be displayed in this DOS window. run.bat will also open a DOS window run the main class. All runtime errors will be displayed here.

If the .bat files don't seem to work, take the following steps:

  1. Make sure you are compiling your code before running it.
  2. Open up each .bat file in a text editor (such as Notepad) and delete the trailing newline. To do this, by place the cursor at the very end of the file and press "backspace".

If things still don't seem to work, please e-mail the head TAs.

Handing In

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:
c:\[jerpa-home]\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 click on "Hand In" next to the programs's name. Enter the filename of the zip file, and then click "Handin".

Support

The best place to turn for support is the CS16 newsgroup; please place "[JERPA]" in the subject so that we can easily identify these messages. You may also email the head tas with jerpa questions.