@echo off
set CLASSPATH= jar\*;PortableNLP.jar
java -cp %CLASSPATH% org.ghri.main.Main
if %ERRORLEVEL% == 1 goto :printdebug
echo Completed without errors.
pause
exit

:printdebug
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
dir >> log.err
echo "Classpath:" >> log.err
echo %CLASSPATH% >> log.err
echo ".\jar:" >> log.err
dir .\jar >> log.err
notepad log.err &
pause
exit