2.1.1. Installing a 32-bit Sun SDK
Get the Sun JDK 5.0 from:
http://java.sun.com/javase/downloads/index_jdk5.jsp
by choosing the "JDK 5.0 Update N" "Download" button, and then choosing "RPM in self-extracting file" for Linux on the page that displays after pressing the button.
If you don't need/want to use the SysV service scripts you can also install the "Linux self-extracting file" instead.
Do NOT install the "Linux x64" version of the SDK.
If you prefer the older Java 1.4.2 SDK, get it from:
http://java.sun.com/j2se/1.4.2/download.html
by choosing the "Download J2SE SDK" link and from there the "RPM in self-extracting file" for Linux.
If you don't want/need to use the SysV service scripts you can also install the "self-extracting file" for Linux instead.
Install java-1.4.2-sun-compat or java-1.5.0-sun-compat (optional)
This step is only necessary if you want to use the SysV service scripts, which we recommend for production servers.
If you just plan on doing cd $JBOSS_HOME and ./run.sh, which should be done just for development, you can skip this step and the next.
Download and install the appropriate -compat RPM from JPackage at:
ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/
Make sure to match the version of the -compat package to the SDK you've installed in the first step. The -compat RPM requires that the RPM self-extracting file from Sun be used in the previous step, not the plain (non-RPM) one.
For instance, for a Sun SDK 1.5.0_11 you should get:
and for a Sun SDK 1.4.2_13 you should use:
If the -compat RPM for the latest Sun release is not yet available, contact support or request an update in the mailing list.
For more details see http://jpackage.org/
Selecting alternatives for java, javac and java_sdk_ (optional, where VERSIONVERSION = 1.4.2 or 1.5.0 depending on what version java "java" and "javac" are being set to)
This is only needed if you performed the second step above and you want to use the SysV service script and/or want this installed SDK to be the default java and javac in the system. This choice can often be overridden by setting the JAVA_HOME environment variable.
The alternatives system allows different versions of Java, from different sources to co-exist on your system. You should make sure the Sun one is selected so that the service script uses the one you want.
As root, issue the following command:
/usr/sbin/alternatives --config java
and make sure the Sun one is selected (marked with a '+'), or select it by entering its number as prompted.
Make sure you do the same for javac and java_sdk_ (where VERSIONVERSION = 1.4.2 or 1.5.0 depending on what version java "java" and "javac" are being set to). We recommend that all point to the same manufacturer and version.