The Java programming language was initially developed by Sun Microsystems. Its Java JDKs are usually available for Linux, Solaris, and Windows. You can download them at http://java.sun.com/javase/downloads.jsp.
Sun offers at least a couple of packaging choices for each version of Java, for each
operating system, and probably offers the best java
command-line switch functionality.
Download the package for your operating system and CPU architecture. On Linux, here's
how we installed it as an RPM package (as the root
user):
#chmod 700 jdk-6u1-linux-amd64-rpm.bin
#./jdk-6u1-linux-amd64-rpm.bin
[lots of legalese]
Do you agree to the above license terms? [yes or no]yes
Unpacking... Checksumming... Extracting... UnZipSFX 5.50 of 17 February 2002, by Info-ZIP ([email protected]). inflating: jdk-6u1-linux-amd64.rpm Preparing... ########################################### [100%] 1:jdk ########################################### [100%] Unpacking JAR files... rt.jar... jsse.jar... charsets.jar... tools.jar... localedata.jar... Done.
Once it is installed, set JAVA_HOME
and PATH
like this:
#JAVA_HOME=/usr/java/jdk1.6.0_01
#export JAVA_HOME
#PATH=$JAVA_HOME/bin:$PATH
#export PATH
Then, check to make sure your java executable points to the JDK you just installed:
# which java
/usr/java/jdk1.6.0_01/bin/java
Here's how the HotSpot JVM identified itself on one of our Linux computers:
$ java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b06, mixed mode)
On Windows, the Sun JDK is available as a graphical installer (see Figure A-1). Run the installer and it will guide you through the installation.
If you select all of the default settings, your completed JDK installation should work just fine with Tomcat.
On FreeBSD, the Sun JDK has been natively ported to run on FreeBSD 5.5 and higher on x86 (32-bit) and AMD64 (64-bit). See the JDK binary downloads page at http://www.freebsdfoundation.org/downloads/java.shtml.
18.221.154.18