Appendix A: Downloading and Installing Java


This is the most important part of this book. Java is not a spectator sport. The best way to learn and enjoy it is to use it. Every chapter of this book except Chapter 1 has programming assignments. You can't do them if your computer doesn't have Java. Equally important, the animated illustrations are all Java programs, and you can't run them without Java. So take the time right now to download and install it. You will be richly rewarded for your effort. Java is an educational tool that will keep you fascinated for the rest of your life.

Overview of the Process

We'll start these instructions with a brief overview of what is involved in downloading and installing. Then you should follow whichever one of the brand-specific sections corresponds to your own computer.

You're going to go to a Javasoft Web page and download two very large files (tens of megabytes). If you have fast Internet access, congratulations. If you don't, each download could take several hours. If that's the case, consider starting one download at the end of the day. The file will be there for you in the morning. That evening, do the same with the second file.

The first file is Java itself. It is an archive containing the Java compiler, the Java Virtual Machine, and various other helpful programs. (If you don't know what a compiler or Java Virtual Machine are, they're discussed in Chapter 2.) The official name for this download is the SDK, or Software Developer's Kit. The second file contains the API pages, a huge collection of HTML pages that describe the core Java packages and classes. You won't need the API pages until Chapter 12, but you might as well download them as soon as possible.

Before you run any Java program (including the compiler, which is itself a Java program), you have to add the location of Java's executables to your PATH environment variable. You may also need to set the CLASSPATH environment variable. There are many ways to set these values. The approach presented here involves creating a script to be run manually when you are ready to view the animated illustrations or play with Java. Avoid modifying boot-time or login scripts, because a small typing error can get you into a lot of trouble. Also, manual scripts are easier to undo.

The following section is about installing Java in Windows. If you use a Macintosh, please skip to the "Macintosh" section later in this appendix.




Ground-Up Java
Ground-Up Java
ISBN: 0782141900
EAN: 2147483647
Year: 2005
Pages: 157
Authors: Philip Heller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net