#!/bin/bash
export CLASSPATH=jar/*:PortableNLP.jar
java -cp $CLASSPATH org.ghri.main.Main
err=`echo $?`
if [ $err -eq 0 ]
then
	echo "Completed without errors."
else
	echo The application appeared to exit with errors.
	echo Printing debug information to a file "log.err".
	echo Record the above error and add it to log.err.
	echo Please look over this file, and edit, if necessary.
	echo and send to cronkite.d@ghc.org for troubleshooting.
	echo Thanks.
	echo Current directory: >> log.err
	ls >> log.err
	echo Classpath: >> log.err
	echo $CLASSPATH >> log.err
	echo ./jar: >> log.err
	ls ./jar >> log.err
	echo Java 7 Version: >> log.err
	java -version >> log.err
	cat log.err
fi
