
How to Install the Predefined Wu Classes
by Larry Arnoldy
For some of the exercises in
Chapter 2 of the UMUC CMIS102A and CMIS140A textbook (An Introduction
to Object Oriented
Programming with Java by Thomas Wu) predefined classes must be
used. These classes must first be
downloaded from the author's web site.
Step 1 - Navigate to Wu's Predefined
Classes web page.
Use an Internet browser to navigate to
his page of
predefined
classes. There are four downloads on this page.
- javabook - a package for doing input and output
- galapagos - a package for doing turtle graphics
- javabook documentation
- galapagos documentation
Step 2 - Download all four of these
files.
Download each of the four files to a
location on your PC. It is a
good idea to have a special location for downloaded files.
Step 3 - Unzip the files to a permanent location (except for
javabookEd3.zip).
The two doc files and the
updated_galapagos.zip file
should be unzipped to permanent location. The
javabookEd3.zip file does
not need to be unzipped, but should be copied
to a permanent location.
Use a zip utility to unzip the three files. Windows XP has one built
in. Otherwise you may wish to try
WinZIp.
It is not really important where the doc files go, but you need to
remember the location so that you can use them later. The
updated_galapagos.zip file
must be unzipped into a directory named
galapagos, because the
package name is galapagos. For the reason why the file name must be
galapagos and why this file
must be unzipped, read
this explanation.
Step 4 - Copy javabookEd3.zip to your
directory for predefined classes.
Use a file explorer to copy
javabookEd3.zip to the same
directory where the
galapagos directory
is located. If all went correctly you have installed Wu's two sets of
predefined classes and
their documentation to your PC. To look at the documentation,
use the menu options
File | Open
File ...
(Netscape/Mozilla) or
File |
Open ... (Internet Explorer)
of your favorite browser to navigate to
index.html,
that is located in
subdirectory of each documentation directory. Then double click
index.html.
For
advanced Java users: Why is the
javabookEd2.zip is not unzipped and why must updated_galapagos.zip
be unzipped.
A zip file can be used in a
classpath if its contents exactly match the directory structure of a
Java package. The package name must be the root directory of the zip
file (or one of the root directories if there is more than one package
in the zip file). This is the case with javabookEd2.zip. If you use a
zip file tool to look at its internal structure, you will see that javabook is the root directory
and all of the Java class files are in the javabook directory.
This is the preferred way to structure a zip or jar file.
Unfortunately this is not the case with the updated_galapagos.zip file. The
package name is galapagos,
but in the zip file all of the Java files are in the root directory.
There is no galapagos directory.
Therefore it was necessary to unzip the files and put them into a
directory named galapagos.
If you wish you can then zip up this new galapagos directory and the
files within it and use it in a classpath. I do not know why Wu
structured the zip file in this manner.
Last modified: 13 June 2004