2.1. Java Tools and Environment
In this chapter, we concentrate on Java concepts and do not spend much time on tools. So we will refer only to the command-line java runtime and the javac compiler for Java 5.0. But we have also packaged all of the example code in this book to be run with the open-source Eclipse integrated development environment (IDE). If you would like to follow along with the examples using Eclipse, see Appendix A for an introduction to Eclipse and full instructions on loading the example project. You can then return here to follow along as we build the examples.
If you want to use the command line to follow our examples, you'll need to install the Sun Java Development Environment (JDK) before proceeding. As described at the end of Chapter 1, you can get the latest version online or find Java 5.0 on the CD accompanying this book. The Java 5.0 JDK is called, somewhat confusingly, JDK 1.5. The JDK comes with a standard installer. If you have problems running the command-line tools, turn to "Troubleshooting" at the end of this chapter for some guidance.
We'll show a Windows command prompt in this chapter. To follow along using the command line, simply open a command window. (Under Windows, select Start Run. Type command and press Enter.) Type the given command, and press Enter.
C:\> javac HelloJava.java
The command you enter is identical on Unix, except where explicitly noted. Most other command-line examples throughout the book show a Unix shell prompt instead:
% javac HelloJava.java