Bug 641756 - JOSM chooses wrong Java version on startup
Summary: JOSM chooses wrong Java version on startup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: josm
Version: 13
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Cédric OLIVIER
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 642035
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-11 02:35 UTC by Tim Niemueller
Modified: 2010-11-29 21:34 UTC (History)
2 users (show)

Fixed In Version: josm-0-0.12.3592svn.fc13
Clone Of:
Environment:
Last Closed: 2010-11-29 21:27:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Niemueller 2010-10-11 02:35:57 UTC
Description of problem:
If gcc-java is installed, and java-1.6.0-openjdk, but not java-1.6.0-openjdk-devel, josm is started with gcc-java, which is version 1.5. An incompatibility notice pops up and josm cannot be used.

Version-Release number of selected component (if applicable):
java-1.6.0-openjdk-devel-1.6.0.0-42.b18.fc13.x86_64
java-1.6.0-openjdk-1.6.0.0-42.b18.fc13.x86_64
gcc-java-4.4.4-10.fc13.x86_64
josm-0-0.10.3514svn.fc13.noarch

How reproducible:
Always (if the given package configuration is installed)

Steps to Reproduce:
1. Check that alternatives --display javac mentions a 1.5.0 version instead of 1.6.0
2. Run josm
  
Actual results:
Josm gives an error and does not work.

Expected results:
Josm should run.

Additional info:
The given packages are the constellation that caused problems. I didn't do any Java development recently, but Eclipse pulls in gcc-java, but not openjdk-devel, and I think that has caused the problems. After installation of openjdk-devel one must perform "alternatives --auto javac" to finally get josm to work. A workaround could be to depend on openjdk-devel, but that would actually suck. I wonder why the script does not use the /usr/bin/java that has been setup by the alternatives system, but rather sources a script which chooses the wrong version from the many installed.

Comment 1 Cédric OLIVIER 2010-10-14 20:29:06 UTC
Thanks for reporting this bug. 

Josm launcher is according Fedora guides lines. It is based on this example : http://fedoraproject.org/wiki/Packaging:Java#Wrapper_Scripts

I think problem come from java-functions provided by jpackage-utils.

Awaiting that it's corrected, I can add openjdk-devel dependencies.

Comment 2 Guido Grazioli 2010-11-19 18:41:59 UTC
Cedric, just try to add:

_prefer_jre=1

after the shebang in your wrapper script; as nobody can have a newer jdk without a jre (-devel requires plain package), that should do the trick

Comment 3 Fedora Update System 2010-11-19 22:06:16 UTC
josm-0-0.12.3592svn.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/josm-0-0.12.3592svn.fc13

Comment 4 Fedora Update System 2010-11-19 22:15:40 UTC
josm-0-0.12.3592svn.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/josm-0-0.12.3592svn.fc12

Comment 5 Fedora Update System 2010-11-19 22:25:22 UTC
josm-0-0.12.3592svn.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/josm-0-0.12.3592svn.fc14

Comment 6 Fedora Update System 2010-11-21 01:26:52 UTC
josm-0-0.12.3592svn.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update josm'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/josm-0-0.12.3592svn.fc13

Comment 7 Fedora Update System 2010-11-29 21:27:00 UTC
josm-0-0.12.3592svn.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-11-29 21:29:37 UTC
josm-0-0.12.3592svn.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2010-11-29 21:34:09 UTC
josm-0-0.12.3592svn.fc13 has been pushed to the Fedora 13 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.