A single textbook is not recommended for this course, even though there are many good first year level textbooks. We will discuss alternatives in lecture. Many resources are also available on the web.
New The campus bookstore should have copies of a book called "Introduction to Java Programming, Core Version" by Y. Daniel Liang. This is a decent text and is used by other CISC101 instructors and is also used for some CISC121 courses. Look for the 5th or possibly 6th edition.
Java by Dissection by Ira Pohl and Charlie McDowell, (Addison Wesley, 2000) Used in CISC101, and a very solid introductory text. Consise presentation.
Java: An Introduction to Computer Science & Programming, by Walter Savitch, 2nd Edition (Prentice Hall, 2001) Used in other CISC121 courses. The second edition uses Java2, but the first edition would be adequate. The third edition is out now, but you will be unlikely to find a used copy.
Java, A Framework for Programming and Problem Solving, by K.A. Lambert and M. Osborne (PWS Publishing, 1999) Used for CISC101.
Java: First Contact, by R. Garside and J. Mariani (Course Technology, 1998) Also used by CISC101.
When looking for newer textbooks make sure they cover Java version 1.5 or "Java5.0". The textbook list above is only a partial list which
concentrates on elementary books that have been used in other courses -
many other books exist!
Environments for Macintosh users will be described below.
You are welcome and encouraged to use any development environment that you are comfortable with. When you submit an assignment, you will only provide your Java code (*.java files). These files will not keep any imprint of the development environment. The TA should be able to run your program on any system he chooses.
Not all environments support the use of Java 5.0, which is the Java version recommended and used in this course. For example, Ready To Program does not, and will never, use Java 5. However, Eclipse, JBuilder and BlueJ all have versions that are compatible with the latest version of Java.
I can describe a few options for you to check out if you do not already have an environment you like to use:
Ready To Program, is probably the simplest environment to use if you have not done much coding. Ready uses an older version of Java and does not supply any of the useful features for editing multiple files. It does not have any debugging features. Ready is available on the JEF lab machines. You can download your own version for Windows from Packman.
Another popular (and free) IDE for Java is BlueJ. The initial download, version 2.1.3, is about 2.8 Mb, but you also have to download the JDK (from Sun) separately for BlueJ to work. BlueJ can use Java 5.0, but must be configured to do so. This is also a very simple environment for beginning coders, but it lacks many of the helpful features of "real" environments, such as the two listed below:
JBuilder is a more "industrial-strength" environment. If you are used to using a more sophisticated IDE to develop your code or wish to learn one, and you are running with at least a Pentium III, then you might be happier using this one. Borland JBuilder "2005" can be downloaded for free from www.borland.com. Choose "Foundation". The download is large, and you may also wish to download the documentation. You can download versions to run on Windows, Linux, Solaris, and the Mac OS. The download process will give you instructions on how to register the software. The download includes a compatible version of the JDK.
Eclipse, version 3.1, is a much less commercial product than JBuilder and is a sophisticated development tool that can develop code in several languages, including Java. The environment can be expanded in many directions by adding functional modules, most of which are free. This is the tool that will be used in lecture demonstrations. See the instructions in the section below for more detail on how to install and configure eclipse, the JDK and the API.
The Sun JDK ("Java Development Kit"), version 1.5.0 for Windows, Linux and Solaris is available from here. It is a 40.9MB download, but you will need it when using BlueJ or eclipse. All Java development tools use the Sun JDK in the background. All they really are is fancy code editors! If you are happy with command line (or "DOS") based environments, they you can use the JDK directly, along with a simple text editor.
Many students have had success running the Macintosh version of Eclipse, but others have found that it is a bit unreliable. An alternative is discussed here:
(My thanks to go a former CISC212 student of mine (and fanatical MAC User!), Matthias Melhorn-Boe (QLink ID: 4mmb2) for this information.)
He recommends xCode, which comes on the software restore discs that ship with each new Mac. If you have a problem getting access to these discs (i.e. 2nd hand Mac, discs left at home, etc.), Matthias would be happy to meet with you to help set it up (from his software restore discs, if necessary).
You should also sign up for the Apple Developer Connection (ADC). This is where all updates for xCode and the Apple JDK (i.e. the latest version of Java 5.0) are posted.
To ensure Java 5.0 compatibility: go to this web page (available from the ADC). This page details the steps necessary to set up xCode to compile and run Java applets and applications using Java 5.0.
Matthias would also be happy to help any beginning Mac programmers. Please contact him through QLink and mention that you are a student of Prof. McLeod.
These instructions apply mainly to the installation and configuration of eclipse for Windows, but there is also some useful information on the JDK and the API documentation.
You need three files:
The second file contains the standard API ("Application Programmers Interface") documentation for the JDK.
The third file is eclipse.
The order is not too critical, but you must install the JDK before the API documentation. It is probably easiest to install the JDK before installing eclipse. Run the JDK installer by double-clicking on the executable. It will create the folders: "jdk1.5.0_04" and "jre1.5.0_04" in "Program Files\Java\".
Use an "un-zipping" utility to unzip the API documentation file to the "jdk1.5.0_04" folder. When unzipping, make sure you use the folder names included with the compressed files. It will create another folder called "docs". For convenience, create a desktop shortcut to the file "index.html" found in "docs\api". A more general index file on the Java language is provided in docs, but you will use the API index most often.
Unzip the eclipse file to the Program Files folder. It will create a folder there called "eclipse" (big suprise!). Again, for convenience, you can add a shortcut to the eclipse.exe file on your desktop, or wherever else you please. The first time you start eclipse, it will create a folder called "workspace" in your Documents and Settings folder by default. For me, for example, the folder was created as "C:\Documents and Settings\Alan\workspace". You can put the folder wherever you like by changing the default location the first time you start eclipse. This folder will hold the project description files and can hold your java files, if you wish.
If you have not started eclipse before, you will be first greeted with the "Welcome" screen. If you wish you can browse through this material. In particular, you might find the "Java Development" Tutorial useful. Click on the the "Workbench" link to close the Welcome screen and go to the work area. You can always open the Welcome screen again through the Help menu option.
Once you are back at the eclipse workbench, you will have to tell eclipse that you wish to use Java 5.0 (or "Java 1.5.0") by default. From the menu bar items, select Window, then "Preferences". In the "Java" tree at the left, choose "Installed JRE's", click on the "Search..." button. Browse to the "Program Files\Java" folder and click on "OK". The 1.5.0 version of the JDK and JRE should have been added to the list, after a little while. (If you installed the 1.5.0 JRE before installing eclipse, it might already be listed.) Check the box beside the 1.5.0 JRE item. Allow the program to carry out its rebuild. Still in the "Java" tree, select "Compiler" and select "5.0" as the Compiler Compliance Level. Close the Preferences Window. If this has all been carried out properly, the default compiler compliance level for new projects should be 5.0, not 1.4. To learn how to create projects and run application, you can follow the tutorial instructions, and I will demonstrate the process in class.