Building Java RPMs for Fedora Core

From Nearline Storage
Jump to: navigation, search

Fedora Core uses the JPackage packaging approach to installing Java SDK packages. The following steps can be used to generate the packages required and install them.

Become root ("su -").

Visit the JPackage web site to find out what the latest Java package they support is. Scroll down the list on the left side of the page to the non-free section to find the Java packages. Download the one that you want to use and install it with "rpm -Uvh <package_file>". Amoung other things it will install a *.spec file in /usr/src/redhat/SPECS. Open that file to discover the name of the Java install file that is expected. This will be the file marked with the Source0 key in the *.spec file and it will usually be available from the url marked with the URL key in the spec file. Download that file and put it in /usr/src/redhat/SOURCES.

Then:

rpmbuild -ba <spec_file>
rpm -Uvh /usr/src/redhat/RPMS/<rpm_files>

In order to build these rpms on a brand new minimal Fedora Core 5 system I had to install the rpm-build and binutils packages first.