- Try to force Glassfish to work with GNU Java, the default in Fedora, or
- Try to force Fedora to use Sun's Java
For the most part, I followed a combination of these blogs: blog1, blog2, blog3, blog4. Alas, none of them worked despite following step by step, but in doing so, I learned a lot about what was going on.
The first problem seemed to be related to a dependency difference between JDK 1.5.0 build 11 or 12 and JDK 1.5.0 build 13, which is what I was using. Although each blog listed certain dependencies, none listed the dependency problem I was having. I still don't know what libXtst is, but without it I was unable to install the JDK. With it, I was able to install just fine.
The second problem had to do with the order of installing RPMs. If I tried to install them all at once with a
yum -y --nogpgcheck install /usr/src/redhat/RPMS/i586/java*.rpm, it would fail because of an error in the SPEC file dealing with font package locations (detailed here, in the Current Issues section). However, if I installed only java-1.5.0-sun-1.5.0.13-1jpp.i586.rpm first, and then installed the rest, I ended up with a working version (though the font problem remained).A third problem was that blog1, referenced above, which involved rebuilding the java RPMs via
rpmbuild -ba java-1.x.0-sun.spec resulted in a working JRE, but no JDK.Here is the final version of what worked for me:
- Some prerequisites
yum -y install rpmdevtools jpackage-utils rpm-build libXp unixODBC unixODBC-devel libXtst yum-prioritiesrpm -Uvh http://www.fedorafaq.org/yum http://rpm.livna.org/livna-release-7.rpm
- Get the JPackage Java RPM with
wget http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/java-1.5.0-sun-1.5.0.13-1jpp.nosrc.rpm(lists at http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/) - Download the right JDK binary from Sun (not the self-extracting RPM) for the java version and build version of the JPackage RPM into
/usr/src/redhat/SOURCES/ - recreate the java rpm
rpmbuild --rebuild java-1.5.0-sun*src.rpm- should create new rpms in
/usr/src/redhat/RPMS/i586/
- install new java rpms (need the --nogpg option because locally created rpms are not signed)
yum -y --nogpgcheck install /usr/src/redhat/RPMS/i586/java-1.5.0-sun-1.5.0.13-1jpp.i586.rpmyum -y --nogpgcheck install /usr/src/redhat/RPMS/i586/java*.rpm
- check java version with
java -version, and that the JDK is installed withjavac --help. If the version is not right, or it didn't work, change the default Java system to Sun's withalternatives --config java, and select the right jvm - Set the JAVA_HOME environment variable
- Add to
/etc/profileJAVA_HOME="/usr/lib/jvm/java"
export JAVA_HOME - run
source /etc/profileto read in profile, and check it worked withecho $JAVA_HOME
- Add to
That's it, now for Glassfish...

0 comments:
Post a Comment