Chapter 19. Java

SUN microsystems started developing Java (originally under the name "Oak") in 1991 as a programming environment for small devices such as set-top boxes for interactive TV. Java was officially announced in 1995 and quickly gained popularity together with the internet (partly because of the integration of Java in the Netscape and Microsoft web browsers). Especially after the introduction of the Java 2 platform end of 1998 (Java 1.2), the language (and programming environment) took the software industry by storm entering more and more areas from enterprise server applications to mobile phones.

Java is more than just a programming language. It also defines a run-time environment with a well-defined byte-code language, the Java virtual machine, on top of which other languages can be implemented (such as JavaScript or Jython). In this chapter we will focus on Java, the programming language.

19.1. Software and Installation

We will be using the SUN's Java software development kit (J2SDK), version 1.4.2, which you can download for a number of platforms from the main Java site. We mainly need the compiler javac to compile the source code into the intermediate byte code, and the interpreter java to run this byte code.

References

If you would like to feel the original spirit of the Java "movement", have a look into Hoff96>. To learn Java, especially with a C/C++ background, the Nutshell book Flanagan02> is still the best in my opinion. If you want to get a deeper understanding of how to write good Java programs (and you have more time since you are facing 1400 pages), Eckel02> is for you. This book is particularly interesting if viewed in the context of Bruce Eckel's C++ book and his more recent move towards Python.

[Hoff96] Arthur van Hoff, Sami Shaio, and Orca Starbuck, 0-201-48837-X, Addison-Wesley, 1996, Hooked on Java: Creating hot Web sites with Java applets.

[Flanagan02] David Flanagan, 0596002831, O'Reilly, 2002, Java in a Nutshell, 4th edition.

[Eckel02] Bruce Eckel, 0131002872, Prentice Hall, 2002, Thinking in Java, 3rd edition.