#!/bin/sh

if [ -z "${OPTITDIR}" ] ; then
    OPTITDIR=/usr/local/optit
fi

LD_LIBRARY_PATH=${OPTITDIR}/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
runide_sh=$1
shift

exec ${runide_sh} \
    -J-DOPTITDIR=${OPTITDIR} \
    -J-Xbootclasspath/a:${OPTITDIR}/lib/oibcp.jar \
    -cp ${OPTITDIR}/lib/optit.jar \
    -J-Xboundthreads  \
    -J-Xruntdi:pause=t,analyzer=t \
    $*

