#!/bin/sh

echo "Starting MetaCoretex"

JARNAME="MetaCoreTex.jar"
XMLJARNAME="mctxxml.jar"

DIR=`dirname $0`

DIST="${DIR}/dist/"
CONTRIB="${DIR}/contrib/"
PROBES="${DIR}/probes/"

MCTXJAR="${DIST}${JARNAME}"
XMLJAR="${DIST}${XMLJARNAME}"

JARZ=`ls ${CONTRIB}`

#CP="${MCTXJAR}:${XMLJAR}:${PROBES}"
CP="${MCTXJAR}:${XMLJAR}"

if [ -f ${JDK_HOME}/lib/tools.jar ]; then
    CP="${CP}:${JDK_HOME}/lib/tools.jar"
fi

for I in ${JARZ}; do
    CP="${CP}:${CONTRIB}${I}"
done

java -cp ${CP} com.securitycentric.metacoretex.Init &
#java -cp ${CP} com.securitycentric.metacoretex.Init
