Index: jclic-0.2.1.0/jclic =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ jclic-0.2.1.0/jclic 2010-05-26 11:27:00.000000000 +0200 @@ -0,0 +1,38 @@ +#!/bin/sh + +# jclicplayer wrapper script +# code for java detection based on tuxguitar code +# but adding detection of alternatives for jclic + +if [ -z $JAVA_HOME ] ; then + + ALTERNATIVE=`ls -l /etc/alternatives/java|grep sun` + if [ -z "$ALTERNATIVE" ]; then + ALTERNATIVE=`ls -l /etc/alternatives/java|grep openjdk` + fi + + if [ -z "$ALTERNATIVE" ]; then + t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t + JAVA=${JAVA_HOME}/jre/bin/java + fi +fi + +REMOTE_DISPLAY=$(echo $DISPLAY| awk -F ":" '{print $1}') +if [ "${REMOTE_DISPLAY}" != "" ]; then + if [ -x /usr/bin/padsp ]; then + padsp -s "$REMOTE_DISPLAY" -n JClic -m JClic-stream $aux -cp $CLASSPATH -jar /usr/share/java/jclic.jar "$@" &>/dev/null + exit 0 + fi +fi + +export JAVA=${JAVA:=java} + +PULSE_AUDIO="" +if [ -d /tmp/${USER}-pulse/ ]; then + PULSE_AUDIO="padsp" +fi + +exec $PULSE_AUDIO $JAVA -jar /usr/share/java/jclic.jar "$@" &>/dev/null + Index: jclic-0.2.1.0/jclicauthor =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ jclic-0.2.1.0/jclicauthor 2010-05-26 11:27:00.000000000 +0200 @@ -0,0 +1,24 @@ +#!/bin/sh + +# jclicauthor wrapper script +# code for java detection borrowed from tuxguitar + +if [ -z $JAVA_HOME ] ; then + + ALTERNATIVE=`ls -l /etc/alternatives/java|grep sun` + if [ -z "$ALTERNATIVE" ]; then + ALTERNATIVE=`ls -l /etc/alternatives/java|grep openjdk` + fi + + if [ -z "$ALTERNATIVE" ]; then + t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t + JAVA=${JAVA_HOME}/jre/bin/java + fi +fi + +export JAVA=${JAVA:=java} + +exec $JAVA -jar /usr/share/java/jclicauthor.jar "$@" + Index: jclic-0.2.1.0/jclicreports =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ jclic-0.2.1.0/jclicreports 2010-05-26 11:27:00.000000000 +0200 @@ -0,0 +1,23 @@ +#!/bin/sh + +# jclicreports wrapper script +# code for java detection borrowed from tuxguitar + +if [ -z $JAVA_HOME ] ; then + + ALTERNATIVE=`ls -l /etc/alternatives/java|grep sun` + if [ -z "$ALTERNATIVE" ]; then + ALTERNATIVE=`ls -l /etc/alternatives/java|grep openjdk` + fi + + if [ -z "$ALTERNATIVE" ]; then + t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t + JAVA=${JAVA_HOME}/jre/bin/java + fi +fi + +export JAVA=${JAVA:=java} + +exec $JAVA -jar /usr/share/java/jclicreports.jar "$@"