fix for chatty when there is oracle & openjdk installed on the machine

Bug #1617541 reported by NaSH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GetDeb Software Portal
Fix Released
Undecided
Unassigned

Bug Description

Hello,
there is a problem with the chatty package.
if you have several java-8 installed, (openjdk & oracle) it won't run.

in a terminal, the message is (sorry in french) :
"Erreur : impossible de trouver ou charger la classe principale .usr.lib.jvm.java-8-oracle.jre.bin.java"

the problem is in the script that launch chatty, in debian/scripts/chatty in the package

JAVA_BIN=$(update-alternatives --list java | grep java-8)
this line check if there is java-8 on the machine
the pblm when you have oracle & openjdk installed, it will return :
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-8-oracle/jre/bin/java

which won't affect a value to $JAVA_BIN

my fix is to check if there is at least, one java-8 installed, and start chatty

#!/bin/sh
# crashes on Java 9
if [ "$(update-alternatives --list java | grep java-8| wc -l)" -gt 0 ];
then
        cd /usr/share/chatty
        java -jar chatty.jar "$@"
else
        echo "java-8 not installed, can't start chatty"
        exit
fi

Revision history for this message
Christoph Korn (c-korn) wrote :

Thanks for notifying me.

Fixed it a little different to make sure chatty is started with Java 8.

Changed in getdeb.net:
status: New → Fix Released
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.