Linux – Problems getting JPackage to see Sun JVM on CentOS5

centos5javalinuxtomcat6

I'm looking to get Tomcat6 on CentOS 5 in an entirely RPM-based way. JPackage seems to be a great option for this, so I've added the repo and now I'm trying to get it to work.

The instructions say to install the RPM-based JDK download from Sun, so I did that. Then the instructions say to install the appropriate -compat library from JPackage. At this point I get the following error:

[root@localhost bart]# rpm -ivh java-1.6.0-sun-compat-1.6.0.03-1jpp.i586.rpm 
error: Failed dependencies:
    jdk = 2000:1.6.0_03-fcs is needed by java-1.6.0-sun-compat-1.6.0.03-1jpp.i586
    jpackage-utils >= 0:1.7.3 is needed by java-1.6.0-sun-compat-1.6.0.03-1jpp.i586
[root@localhost bart]#

What confuses me in particular is that it seems to be looking for the fedora version of the Sun JVM. The JPAckage instructions do warn that it is vital to use the RPM-based download, so I have been sure to do this.

In case it helps, here is my Java version:

[root@localhost bart]# java -version
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)
[root@localhost bart]#

Any ideas what I've missed or done wrong?

Thanks,

Bart.

Best Answer

You are trying to install a compat library for a different version of the JDK than you have install from Sun.

You are trying to install compat-1.6.0.03 which would match up to JDK 1.6.0_03.

Your java version is 1.6.0_18. You can get 1.6.0_03 here

It looks like they haven't updated the compat libraries since U3 (1.6.0_03)

This gem is a little hidden in thier instructions (emphasis mine):

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.

I would suggestion uninstalling the 1.6.0_18 jdk, and installing the 1.6.0_03 jdk. That should get you where you need to go.