Description of problem: ran 'system-switch-java' as root in terminal. Version-Release number of selected component: system-switch-java-1.1.5-10.fc21 Additional info: reporter: libreport-2.2.2 cmdline: python /sbin/system-switch-java executable: /sbin/system-switch-java kernel: 3.15.0-0.rc4.git1.1.fc21.x86_64 runlevel: N 5 type: Python uid: 0 Truncated backtrace: switch_java_functions.py:138:get_java_identifiers:UnboundLocalError: local variable 'best_identifier_index' referenced before assignment Traceback (most recent call last): File "/sbin/system-switch-java", line 89, in <module> main() File "/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 138, in get_java_identifiers best_identifier = identifiers_and_jdks[best_identifier_index][0] UnboundLocalError: local variable 'best_identifier_index' referenced before assignment Local variables in innermost frame: jre_search: None java: None identifiers_and_jdks: [('1.8.0-openjdk.x86_64', False)] i: 1 alternatives: ['/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java', '/usr/java/latest/bin/java'] jre_expression: <_sre.SRE_Pattern object at 0x12b6dd0> jdk_expression: <_sre.SRE_Pattern object at 0x12e9930> best: 1 best_identifier: None jdks: [False] best_indentifier_index: -1 alternative: '/usr/java/latest/bin/java' jdk_search: None java_identifiers: ['1.8.0-openjdk.x86_64'] Potential duplicate: bug 1069832
Created attachment 893591 [details] File: backtrace
Created attachment 893592 [details] File: environ
I agree that system-switch-java should not crash like this. This was fixed upstream recently: https://fedorahosted.org/system-switch-java/changeset/f9d437fc662ae76e988434b7fa9a50be0a044c16/ On the other hand, /usr/java/latest is an unsupported/proprietary java package. It is not installed following the jpackage or Fedora conventions. As such, system-switch-java will probably fail in other ways when this bug is fixed.
Marking CLOSED based on commit Omair referenced in Comment #3.