#!/bin/bash

#!/bin/bash

# java executable
JAVA=java
#JAVA_OPT=-server
#JAVA=/opt/IBMJava2-141/bin/java
JAVA_OPT=-enableassertions 

# jist directories
JIST_DIR=`dirname $0`/..
JIST_LIBS=${JIST_DIR}/libs/bcel.jar:${JIST_DIR}/libs/bsh.jar:${JIST_DIR}/libs/jargs.jar:${JIST_DIR}/libs/log4j.jar:${JIST_DIR}/libs/jython.jar
JAVA_OPT="${JAVA_OPT} -cp ${JIST_LIBS}:${JIST_DIR}/classes"

# .so path
JAVA_OPT="${JAVA_OPT} -Djava.library.path=/home/kurth/projects/workspace/click-jist-msvc/click-core/jist"

# max heap
#MEM=`cat /proc/meminfo | grep MemTotal | grep -o "[0-9]\+"`
#MEM=$(( ($MEM-200000)/1024 ))
#JAVA_OPT=${JAVA_OPT} -Xmx${MEM}m

JIST_ARGS="--nocache" 
# -c ${JIST_DIR}/src/debug-tcp.properties"

# run spot, run
${JAVA} ${JAVA_OPT}  jist.runtime.Main ${JIST_ARGS} jist.swans.Main $*
