#! /bin/sh

# The variable is not actually needed to run the example, but it is needed to
# build the example, and if you haven't built the example, you can't run it.
if [ -z "$MULE_HOME" ] ; then
  echo "You must set the environment variable MULE_HOME to the location of your Mule install in order to run this example."
  exit 1
fi

# If MULE_BASE is not set, make it MULE_HOME
if [ -z "$MULE_BASE" ] ; then
  MULE_BASE="$MULE_HOME"
  export MULE_BASE
fi

# This extends the classpath to include the configuration directory
# Any changes to the files in ./conf will take precedence over those deployed
# to $MULE_HOME/lib/user
MULE_LIB=./conf
export MULE_LIB

exec java -Djava.ext.dirs=$MULE_HOME/lib/shared/loanbroker:$MULE_HOME/lib/boot:$MULE_HOME/lib/mule:$MULE_HOME/lib/opt:$MULE_HOME/lib/user org.mule.example.loanbroker.LoanBrokerApp
