Java Reference
In-Depth Information
6. Click the Install button in the Java Virtual Machine dialog box.
The Completing the Apache Tomcat Setup Wizard dialog box displays (Figure B-21).
Completing the Apache Tomcat
Setu p Wizard dialog box
check boxes not
selected
Finish
button
FIGURE B-21
7. If necessary, click the Run Apache Tomcat check box and the Show Readme check box to
deselect them. Click the Finish button.
The installation of Apache Tomcat is complete.
The Tomcat server software installs as a service under Windows XP and will start automatically. A
Windows service is a program intended to run for an extended time, providing services to other
programs. Services may be started like any other programs, or may be started automatically when the
computer starts running. After installing Tomcat, you will need to add an environment variable on
your system. This environment variable will be used by the Java compiler to locate certain class files
when compiling servlets.
Adding a New Environment Variable
Tomcat provides a number of class files in its library which are needed when you create and use
servlets. The files in this case are stored in a JAR file named servlet-api.jar. For the Java compiler to use
these class files, it must know where to find them. An environment variable, named CLASSPATH, is
used to identify one or more additional locations where the compiler can search for needed class files.
An environment variable is a string that lists information about the system environment, such as a
drive, path, or file name. The compiler will search for class files in the order of the locations listed in
the CLASSPATH environment variable. Perform the following steps to add a new environment
variable.
 
Search WWH ::




Custom Search