This document should help you get set up for working on a home computer.
The software setup is the same for both CSE142 and CSE143 this quarter -
these instructions apply to both courses. You'll need to install the following
- The Java SDK from Sun
- Probably one or more of (ask your instructor which)
a simple text editor with an interface to compile and run programs
- DrJava: a Java
interpreter and development environment designed for learners, but
robust enough for developing substantial projects.
an industrial-strength Java development environment that has become
very popular in the open-source community.
We're not particularly religious about which development environment
you use. You can do most of the assignments in CSE142/3 with very
simple tools -- see the end of the document for a low-tech (yet surprisingly
powerful and useful) approach -- or with other recent Java 2 programming
environments like BlueJ, jGrasp,
Sun One Studio
(formerly known as Forte), the NetBeans
(commercial only), and so forth. You can't use Microsoft Visual
J++, however; it does not support current versions of the the Java language
If you want to work at home, you are on your own to some extent in terms
of getting stuff set up. Ask friends, read documentation, post a question
on the bulletin board, ask us -- but we can't be guaranteed to have an
answer. Ultimately you're on your own with your home computer. The UW
lab is always available as a fallback.
Regardless of the development environment that you use, the code you
turn in should only rely on the standard Sun Java libraries, and any additional
files or libraries that are distributed by us. Your code should not rely
on "wizards", special libraries that might be provided with your environment,
or code that comes from the Internet or friends (unless your instructor
says that this is appropriate for a particular assignment). The
programs you give us will be compiled and run using our set-up, which
is the standard Java language and libraries..
Java 1.5 for Windows, Linux, and Unix
You must first install the Java 2 Platform
from Sun Microsystems. We suggest using the latest version of the
Standard Edition, version 1.5.
Go visit the Java2
download page. If you're downloading the Windows version, be sure
to get the "windows offline installation", which includes all
files needed and doesn't require an active internet connection to install.
The distribution is big, roughly 52MB, so if you're connecting by slow
modem, it's going to be a pain. DSL or Cable Modem users should have an
easier time. You can always download it onto a UW lab machine with a CD
burner and make a copy that you can carry home to install.
To install, double-click on the j2sdk-XXX.exe installer program
that you downloaded from Sun, and then follow the instructions. A couple
If you have earlier versions of Java on your machine and plan to
replace them with the current version, remove the old versions
first. Use the add/remove programs control panel, and be sure
to remove all Java components, including the Java SDK, the Java Runtime
Environment (JRE), and Java Web Start. (There is a bug in some versions
of the Sun installer that can prevent some Java programs from launching
if older parts of Java are removed after the new version is installed.)
recommend you install the Java SDK in the the default directory suggested
by the installer. By doing that, you can keep your environment consistent
with IPL machines and most students and TAs' environment. And you
should be able to download the tools from us and run them directly
without the need of modification. If you already installed Java SDK
in another directory, we recommend you delete it - including the SDK,
JRE, and Java Web Start - using the add/remove programs control panel,
then run the installer and let it put the SDK in the default directory.
(Do NOT just rename the original directory. It will NOT work). If
you really want to use other directory names, you may have to make
changes in other parts of the installation to match, and you're on
Be sure you install the Java Standard Edition Software Development
Kit (J2SE SDK), formerly known as the Java Development Kit (JDK).
There is a smaller package called the Java Runtime Environment (JRE),
which is a subset of the SDK that includes files needed to run, but
not create, Java programs. The JRE is not adequate for our purposes
-- be sure to get the SDK.
We recommend that you install everything. If disk space is really
limited on your machine, you can try omitting the source code and
demos to save space, but install everything else. (You'll eventually
get the option of what you want to install when you run the j2sdk-XXX.exe
installer program that you downloaded from Sun.) However, in past
quarters, some students have had trouble getting Java to work if only
part of it is installed, so it is best to install the entire package
if you can.
Java 1.4 for Macintosh OS X
Panther: Java 1.4.1 comes installed on OS X 10.3 Panther. Java
1.4.2 is available from the software update control panel and we suggest
you install the latest version of it.
Jaguar: Version 10.2 of OS X includes Java 1.3.1. Version 1.4.1
is available from software update and we suggest you install it. Version
1.4.1 should work fine for CSE142 and CSE143, but if you want to upgrade
to 1.4.2 and beyond, you'll need to upgrade to OS X Panther (10.3). Apple
does not plan to release any new versions of Java for Jaguar.
If you have an earlier version of OS X and want to buy the latest version,
be sure to take advantage of the educational discount available through
Apple's web site. Click store at the top of Apple's main page,
then click education on the horizontal banner.
If you have installed the Developer Tools (XCode) software, get the Java
1.4 OS Tools update that corresponds to your version of Java and install
it (available at http://developer.apple.com/).
If you did not install or don't plan to use the Developer Tools, this
is not necessary.
Editors and Development Environments
Once you have installed or updated the basic Java tools on your machine,
you'll need a text editor or development environment so you can edit and
run Java programs, which are stored in simple text files. Here are some
environments that are in use in various CSE introductory classes. You're
instructor will tell you if he/she has any particular preference.
You can use any or all of these environments on the same system. Just
be sure that you install the Sun Java SDK or Apple Java update first
so that the environments can locate the Java software when they are installed.
Textpad is a simple text editor with built-in support for formatting
and running Java programs. Just download the installer for the current
version from http://www.textpad.com/download/index.html
and run it. It is about a 2MB file so it is reasonable to download over
a dialup line.
- DrJava's web site is http://drjava.sourceforge.net/.
You probably want to install the latest stable release, although the
current beta release has been quite stable. DrJava is about 1.5MB in
size, so it is a reasonable download even over a slow dialup connection.
- (Windows) Click on the download windows app button and
place it wherever you like.
- (Unix, and Linux) Click on the download jar file button
to get the .jar (Java archive) file containing DrJava and place
it wherever you like.
- (Mac OS X) Click on the download Mac OS X app button
to get the OS X version of DrJava. If you have the developer tools
(XCode) installed, we suggest you put DrJava in the Developer/Applications
folder. If you haven't installed the developer tools, we suggest
putting DrJava in your Applications folder.
- Start DrJava.
- (Windows, Unix, Linux) On most of these systems, you should be
able to run DrJava by double-clicking on the drjava jar or application
For future convenience, if you're using Windows, you might want
to create a shortcut to the DrJava file and place it on the desktop
or in some other convenient location. Right-click on the DrJava
file and select create shortcut from the popup menu.
- (Mac OS X) DrJava runs as a normal application. Double click to
- The first time you start DrJava on Windows and some other systems,
you may get a message saying "DrJava cannot find any Java compiler.
Would you like to configure [it]..." Click on yes. Assuming you've
used the default Java SDK installation, use the file dialog to select
C:\j2sdk1.4.2_05\lib\tools.jar. DrJava should then open its
main window. This extra step should not be necessary with recent versions
of DrJava, and is not necessary on Mac OS X.
- To verify that DrJava is working, enter the following line, including
the semicolon, in the interactions window pane at the bottom of the
screen, to the right of the ">" prompt.
Hit return (enter) and DrJava should display the word hello
below the line that you typed.
- If you want to use the new assert statement that was added
to Java in version 1.4 (optional for CSE142, needed for CSE143), start
DrJava if it is not already running, select Preferences...
from the Edit menu, select the Miscellaneous category,
then click the Allow assert keyword in Java 1.4 check box in
the middle of the panel, and click ok. This only needs to be
done once. DrJava currently does not support the use of assert
in the interactions window at the bottom of the screen, but you can
use it in any new classes that you create.
This is a full-featured development environment that has an enthusiastic
following in the open-source community. It is probably overkill for the
projects encountered in introductory courses like CSE142 and CSE143, but
some students have found it useful for larger projects, particularly in
- Eclipse is available from www.eclipse.org.
We suggest installing either the latest release (3.0.1 as of September,
2004) or, if you want a few additional features, the latest 3.1 stable
build (3.1M2). These are big downloads (~60-80MB), so if you have a
dialup line, you may want to download the file in a campus lab and burn
it onto a CD to carry home.
- Install Eclipse by moving the application to the Developer/Applications
folder (Mac OS X, if you have installed the developer tools), Applications
(OS X if you haven't installed developer tools), or unpacking the zip
file and installing using the usual conventions for your system (others).
- Start Eclipse by double clicking the Eclipse application.
As you read your textbook, you may come across references to special
Java libraries and sample code that the textbook authors have created.
If these are needed for your course, you will receive specific instructions
for how to use them with your assignments. Of course, you are welcome
to study the code samples in the textbook. As you do, please keep
in mind that they may use features or libraries which will not be discussed
in your course.
Department of Computer Science & Engineering
University of Washington