Bug 458189 - java alternatives is not set up correctly
Summary: java alternatives is not set up correctly
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lillian Angel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-06 22:04 UTC by Tadej Janež
Modified: 2009-06-08 20:09 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-09-23 20:23:10 UTC
Type: ---
Embargoed:


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

Description Tadej Janež 2008-08-06 22:04:09 UTC
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 14:12:05 UTC
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 15:25:33 UTC
I am not sure how this is failing, and I cannot reproduce it.

Comment 3 Orion Poplawski 2008-09-15 17:44:23 UTC
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 20:23:10 UTC
closing. this cannot be reproduced.

Comment 5 Janne Blomqvist 2008-09-24 07:11:41 UTC
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 20:09:26 UTC
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.