What You Need to Write Programs

As explained in Hour 1, to create Java programs, you must have the current version of the Java Development Kit, or another development tool that supports Java 2 version 5. You need something that can be used to compile and test Java programs and a word processor to write programs. With most coding languages, computer programs are written by entering text into a word processor (also called a text editor). Some coding languages, such as Visual C++ from Microsoft, come with their own word processor. Several advanced tools that you could use as an alternative to the Java Development Kit, such as Borland JBuilder and Sun NetBeans, also come with their own editors. Java programs are simple text files without any special features, such as centered text, boldface text, or other enhancements. They can be written with any word processing program that can create text files. Windows systems have several word processors you can use, including Notepad, WordPad, and the DOS program Edit. Mac users can create programs with Simple Text or BBEdit Lite and Linux users can rely on vi, emacs, and others. Any of these will work fine. You also can use more sophisticated word processors such as Microsoft Word, but you must remember to save your programs as text. This option has different names depending on the program you are using. In Word, the file should be saved as a file of type Plain Text. Other programs call these files DOS text, ASCII text, or something similar. You'll probably have a better experience creating the programs in this tutorial if you choose a simple word processor to work on source code rather than a sophisticated editing tool such as Word.

Watch Out!

If you're in doubt about whether a word processor can save files as text files, you always can use one of the simple programs that come with your operating system. For instance, Windows users can rely on Notepad to create Java programs, because text files created with Notepad are always saved as text-only files.