Install Java on Fedora, Red Hat, SUSE with RPM

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 as Fedora 7, Red Hat 5, SUSE, Mandriva, etc:

  1. 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.
  2. Check the package information with the RPM command as shown bellow:
    bash# rpm -qpi java*nosrc.rpm
    Name        : java-1.5.0-ibm               Relocations: (not relocatable)
    Version     :                         Vendor: JPackage Project
    Release     : 3jpp                          Build Date: Tue 15 Aug 2006
    Install Date: (not installed)               Build Host:
    Group       : Development/Interpreters      Source RPM: (none)
    Size        : 395165271                        License: IBM Binary Code License
    Signature   : (none)
    Packager    : Thomas Fitzsimmons
    URL         :
    Summary     : IBM Java Runtime Environment
    Description :
    This package contains the IBM Java Runtime Environment.
  3. 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/downloaded
    bash# cp ibm-java2-sdk-50-linux-i386.tgz /usr/src/redhat/SOURCES
    bash# cp ibm-java2-javacomm-50-linux-i386.tgz /usr/src/redhat/SOURCES

    In SUSE, copy to /usr/src/rpm/SOURCES.

  4. And built the final installable packages this way:
    bash# cd /directory/where/nosrc.rpm/was/downloaded
    bash# rpmbuild –-rebuild java*nosrc.rpm
  5. When finished, all final packages are under /usr/src/redhat/RPMS/. Install them all this way:
    bash# cd /usr/src/redhat/RPMS/i*86
    bash# rpm -Uvh java*rpm

    and 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.

4 thoughts on “Install Java on Fedora, Red Hat, SUSE with RPM

  1. Se vc tiver este problema na hora de instalar os rpms:

    error: Failed dependencies: is needed by ibm-java2-i386-jre-5.0-5.0.i386 is needed by ibm-java2-i386-jre-5.0-5.0.i386

    O comando abaixo resolve:

    yum install libXp compat-libstdc++-33


Leave a Reply

Your email address will not be published.