21
2.1.1 Setting up Java
Any Java Development Kit that supports Java Version 1.2 (or later) can be used. However, it is recommended that
you use a modern version of Java, such as Java 2 Version 1.4. For Windows 2000/NT/XP, Linux, or Solaris, these
are available from the Sun Java site at http://java.sun.com/j2se/1.4.1/download.html. The Sun Java site provides
detailed installation instructions for the different platforms. These are all relatively simple; typically, you download
and execute an installer. To run webMathematica you need the Java Development Kit (JDK). For Mac OS X, Java 2
Version 1.3 is already installed. For other platforms, modern versions of Java are available from the appropriate
vendors; a list of useful links is maintained in the Links Appendix: Java.
You will also need to set the JAVA_HOME environment variable. This is described in the next sections for
Unix
and
Windows
.
Unix
The JAVA_HOME environment variable needs to be set for the environment in which Tomcat runs. An example of
this, suitable for inclusion in .bashrc (this is the initialization file for the bash shell), is shown below.
JAVA_HOME=/usr/local/j2sdk1.4
export JAVA_HOME
For other shells, you should follow their standards for setting environment variables.
Windows
It is less important to set the JAVA_HOME variable for Windows because the Tomcat installer will find your installa
tion of Java. However, it is still recommended.
If you go to the Control Panel and open the System icon, you will see the System Properties window.
From this, select the Advanced tab and then the Environment Variables button. Enter JAVA_HOME as a
system variable, setting it to the top level directory containing your JDK. For example, if your JDK is installed in
c:\j2sdk1.4.0_01, this is the setting for JAVA_HOME.
Mac OS X
Mac OS X 10.2 was originally shipped with Java 2 Version 1.3.1. The JDK has recently been updated to version
1.4.1, which can be obtained via the software update mechanism (see also http://www.apple.com/java/). You can
ensure that you are always using the most recent version of the JDK by setting up the JAVA_HOME environment
variable properly; this is shown below.
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home
The default login shell for Mac OS X is tcsh; hence, the above command needs to be placed in the appropriate
shell initialization file, for example, .tcshrc.
.
<
New Page 1
Comcast Web Hosting