#!/bin/sh

##############################################################
###           Moneydance Unix startup script
### To use this script, modify the lines below so that they
### suit your system.  If you experience problems with
### installation, please mail a copy of this script to
### support@reillytechnologies.com along with a capture of
### the output when run from the command-line.
##############################################################


# Change the line below so that it refers to the directory where 
# you installed the moneydance.jar and license.jar files
MONEYDANCE_LOCATION=/usr/local/moneydance


# Change the line below so that it refers to the location where you
# installed the swingall.jar file.  This is usually the same place
# that the moneydance.jar and license.jar files are located, but
# in some cases you may want to use a separate version of swing 
# than the one included with Moneydance.
SWING_LOCATION=${MONEYDANCE_LOCATION}


# Change this line so that it refers to the java or jre executable
# on your system.  Some systems will have java located at
# /usr/bin/jre, /usr/local/jdk1.1.7/bin/jre, or /usr/local/bin/jre
# NOTE: If you change the 'jre' to 'java' in the next line, you will 
# also need to change the -cp argument in the CMD setting near the end
# of this script to -classpath, as well as add an extra line to the CLSSP
# setting below to point to the classes.zip file for java on your system.
# You are probably much better off just leaving the 'jre' part alone,
# and only modifying the path so that it points to the 'jre' program.
JAVA_EXE=/usr/local/java/bin/jre


# Comment out the following 2 lines only if you have a JIT compiler
# that works.  Note: The default JIT compiler distributed with 
# the Sun JDK and JRE still has bugs, but SHUjit and TYA seem 
# to work well on Linux and FreeBSD with only minor side effects.
JAVA_COMPILER=NONE
export JAVA_COMPILER


CLSSP=${MONEYDANCE_LOCATION}/moneydance.jar:
CLSSP=${MONEYDANCE_LOCATION}/license.jar:${CLSSP}
CLSSP=${SWING_LOCATION}/swingall.jar:${CLSSP}

unset CLASSPATH

CMD="${JAVA_EXE} -cp ${CLSSP} Moneydance $@"

echo ${CMD}
exec ${CMD}


