Computing Concepts with Java Essentials
This page refers to the out-of-print first edition of the book. There is
now a second edition.
Setup Information
JDK on Windows
We assume that you already installed the JDK. Follow these steps.
- Download the file ccjfiles.zip
- Unzip the package into a directory of your choice, such as c:\cs1.
The files will be installed in subdirectories c:\cs1\ccj,
c:\cs1\ch2 , c:\cs1\ch3 and so on. Note: You will
need Winzip or a similar package to
unzip. The venerable PKZIP 2.04g does not handle long file names. After
unzipping, you will find another file classes.zip. Do not
unzip that file.
- Edit the AUTOEXEC.BAT file and locate the statement
SET CLASSPATH=...
If there isn't such a statement, then you must add
one manually. You need to find out where the JDK files are stored;
typically in a directory such as
c:\java or c:\jdk1.1.2. Then add the following
statement as the last statement
SET CLASSPATH=c:\java\lib\classes.zip;.
(where you may need to
replace the
c:\java with the location of your JDK installation.
- Add ;c:\cs1\classes.zip (or whatever directory you chose
for storing the ccj files) to the class path. A typical class path looks
like this:
SET CLASSPATH=c:\java\lib\classes.zip;.;c:\cs1\classes.zip
- Save the AUTOEXEC.BAT file and reboot the computer.
KAWA
- Install the KAWA program.
- Download the file ccjfiles.zip
- Unzip the zip file into a directory of your choice, such as c:\cs1.
The files will be installed in subdirectories c:\cs1\ccj,
c:\cs1\ch2 , c:\cs1\ch3 and so on. Note: You will
need Winzip or a similar package to
unzip.
- Start KAWA
- Locate the package list on the left hand side of the screen.
- Right-click on the word "Packages"
- Select "Class path" from the menu
- Type in the directory into which ccjfiles.zip was extracted (such as
c:\cs1)
- Select "Save"
Code Warrior
This information is supplied by Janet Ball of the University of Hawaii:
- Download the ccj package.
- Make certain the complete CodeWarrior Java package is installed. This
is done by selecting the "Java heaven" option in the
installer.
- Compile each of the 13 "*.java" files in the ccj into 13 "*.class"
files using ClassWrangler -- part of the CodeWarrior distribution. Note
that "TextInputStream.java" and "TextOutput.java"
need to be compiled first because they are nested classes. -- e.g., "Console.java"
has "TextInputStream.java" and "TextOutputStream.java"
as nested classes.
- After compiling all ccj files using ClassWrangler, make a "zip"
file class library of the ccj package. This is done by dragging and
dropping each compiled "*.class" file individually onto
ClassWrangler (which must not be open) until all files are showing in
the window, and saving the resulting "zip" file to:
System:Java:Classes.
- To use the ccj.zip classes, the "import ccj.*" call is not
necessary. The "ccj.zip" library is simply added to the
project in the CodeWarrior IDE (Integrated Development Environment)
under the "Project" menu using the "Add files"
option BEFORE compiling the project. In the CodeWarrior IDE, "Add
files" works as the "classpath" function in javai, and
the "-classpath" instruction is reserved for telling IDE where
the "*.µ" file to be run is. (i.e., project file with "main").
John Zelle of Drake University suggests a simpler approach:
- CW 11 has a project type called Java Library. Simply create a Library
project: place all the .java files in it and do "project make".
It compiles all the classes (checking order dependencies) and creates a
.zip file.
- This zip file can then be placed in any project that uses ccj.
Microsoft J++ 1.x
This version of J++ works nicely with the first edition of the book.
However, it does not work with the second edition since it does
not support Java 2.
- Install the CD ROM as described by Microsoft.
- Download the file ccjfiles.zip
- Unzip the package into a directory of your choice, such as c:\cs1.
The files will be installed in subdirectories c:\cs1\ccj,
c:\cs1\ch2 , c:\cs1\ch3 and so on. Note: You will
need Winzip or a similar package to
unzip.
- Start Microsoft DevStudio
- From the Tools menu, chose Options. (The Options dialog box appears.)
- Select the Directories tab.
- If neccessary, select the platform from the Platform list box. (Java
Virtual Machine)
- In the Show Directories For list box, select the Class files
category.
- In the Directories box, double-click the blank line at the bottom of
the list (indicated by an empty rectangle), and type the directory into
which you expanded ccjfiles.zip (e.g. c:\cs1).

- Choose OK. Developer Studio searches directories in the order in
which they appear in the list. After adding a directory, you can move it
up or down in the list by dragging it and dropping it in the new
position.
Microsoft J++ 6.0
Microsoft J++ 6.0 is a compiler for a Java-like language, together with
a very un-Java-like class library called WFC. Rumor has it that it is
possible to turn J++ 6.0 into a regular Java compiler, but I don't know to
what extent it really is Java compatible. My recommendation: Do not use
this version of J++.
However, if you need to use J++ 6.0, you may find the following tips
helpful.
Christopher J. Adlam writes: In Visual J++ go to "View" and
then "Other Windows" and then "Object Browser".
Right-click in the "Packages Only" window and choose "Select
Current Packages/Libraries" at the bottom choose "Add",
then under "Other Java Packages" choose "browse" and
then browse to the directory with the ccj directory, double-click the ZIP
file, then check the check-box beside "Other Java Packages",
expand it fully and there will be another check-box below it with nothing
written beside it, check that and hit OK and away you go!
Further Information