Red Hat Bugzilla – Bug 458189
java alternatives is not set up correctly
Last modified: 2009-06-08 16:09:26 EDT
Created attachment 313647 [details]
yum installation log of java-1.6.0-openjdk
Description of problem:
I upgraded my previous Fedora 8 installation with JPackage's java-1.5.0-sun packages to Fedora 9. I went ahead and installed the pack of java-1.6.0-openjdk
All seemed to go well (with the exception of 1 warning about javaws). See the attached 'java-1.6.0-openjdk-install.txt'. However, the new java executable doesn't show up in the alternatives system:
[root@tlinux-stable ~]# alternatives --config java
There are 2 programs which provide 'java'.
*+ 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
Enter to keep the current selection[+], or type selection number:
I've tried to remove all java-1.6.0-openjdk packages and installed them again, but the problem remains.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
java alternatives post installation script silently fails.
java-1.6.0-openjdk should set itself as the defalt java alternatives target.
I'm seeing the same issue with EL5, openjdk from EPEL, package version java-1.6.0-openjdk-126.96.36.199-0.20.b11.el5. Looking at the rpm -q --scripts, it seems the thing that makes it fail is the line
--slave /usr/bin/javaws javaws /usr/lib/jvm/jre-1.6.0-openjdk/bin/javaws \
in the postinstall scriptlet.
I am not sure how this is failing, and I cannot reproduce it.
Do you have (or ever had) the java-1.6.0-sun package installed? This is almost certain a problem with the java-1.6.0-sun package from jpackage.org. Looking at my copy of the spec it had:
--slave /usr/share/javaws javaws /usr/lib/jvm/jre-1.6.0-sun/bin/javaws
To fix, edit /var/lib/alternatives/java and change /usr/share/javaws to /usr/bin/javaws.
closing. this cannot be reproduced.
I think comment #3 nailed it. I previously had Sun JDK along with java-1.6.0-sun-compat from jpackage.org, and indeed in /var/lib/alternatives/java there is /usr/share/javaws.
I also ran into this problem, and comment #3 helped: I also had the "/usr/share/javaws" reference in /var/lib/alternatives/java; following comment #3 then uninstalling/reinstalling fixed the problem for me.