Next Stop: Java
Before you can start writing Java programs, you need to acquire and set up some kind of Java programming software. Although several different products are available for the development of Java programs, including many terrific ones that make programming much easier, the starting place for most new Java programmers is the Software Development Kit, a set of tools for writing, debugging, and running Java programs. All of the examples in this book were created and tested using the Kit, but they can be created with any Java development tool that supports the current version of the language.
The Software Development Kit (also referred to as the SDK) is in version 1.4 as of this writing. Whenever Sun releases a new version of Java, the first tool that supports it is the Kit.
To create all of the programs in this book, you must either use Software Development Kit 1.4 or another Java programming tool that fully supports all of version 1.4's features.
There are many different software packages that offer the capability to create Java programs, but all of these are not created equally when language support is concerned. Some of these programming tools only support Java 1.0, the initial version of the language, which was released by Sun Microsystems in late 1995. Other tools support Java 1.1, which was released in mid-1997, version 1.2 from 1998, or version 1.3 from 2000.
Some operating systems such as Mac OS X and Red Hat Linux 7.1 include a copy of the SDK, but it's probably not the current version. The kit in OS X supports version 1.3 of Java and the one in Red Hat 7.1 supports version 1.1. Before using an SDK that was included with your operating system, make sure it supports Java version 1.4.
Users of Microsoft Windows systems may be dismayed to learn that the Software Development Kit is not graphical. You run programs from a command line (the C:\> or D:\> prompt that will be familiar to MS-DOS users) instead of using a mouse and a point-and-click environment. Figure 1.2 shows the Kit in use in an MS-DOS window on a Windows 2000 system. The Java program WarGames.java is compiled, and then it is run.
CAUTION
The examples in this book were prepared on the Microsoft Windows XP and Red Hat Linux operating systems. For this reason, some advice is offered for Windows and Linux users running the Software Development Kit. However, all of the Java code in this book will work regardless of the operating system you are using, as long as you have development software that supports all the features of SDK 1.4.
Figure 1.2 A program being compiled and run with the Software Development Kit.
Official Documentation
Sun Microsystems offers comprehensive documentation for the Java language in Web page format. You don't need this information to use this book because each topic is discussed fully as it is introduced, but these pages will come in handy when you write your own programs.
You can download the entire documentation, but it might be more convenient to browse it as needed from Sun's Web site. The most up-to-date Java documentation is available at http://java.sun.com/j2se/1.4/docs.