ASCII Smiley Face Daniel Dickinson Mini Headshot
The C Shore
Daniel Dickinson's Website - Experimental

Installing Java 1.1 and the CCJ package under Windows 95/98/NT4

Revision 3.1

Originally written for 27-160 (Intro Computers) at the University of Guelph.

1. What you need

Recommended System

NB: May run acceptably on lesser systems, however it’s not recommended

Also Note: This document does not cover the Linux JDK.

IMPORTANT NOTE: When downloading files remember where you save them!

1.2 Java Development Kit 1.1.8 for Windows

Download it from http://java.sun.com/products/jdk/1.1/download-jdk-windows.html

The CD-ROM that was included on the back of the back cover of your textbook comes with JDK 1.1.6. In the following instructions simply substitute JDK 1.1.6 for 1.1.8

The only required component is the JDK 1.1.8 (Java Development Kit 1.1.8), but if you wish you can also download the documentation and the JIT (Just In Time compiler - speeds up performance of code which is executed often in you programs) add-on.

1.3 CCJ Package

Download it from http://www.horstmann.com/ccj1.html

1.4 A Text Editor with Line Numbering

You have many options here such as Windows Notepad, DOS EDIT, and PFE32 (Programmer's File Editor 32-bit version). Of these PFE32 is my favourite because of its many features but unfortunately the author has discontinued support and has not responded to my requests to let me continue his work.

Notepad doesn't have line numbering so it is probably a bad choice. In addition, in order to use the files you create under Notepad you have to rename them if you are using NT4 (because Notepad will automatically add .txt to your filename). DOS EDIT has line numbering but again will require file renaming under NT4 (since Edit only understands old style 8-letter name plus 3-letter extension form of naming under Windows NT - under Windows 95/98 you won't have that problem). PFE32 on the other hand doesn't come with you system and you will have to obtain and install it. If you think you want it, check out The SimTel.Net archive's copy of PFE32

1.5 Power Archiver (or equivalent)

In order to install the programs listed above, you will need to download and install a decompression program such as Power Archiver which can be obtained from http://powerarchiver.efront.com/.

2. Installation

2.1 Power Archiver

To install PowerArchiver simply double-click on the file you downloaded from the website and follow the directions. In most cases you should be able to do a complete install by simply accepting the defaults and clicking on the Next button for each step.

2.2 JDK 1.1.8

2.2.1 To install the JDK

For complete instructions refer to http://java.sun.com/products/jdk/1.1/installation-win32-x86.html

Double-click on jdk118-win32 which you downloaded and follow instructions.

If you downloaded the .zip version rather than the .exe you will have to unzip the file first. To do so, start Power Archiver and when you see Next click it once. Power Archiver will search the folders you specified as your favourites. If the JDK file is not in one of those folders, click on the Search button and choose Search Disk, and set the disk to "My Computer", then click Next. Click on the JDK filename and then click Next. Select the location in which you want the installation temporary files to be placed, then click Unzip Now. Open that folder and double-click the JDK install file, or, instead of Unzip Now choose the Install option.

2.2.2 Installing the Documentation

If you have the documentation and wish to install use WinZip as above, except make sure that the folder you are extracting to is the folder created for the JDK (usually something like C:\JDK1.1.8).

2.2.3 Important Post-Installation Information

If you want to be able to run the Java tools while working in any directory, you need to add to your computers PATH variable.

Under Windows 95/98

On C:\ Edit the file AUTOEXEC.BAT

NB: If you want to be able to use the JDK when you boot to MS-DOS as well as from a Windows you need to also edit properties of the "Exit To Dos" shortcut which is located in C:\WINDOWS directory for Windows 95/98. To edit the MS-DOS boot AUTOEXEC.BAT right-click on the "Exit To Dos" file in the C:\WINDOWS directory and click on 'Properties'. In the properties dialog go to the section which allows you to specify an alternate AUTOEXEC.BAT and do the same things in it as you are instructed to do for the main AUTOEXEC.BAT as described below:

At the end of your AUTOEXEC.BAT file add the following:

PATH=%PATH%; followed by the full path to the folder to which you installed the JDK plus \BIN

