Appendix A. Installing Java
There are at least a few Java Software Development Kits (SDKs) and Java Runtime Environments (JREs) available that will support Tomcat, depending on which operating system you run. To run Tomcat, you need a Java 2 Standard Edition (J2SE) SDK. You need a Java compiler to use JavaServer Pages. If you do not wish to use JSP, you can use a J2SE JRE instead of a J2SE SDK. See Sun’s J2SE home page (http://java.sun.com/j2se) for more information about what the J2SE includes.
Each SDK includes a JRE, but if you download a JRE by itself, then you do not also have an SDK. The difference is that an SDK includes tools such as a Java compiler, debugger, and profiler, in addition to a runtime environment.
The J2SE SDKs we tested include Sun’s HotSpot J2SE 1.4.1, IBM’s 1.4.0 JDK, BEA’s JRockit 8.0 J2SE 1.4.1, and Apple’s J2SE 1.4.1. They each worked very well for us. Tomcat also works on Versions 1.2 and 1.3 of Java, so you may decide to use 1.2 or 1.3, but this may complicate things (minor complications that are mentioned throughout this book). Choose an SDK, and then read and follow the installation documentation for the one you choose.
For Tomcat to use a Java SDK, you just need to make sure that the
JAVA_HOME
and PATH
environment variables are set
appropriately.
JAVA_HOME
must be set to the full path of your SDK, and
PATH
must be set so that the first java
binary found on
PATH
is the one you want to run. For example:
$ JAVA_HOME=/usr/local/j2sdk1.4.1_02 $ export ...
Get Tomcat: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.