Bug 458189

Summary: java alternatives is not set up correctly
Product: [Fedora] Fedora Reporter: Tadej Janež <tadej.j>
Component: java-1.6.0-openjdkAssignee: Lillian Angel <langel>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: blomqvist.janne, dmalcolm, langel, lkundrak, mjw, orion
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-23 20:23:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
yum installation log of java-1.6.0-openjdk none

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.