e.g. Assuming you installed the JDK to C:\JDK1.1.8 you would now have PATH=%PATH%;C:\JDK1.1.8\BIN

Reboot: After editing your AUTOEXEC file you will need to reboot for your changes to take effect, however if you are going to be using CCJ do this when indicated in the CCJ install instructions instead of now.

Under Windows NT

Go to Start|Settings|Control Panel|System Environment tab and add the location of the JDK binaries (C:\JDK1.1.8\BIN in the example above) to the PATH variable .

(So the path would might read C:\WINNT;C:\WINNT\SYSTEM32;C:\JDK1.1.8\BIN)

2.3 CCJ Files

Full instructions my be found at: http://www.horstmann.com/ccj/help.html

Unzip the ccjfiles.zip file into the directory you would like to store the CCJ Toolkit files in. C:\CCJ is recommended and C:\JDK1.1.8 (or C:\JDK1.1.8\BIN or \LIB) are to be avoided.

Add a CLASSPATH environment variable pointing the CCJ files:

Under Windows 95/98

Edit the C:\AUTOEXEC.BAT file as for adding the PATH statement except add the line: SET CLASSPATH=C:\JDK1.1.8\LIB\CLASSES.ZIP;.;C:\CCJ\CLASSES.ZIP

Assuming you installed the JDK to C:\JDK1.1.8 and the CCJ Toolkit to C:\CCJ.

Reboot: In order for your changes to take effect you will need to reboot Win95/98

Under Windows NT

Add a CLASSPATH environment variable (Start|Settings|Control Panel|System ...)>With the value C:\JDK1.1.8\LIB\CLASSES.ZIP;.;C:\CCJ\CLASSES.ZIP assuming the JDK is installed to C:\JDK1.1.8 and the CCJ Toolkit is in C:\CCJ

2.6 Programmer's File Editor (PFE)

This is a very good editor, but it is no longer actively supported by the author.

2.6.1 Quick Summary of PFE Install

  1. Using Power Archiver "CheckOut" PFE to the folder of your choice (e.g. C:\PFE)

(Make sure you have “Create Icons for Programs and Documents Only” checked)

  1. Close Power Archiver: DO NOT delete CheckOut folder
  2. Look at Options|Preferences and set PFE up to work to your preferences

HINT: If you are an advanced user you can set up PFE to operate differently depending on the type of file you are working with. (i.e. PFE can be a good replacement for Notepad for .txt files and still be a good Java editor for .java files). To do this look at Options|Edit Default Modes and use Mode Groups.

You can also set PFE to start automatically on double-clicking on file-types of your choice. Take a look at Options|Preferences|Associations

3 FAQ

3.1 I followed the instructions exactly and my installation doesn't work

  1. You need to reboot after modifying your AUTOEXEC.BAT in order for the changes you made to take effect.
  2. See 3.2

3.2 I followed the instructions, reread the FAQ, and my Java program still won't compile/run

Make sure the program is correct. Test it on a friend's (working) machine, then make sure you use the saved copy of the working program on your own machine. If it works on another machine but not yours, you need to retry the installation and/or contact a more knowledgable person. If it doesn't work on the other machine the problem [with the program] probably isn't the installation but a programming error (which is beyond the scope of this document).

3.3 I don't understand something in the guide

E-mail author of this guide danielfdickinson@yahoo.ca for assistance.

3.4 How do I upgrade from JDK1.1.6 to JDK1.1.8

You probably don't need to, and doing so requires download an 8MB+ file just like an original installation.

3.5 What is CCJ?

CCJ is a java packages (set of classes) designed by the author of Computing Concepts with Java Essentials, 1. ed., Cay Horstmann. He created the package to make learning Java 1.1 a bit easier for novice computer programmers. In his second edition book he uses Java 2 and no longer has a supplementary package as he feels that it is no longer necessary with Java 2.

4 Changes

4.1 Changes Since Revision 1.1/1.0

Unknown - Revision history added in Revision 2.0

4.2 Changes Since Revision 1.2

4.3 Changes Since Revision 2.0

4.4 Changes since Revision 3.0