Just to make more generic and to simplify Liquidat's good howto about this topic
, here is a better way to install Sun, IBM or BEA Java/JVM/JDK on any modern Linux RPM-based distribution:
- On the JPackage non-free repository, look for the package named java-VERSION-PROVIDER-*nosrc.rpm and download it. For this example, I used IBM JVM. Procedure is the same for Sun's or BEA's.
- Check the package information with the RPM command as shown bellow:
bash# rpm -qpi java*nosrc.rpmName : java-1.5.0-ibm Relocations: (not relocatable)Version : 184.108.40.206.3 Vendor: JPackage ProjectRelease : 3jpp Build Date: Tue 15 Aug 2006Install Date: (not installed) Build Host: tortoise.toronto.redhat.comGroup : Development/Interpreters Source RPM: (none)Size : 395165271 License: IBM Binary Code LicenseSignature : (none)Packager : Thomas FitzsimmonsURL : http://ibm.com/developerworks/java/jdk/linux/download.htmlSummary : IBM Java Runtime EnvironmentDescription :This package contains the IBM Java Runtime Environment.
- We visited the URL above to find IBM's JVM binary for Linux. Chose the 1.5 SDK in tgz format and copied all this way:
bash# cd /directory/where/binary-SDK/was/downloadedbash# cp ibm-java2-sdk-50-linux-i386.tgz /usr/src/redhat/SOURCESbash# cp ibm-java2-javacomm-50-linux-i386.tgz /usr/src/redhat/SOURCESIn SUSE, copy to /usr/src/rpm/SOURCES.
- And built the final installable packages this way:
bash# cd /directory/where/nosrc.rpm/was/downloadedbash# rpmbuild –-rebuild java*nosrc.rpm
- When finished, all final packages are under /usr/src/redhat/RPMS/. Install them all this way:
bash# cd /usr/src/redhat/RPMS/i*86bash# rpm -Uvh java*rpmand the JVM is installed.
(All but step 5 may be done as a regular user instead of root, but explanations would be longer and more complex)
Later, you may also want to install the javaws package
to have Java Web Start integrated on your browser.
By the way, JPackage Project
has standarized how Java software should be packaged on Linux. And they are doing it with RPM (but the concepts may be ported to other packaging systems). It is such a great and well done standard that all RPM-based distributions such as Fedora, Red Hat Enterprise Linux, SUSE, Mandriva, etc are using it for their own Java works. It all starts with a package named jpackage-utils
, probably already installed on your fresh system.
You may find many Java software as JBoss, Apache Geronimo, Ant, Eclipse, etc packaged in JPackage web site.