UW CSE logo uw

CSE 142: Computer Programming I, Summer 2008

arrow CSE Home arrow About Us arrow Search arrow Contact Info

Working at Home

(last updated Sun Jan 6 2008)

You will need to install, at most, two pieces of software: The Java Development Kit (JDK) and the jGRASP editor. The directions differ based on your operating system.


Windows users:

1) Install Java Development Kit (JDK)

http://java.sun.com/javase/downloads/index.jsp

Follow the above link and click the "Download" button next to the first option, "JDK 6 Update 3".
(Not the "with NetBeans" link or the "with Java EE" link or others below).

Note: Sun updates JDK frequently; by the time you read these directions, it may be JDK 6 Update 4 or something like that. The directions should be the same otherwise.

Accept the License Agreement and choose the "Windows Offline Installation, Multi-language" file: jdk-6u3-windows-i586-p.exe

Once you have finished downloading this file to your Desktop, you must install JDK on your system. Do this by double-clicking the JDK installer file you saved on the Desktop.

You can choose all the default options during installation.

2) Download jGRASP editor

http://jgrasp.org/

From the jGRASP web site, click the button at top-right labeled Download jGRASP. You will be taken to a download page with some survey information. You may skip this. Underneath the survey is a set of buttons. Click the jGRASP exe to download a file named jgrasp186_05.exe. Save the file to your Desktop or another convenient location.

Once you have finished downloading this file to your Desktop, you must install jGRASP on your system. Do this by double-clicking the jGRASP installer file you saved on the Desktop. Once you are done installing jGRASP, you should now have icons on your Desktop and in your Start Menu for running jGRASP.


Mac:

1) Install Java Development Kit (JDK)

Macs with the OS X operating system will have Java available automatically, but you may need to install the latest Mac version of JDK, version 5.0. Some newer Macs (purchased within the last 6 months or so) already have this software, but older ones do not. If you have a fairly new Mac, you may want to try to skip to Step 2 and see if jGRASP works, and if not, come back to this step.

If your Mac doesn't have Java installed already, you can go to this web page to download it:

http://developer.apple.com/java/download/

You probably want to choose the link that says Java for Mac OS X 10.4, Release 5 (Universal). If you have an older version of OS X, you may need to choose one of the other links. You can see your OS X version by clicking the Apple icon on the top-left of your screen and choosing "About this Mac."

Once you've downloaded the file, double-click it on your desktop to install it.

2) Download jGRASP editor

http://jgrasp.org/

There is a Mac version of jGRASP, available from the same jGRASP web site by clicking the button labeled jGRASP pkg.tar.gz. Download this file and open it, then drag the jGRASP program to your Applications folder to install it.

Common Mac jGRASP issues:

  • Some students are reporting issues with jGRASP on the Mac. Some report seeing the following strange message:

    share cache file is corrupt: /var/b/yl/yl_share_cache_ppc
    

    If you see this message, you should update your Mac to Java v1.6 by running the Mac's built-in Software Update tool. Then re-run jGRASP and click Settings, jGRASP Startup Settings, and set your Java version to 1.6.0.

  • Some students are reporting that characters are missing from their println messages on the console. We don't know what is causing this. If you have this bug, let us know what kind of Mac you have (Intel or PPC? What OS X version? etc.) and we'll try to figure it out.
  • If you continue having problems with jGRASP, you may want to try another Java editor named DrJava.

Linux:

It's tougher to give an installation guide for Linux because of the large variety of different distributions and architectures. Here is a rough guide that will work for many distributions such as Ubuntu.

1) Install Java Development Kit (JDK)

http://java.sun.com/javase/downloads/index.jsp

Follow the above link and click the "Download" button next to the "JDK 6.0 Update 3". (NOT the "with NetBeans 5.0" link or the "with Java EE" link or others). Accept the License Agreement and choose the "Linux self-extracting file" file:

jdk-6u3-linux-i586.bin

(If you use a Linux distribution that supports RPM packages such as Fedora Core, you may wish to use the "Linux RPM in self-extracting file" package.)

Once you have finished downloading the JDK .bin file, open a terminal window and execute the file. You may have to give execution permissions to the file:

chmod +x jdk-6u3-linux-i586.bin
./jdk-6u3-linux-i586.bin

Running the .bin file extracts the JDK contents. Move these to a directory of your choice. (The rest of this tutorial assumes you have moved the JDK to /usr/lib/jdk/ .)

After installing Java, you will probably wish to add Java's directory to your PATH setting, so that you can run Java commands from your terminal. To do so, edit the file .bashrc in your home directory and add the following lines to the end of it:

export PATH=/usr/lib/jdk/bin:$PATH
export CLASSPATH=.

You should close your terminal and open a new one for the PATH changes to take effect.

2) Download jGRASP editor

http://jgrasp.org/

There is a Linux version of jGRASP, available from the same jGRASP web site by clicking the button labeled jGRASP zip. Download this file and extract its contents. Then open a terminal and cd to the directory of those contents and type:

java -jar jgrasp.jar

Useful Options for Your Operating System

Enable File Extensions in Windows:

By default, Windows does not show extensions of certain types of files. This can lead to confusion because you may not know which file is your .java program and which is your .class compiled file.

If you'd like to change this value, open My Computer. From the window's main menu, click the following:

Tools, Folder Options...

A Folder Options window will appear. Click the tab labeled View, then find the checkbox labeled Hide extensions for known file types. Uncheck it. Press OK.

Now all files should show their extensions in Windows.

Valid XHTML 1.1 Valid CSS!