Bug 1020005 - s-s-j doesn't detect java-1.7.0-openjdk
s-s-j doesn't detect java-1.7.0-openjdk
Product: Fedora
Classification: Fedora
Component: system-switch-java (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
: 990925 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-10-16 14:48 EDT by Lukas Zachar
Modified: 2014-02-22 13:18 EST (History)
3 users (show)

See Also:
Fixed In Version: system-switch-java-1.1.5-8.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-22 13:18:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
work with newer-style java-XYZ/jre as well as older jre-XYZ style alternatives (3.76 KB, patch)
2014-02-07 19:34 EST, Omair Majid
no flags Details | Diff

  None (edit)
Description Lukas Zachar 2013-10-16 14:48:10 EDT
Description of problem:

I have installed java-1.7.0-openjdk- but s-s-j says that:

No supported Java packages were found.
A supported Java package is one that installs a file of the form:   

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. install java-1.7.0-openjdk
2. run system-switch-java

Actual results:
An error as in the description

Expected results:
Shows installed openjdk

Additional info:
Comment 1 Omair Majid 2013-10-17 17:48:31 EDT
If you install java-1.5.0-gcj-devel too, the error is different:

$ system-switch-java

Traceback (most recent call last):
  File "/usr/sbin/system-switch-java", line 89, in <module>
  File "/usr/sbin/system-switch-java", line 50, in main
    java_identifiers, best_identifier = get_java_identifiers()
  File "/usr/share/system-switch-java/switch_java_functions.py", line 132, in get_java_identifiers
    best_identifier = java_identifiers[best]
IndexError: list index out of range

I looked into system-switch-java's source and system-switch-java is hardcoding all paths (it assumes the jre is at /usr/lib/jvm/java-${VERSION}-${VENDOR}) 

We recently changed all these paths :(
Comment 2 Omair Majid 2013-10-17 18:04:19 EDT
(In reply to Omair Majid from comment #1)
> (it assumes the jre is at /usr/lib/jvm/java-${VERSION}-${VENDOR}) 

I meant /usr/lib/jvm/jre ...
Comment 3 Omair Majid 2014-02-04 11:56:34 EST
*** Bug 990925 has been marked as a duplicate of this bug. ***
Comment 4 Omair Majid 2014-02-07 19:34:47 EST
Created attachment 860782 [details]
work with newer-style java-XYZ/jre as well as older jre-XYZ style alternatives
Comment 5 jiri vanek 2014-02-10 08:55:40 EST
Are you planing to push fedora?
Comment 6 Omair Majid 2014-02-10 09:25:16 EST
(In reply to jiri vanek from comment #5)
> Are you planing to push fedora?

Yeah, but only tested it on Fedora 20 so far.
Comment 7 Fedora Update System 2014-02-10 12:56:50 EST
system-switch-java-1.1.5-8.fc19 has been submitted as an update for Fedora 19.
Comment 8 Fedora Update System 2014-02-11 17:57:35 EST
Package system-switch-java-1.1.5-8.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-switch-java-1.1.5-8.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2014-02-22 13:18:58 EST
system-switch-java-1.1.5-8.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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