If a man speaks in a forest, and his wife's not there, is he still wrong?

java on CentOS 5

I recently needed to install Java onto a CentOS 5 machine.
Instructions are available at http://wiki.centos.org/HowTos/JavaOnCentOS but I found that they didn't work with the latest JDK from Sun.
Here's what I did:
  1. Set up a non-root user to build RPMS and create the rpmbuild environment.
    The easiest way to do this is to install fedora-rpmdevtools and run "fedora-buildrpmtree"
  2. Install jpackage-utils with yum
  3. Get the binary java sdk from Sun (http://java.sun.com/javase/downloads/index.jsp).
    I used jdk-6u2-linux-i586.bin.
    Put this in ~/rpmbuild/SOURCES
  4. Get the corresponding nosrc rpm from jpackage. I used http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/java-1.6.0-sun-
    Put this in ~/rpmbuild/SRPMS
  5. Rebuild the SRPM:
    rpmbuild --sign --rebuild ~/rpmbuild/SRPMS/java-1.6.0-sun-

You should now have the following RPMS in ~/rpmbuild/RPMS/i586:


You may now install these on your other CentOS 5 servers

I did run into one small gremlin, post-install...

The java-1.6.0-sun-jdbc RPM required libodbc.so and libodbcinst.so. These are provided by the unixODBC and unixODBC-devel RPMS, except that they only declare that they provide libodbc.so.1 and libodbcinst.so.1 so the java-1.6.0-sun-jdbc RPM won't install.

I worked around this by modifying the spec file as described here: http://forums.fedoraforum.org/showpost.php?p=339048&postcount=3

Story Options

java on CentOS 5 | 0 comments
The following comments are owned by whomever posted them. This site is not responsible for what they say.


  • Home
  • Misc (6/0)
  • Audio (5/0)
  • Linux (21/0)
  • Family (1/0)
  • Fishing Diary (1/0)
  • OpenSolaris (7/0)
  • Computing (11/0)
  • General News (7/0)
  • Chloe (1/0)
  • Emily (2/0)
  • Twins (5/0)
  • Classifieds (2/0)
  • GeekLog (2/0)
  • Project Management (1/0)
  • User Functions

    Lost your password?