CS 5 Software Install Page       (Click here for each problem's Zip File)       (Take CS 5 anywhere)

Take CS 5 home! (or at least back to your dorm room...).
Below are detailed instructions for getting class code to run on your machine.
If you're just looking for the code that starts of each CS 5 assignment, go to the CS 5 Zip Files page.



Windows

(See below for Mac and Linux instructions).
  1. Check for Java itself

    To see if you have the Java SDK (software development kit) already on your computer, go to your C: drive and look for a folder named C:\j2sdk1.4.2_05 or some similar name. It will always be at the top level in C:, though it may have a different version number. If you don't have at least version 1.4.something, definitely download the newest one from here:

    j2sdk-1_4_2_05-windows-i586-p.exe

    This is a large file... . Once you've copied it to your machine, double-click on it and then follow the installer instructions to unpack it.

  2. It's actually not necessary to install JCreator to write Java programs (see the Linux instructions below for command-line techniques), but it can make programming much easier -- and it's what we'll be using in the PC labs. If you'd like to use JCreator (PC only) it's freely available:

    jcrea300.zip

    Download and unzip the above file. If you don't have a program that will unzip things, try filzip, a very nice, free zip program.
    When unzipped, you will see a file named setup.exe. Double-click Setup.exe and follow the installation instructions in order to set up JCreator.

    Either choose to run JCreator at the end of the installation process or double-click the desktop icon to run it for the first time. Three setup screens will appear:


    After setup, you should see the main JCreator screen with no files open. You will probably want to exit JCreator for now (until you download the CS 5 software, which is the next step...)


  3. Download and run the CS 5 assignment software

    Depending on the problem you want to work on, there are different sets of files with which to start. Click on the link below and download the problem you would like to work on. Note! if you have already started a problem, you can work on it from your networked (H:) charlie home directory.

    Page with CS 5 assignment software

    If you're at another college, at home in Maine, or vacationing in Vienna, you can still work on any problem whose code you have submitted with the CS 5 submit system. Click on the link below for the instructions:

    Working on CS 5 when vacationing in Vienna






Mac OS X

OS 9 and earlier versions do not support java and so won't work with CS 5... .

  1. OS X comes with java installed.

    You don't need to do this, but you can check for java explicitly by opening a terminal window, a command-line application in Applications -- Utilities -- Terminal. At the prompt, type
        /usr/bin/java -version
      
    and you'll see something like
        java version "1.4.2_05"
      
    Older versions or newer versions are OK.

  2. OS X comes with Project Builder or XCode

    Project builder was the name of the Mac programming environment before version 10.3 of the operating system. XCode is the name of the programming environment since version 10.3. They're quite similar.

    Check to see if you have Project Builder or XCode by going to the LOOK THIS UP!!.

    If you do not have this development directory, or you do have either XCode or Project Builder, you can install one of them from your OS X cds. (In fact, you are likely to have a CD that is labeled development tools.) Simply insert the CD and follow the installation instructions. If you don't have your OS X cds and have no way to get either XCode or Project Builder, you can work from the Mac lab in Parsons, or use the command-line instructions below.

  3. Download and run the CS 5 assignment software

    Depending on the problem you want to work on, there are different sets of files with which to start. Click on the link below and download the problem you would like to work on. Note! if you have already started a problem, you can work on it from your networked (HMC_2008) charlie home directory.

    Page with CS 5 assignment software

    If you're at another college, at home in Maine, or vacationing in Vienna, you can still work on any problem whose code you have submitted with the CS 5 submit system. Click on the link below for the instructions:

    Working on CS 5 when vacationing in Vienna





Running from the command line

(Linux, Mac OS X, Windows, ...)

  1. You can compile and run programs from the command prompt (rather than JCreator or XCode or Project Builder or any other development environment) under Windows or Mac OS X or Linux, as long as you're comfortable with command-line tools and are happy to write your code in your own favorite text editor, e.g. notepad is the simplest, textpad has lots of nice syntax-highlighting features for windows. The Mac has a text editor built-in (but you have to be able to save to raw text, not rich text format. On linux, you may be using Emacs or vim.

  2. Once you have java installed (it's already there under MacOS X; see above for Windows instructions, otherwise track down a free java implementation for your OS of choice), you can download and unzip one of the CS 5 Zip Files from the link below.

    Page with CS 5 assignment software

    If you're at another college, at home in Maine, or vacationing in Vienna, you can still work on any problem whose code you have submitted with the CS 5 submit system. Click on the link below for the instructions:

    Working on CS 5 when vacationing in Vienna

  3. Now, open a command window to the folder you've just downloaded and unzipped and go into the source_code subfolder. Within that directory, type
        javac -classpath . *.java
      
    which says to compile all of the java files using the current directory (.) as the "classpath," that is, the place to look for code. If there are compiler errors, they will be printed out and you can fix them, save your file, and try again.

    If your system complains about not being able to find the javac compiler, either you don't have it or it's not in your system's path (in which it looks for executables). Simply type the full path name (or add it to your path), e.g.
        /usr/bin/javac -classpath . *.java               % on a Mac
        C:\j2sdk1.4.2_05\bin\javac -classpath . *.java   % on a Windows PC
        /whateverpath/javac -classpath . *.java          % on a linux box
      


    When you have fixed any and all compiler errors, you can run the program with
        java CS5App
      
    with the same warnings about path names... the path to javac and java will almost certainly be the same.