Freecol does not work work with openjdk

Bug #229032 reported by Philipp Edelmann
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
freecol (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

If you are using OpenJDK instead of Sun’s Java the startup script of Freecol does not work correctly.
It is checking for the JAVA_HOME environment and if it doesn’t find one, sets it to a value for iced-tea or Sun’s Java respectively. This does not work with OpenJDK.

I found out, that the program doesn’t need the environment variable. Deleting the following lines from /usr/games/freecol fixes the problem for me.

if [ -z "$JAVA_HOME" ]
then
    if [ -d /usr/lib/jvm/java-7-icedtea/jre ]; then
        JAVA_HOME=/usr/lib/jvm/java-7-icedtea
        JAVA=java
    else # We use java6 from Sun
        JAVA_HOME=/usr/lib/jvm/java-6-sun
        JAVA=${JAVA_HOME}/jre/bin/java
    fi
fi

Revision history for this message
Maia Everett (linneris) wrote :

Are you using hardy or intrepid?

Changed in freecol:
assignee: nobody → sikon
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Philipp Edelmann (tukss) wrote :

I am using hardy.

Maia Everett (linneris)
Changed in freecol:
assignee: sikon → nobody
status: Incomplete → Triaged
Revision history for this message
Brian Pitts (bpitts) wrote :

Will this bug be fixed in hardy? It seems rather important since it prevents freecol from launching.

Revision history for this message
UncleBubba (drbivens) wrote :

...or you could use this:

export JAVA_HOME='/usr/bin/java'

A good candidate for rc.local, perhaps? The advantage is that you don't have to muck up (and change the dates on) any package components.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package freecol - 0.7.4.dfsg+1-1ubuntu1

---------------
freecol (0.7.4.dfsg+1-1ubuntu1) jaunty; urgency=low

  * Merge from debian unstable, remaining changes: (LP: #299136)
    - remove java specific dependencies and icedtea-java7-jre NBS
  * remove /usr/lib/jvm/java-7-icedtea from debian/rules

freecol (0.7.4.dfsg+1-1) unstable; urgency=low

  * Pseudo new upstream release to work around dak's
    move-from-contrib-to-main bug.

freecol (0.7.4.dfsg-2) unstable; urgency=low

  * Fix watchfile to ignore the alpha releases (users and developers
    seem to complain about their stability).
  * Add openjdk in the wrapper script, and tighten up dependency on
    java-wrappers accordingly. (LP: #280433, #229032)
  * freecol can now move to main ! (closes: #491260)
  * Adapted wrapper/freecol to work around a java-wrappers bug
  * Document undocumented patches, and drop 15-fix-jar-manifest which
    really isn't necessary now that we are using java-wrappers.

 -- Didier Roche <email address hidden> Mon, 17 Nov 2008 18:31:02 +0100

Changed in freecol:
status: Triaged → Fix Released
Revision history for this message
heartsmagic (heartsmagic) wrote :

I am using Ubuntu 9.10 - Karmic Koala.
My freecol version is: 0.8.3+dfsg-1
This bug is alive with this version. Now there isn't any matching lines in /usr/games/freecol for JAVA_HOME. I think this is handled via /usr/lib/java-wrappers/java-wrappers.sh.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.