Bug 458189 - java alternatives is not set up correctly
java alternatives is not set up correctly
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lillian Angel
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-06 18:04 EDT by Tadej Janež
Modified: 2009-06-08 16:09 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-23 16:23:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
yum installation log of java-1.6.0-openjdk (2.93 KB, text/plain)
2008-08-06 18:04 EDT, Tadej Janež
no flags Details

  None (edit)
Description Tadej Janež 2008-08-06 18:04:09 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
packages.

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'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
   2           /usr/share/java/libgcj-java-placeholder.sh

Enter to keep the current selection[+], or type selection number: 
[root@tlinux-stable ~]# 

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):
java-1.6.0-openjdk 1:1.6.0.0-0.16.b09.fc9
java-1.6.0-openjdk-demo 1:1.6.0.0-0.16.b09.fc9
java-1.6.0-openjdk-devel 1:1.6.0.0-0.16.b09.fc9
java-1.6.0-openjdk-javadoc 1:1.6.0.0-0.16.b09.fc9
java-1.6.0-openjdk-plugin 1:1.6.0.0-0.16.b09.fc9
java-1.6.0-openjdk-src 1:1.6.0.0-0.16.b09.fc9

How reproducible:
install java-1.6.0-openjdk*

Steps to Reproduce:
1.
2.
3.
  
Actual results:
java alternatives post installation script silently fails.

Expected results:
java-1.6.0-openjdk should set itself as the defalt java alternatives target.

Additional info:
Comment 1 Janne Blomqvist 2008-08-29 10:12:05 EDT
I'm seeing the same issue with EL5, openjdk from EPEL, package version java-1.6.0-openjdk-1.6.0.0-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.
Comment 2 Lillian Angel 2008-08-29 11:25:33 EDT
I am not sure how this is failing, and I cannot reproduce it.
Comment 3 Orion Poplawski 2008-09-15 13:44:23 EDT
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.
Comment 4 Lillian Angel 2008-09-23 16:23:10 EDT
closing. this cannot be reproduced.
Comment 5 Janne Blomqvist 2008-09-24 03:11:41 EDT
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.
Comment 6 Dave Malcolm 2009-06-08 16:09:26 EDT
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.

Thanks everyone.

Note You need to log in before you can comment on or make changes to this bug.