#!/bin/sh

# What directory is this script in?
here=`dirname "$0"`

# Check that this script is there
if [ -f $here/ix-java ]
then
    # Yes - set ix_base accordingly
    # Remember that this script should be in base/scripts/unix/
    ix_base="$here/../.."
    echo "ix_base=$ix_base"
else
    # No - tell the user
    echo "Can't determine I-X base; tried relative to $here"
    exit 1
fi

export ix_base

# Set up values for use in classpath etc.
. $here/setvars

# Now run with new classpath entries before any existing ones.

exec env CLASSPATH=$ix_cpath:$CLASSPATH java "-Dix.base=$ix_base" "$@"
