#!/bin/sh

#   determine Java environment
export JAVA_PLATFORM="sun-jdk"
eval `@l_prefix@/bin/java-toolkit -e`

#   determine main class
main="edu.stanford.nlp.pipeline.StanfordCoreNLP"
if [ ".$1" = ".-server" ]; then
    shift
    main="edu.stanford.nlp.pipeline.StanfordCoreNLPServer"
fi

#   pass-through execution
exec @l_prefix@/bin/java \
    -mx5g -cp "@l_prefix@/lib/corenlp/*" \
    "$main" \
    ${1+"$@"}

