Two small bowls of rice

garym at sos.on.ca garym at sos.on.ca
Sun Apr 27 11:21:12 PDT 1997


In the I Ching, the question is raised of what one might give
in return for greatness.  The answer: Even just two small bowls
of rice.  Here then is my humble offering to the kaffe masters ;)

I have cobbled two scripts and made a change to my basic Kaffe
installation.  If these are useful to anyone, you are most welcome
to them.

First, I install the kaffe and kaffeh binaries in
/usr/local/share/kaffe/bin, and in /usr/local/bin create these
as symlinks to .kaffe_wrapper, a near clone of .java_wrapper
(see below).  Second, I have made similar changes to the kaffe
appletviewer script (also below) to enable switching between
kaffe, java and jdb versions.

enjoy!

.kaffe_wrapper --------------------------------
#! /bin/bash
# 1997 by garym at sos.on.ca
# Set up default variable values if not supplied by the user.

PRG=`type -p $0` >/dev/null 2>&1
J_HOME=/usr/local/java
K_HOME=/usr/local/share/kaffe

if [ -z "$KAFFEHOME" ] ; then
   export KAFFEHOME
   KAFFEHOME=$K_HOME
fi

if [ -z "$JAVA_HOME" ] ; then
    export JAVA_HOME
    JAVA_HOME=$J_HOME
fi

CLASSPATH="${CLASSPATH-.}"
if [ -z "${CLASSPATH}" ] ; then
    CLASSPATH="$K_HOME/biss.zip:$J_HOME/classes:$J_HOME/lib/classes.zip"
else
    CLASSPATH="$CLASSPATH:$K_HOME/biss.zip:$J_HOME/classes:$J_HOME/lib/classes.zip"
fi
export CLASSPATH

if [ -z "${LD_LIBRARY_PATH}" ] ; then
    LD_LIBRARY_PATH="$J_HOME/lib/`arch`"
else
    echo old: $LD_LIBRARY_PATH
    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$J_HOME/lib/`arch`"
fi
export LD_LIBRARY_PATH
      
progname=`basename $0`
prog=$K_HOME/bin/${progname}

if [ -f $prog ]
then
    eval exec $prog $opts '"$@"'
else
    echo >&2 "$progname was not found in ${prog}"
    exit 1
fi

appletviewer --------------------------------
#! /bin/sh
# 1997 by garym at sos.on.ca
# note: -trace is for kaffe _only_
prog=kaffe
for a in $* ; do
    case "$a" in 
    -debug) prog=jdb    ;;
    -trace) args="$args -debug" ;;
    -jdk)   prog=java   ;;
    *)      args="$args $a" ;;
   esac
done

# Script to run Sun's appletviewer using Kaffe.
eval exec $prog sun.applet.AppletViewer $args

Gary Lawrence Murphy  - TeleDynamics -  (519)422-1150 f(519):422-2723
mailto:garym at sos.on.ca  - http://www.geocities.com/SiliconValley/7704
http://www.sos.on.ca/~garym  - RR#1 7 Forest Pl Sauble Beach, Ont CAN
-------------------------------------- Innovation is hard to schedule



More information about the kaffe mailing list