Copyright ©1996-1998 by Axel T. Schreiner.  All Rights Reserved.



Programming with Java



Axel-Tobias Schreiner
Department of Mathematics and Computer Science
University of Osnabrück, Germany



This text contains copies of the overhead transparencies used during the lectures. The information is available on the World Wide Web; it is linked to a copy of the documentation for the Java Development Kit (JDK). The programming examples are extracted directly from this text, a few have been taken from the JDK.

The text also exists as a sequence of PDF documents and can be viewed on other platforms. These documents can be printed with the Acrobat Reader from Adobe, especially on Windows.

Basic knowledge of ANSI-C and object oriented programming is assumed, some knowledge of parallel programming, networking, and compiler construction would be helpful. This text does not constitute a complete transcript of the lectures. Additionally one should books about Java and perhaps about the World Wide Web.

Contents
1 Introduction 3
2 The language Java 19
3 The Abstract Window Toolkit 107
4 Event management 167
5 Layout management 203
6 Client-server programming 225
7 Database access 257
8 The parser generator JavaCC 265
A Class hierarchy 285



Literature

There is an almost infinite number of (not necessarily good) books about Java and even  more about the World Wide Web. The following books I found quite useful, however.

Flanagan 1-56592-262-X Java in a Nutshell (2nd Edition)
Flanagan 1-56592-371-5 Java Examples in a Nutshell
Grabowski 0-387-94831-7 The Web Publisher's Illustrated Quick Reference

The following books were written by the Java developers themselves and are relatively useful. Second editions are available or in the making, more or less face-lifted for Java 1.1:

Arnold/Gosling 0-201-31006-6 The Java Programming Language (2nd Ed.)
Campione/Walrath 0-201-31007-4 The Java Tutorial (2nd Ed.)
Chan 0-201-37967-8 The Java Developers Almanach (1998 Ed.)
Chan/Lee 0-201-63458-9 The Java Class Libraries: An Annotated Reference
Chan/Lee/Kramer 0-201-31002-3 The Java Class Libraries (2nd Ed.) Vol. 1
Chan/Lee 0-201-31003-1 The Java Class Libraries (2nd Ed.) Vol. 2
Gosling/Joy/Steele 0-201-63451-1 The Java Language Specification
Gosling/Yellin et al. 3-8273-1040-7 Java API Volume 1: Basic Packages
Gosling/Yellin et al. 3-8273-1084-9 Java API Volume 2: Window Toolkit and Applets
Hamilton/Cattell/Fisher 0-201-30995-5 JDBC -- Database Access with Java
Kanerva 0-201-63456-2 The Java FAQ: Frequently Asked Questions
Lea 0-201-69581-2 Concurrent Programming in Java
Liang/Sterns 0-201-32577-2 Java Native Interface
Lindholm/Yellin 0-201-63452-X The Java Virtual Machine Specification
Sowizral/Rushforth et.al. 0-201-32576-4 The Java 3D API Specification
Sridharan 0-13-749136-0 Advanced Java Networking

Two of the ISBNs refer to the German editions.

A very good overview to Java is the Java Language Environment Whitepaper by Gosling and McGilton and the Java OS Whitepaper by Madany.

06/May/1998