@echo off
IF NOT EXIST "%JAVA_HOME%" goto error

SET JAVA_EXE=%JAVA_HOME%\jre\bin\java.exe

rem IF "%CLASS_PATH%" == "" SET CLASS_PATH=%JAVA_HOME%\jre\lib\rt.jar

SET CLASS_PATH=%CLASS_PATH%;%JAVA_HOME%\jre\lib\rt.jar;..\dist\jfox-util.jar;..\dist\jfoxmx.jar;..\lib\log4j-1.2.8.jar;..\lib\velocity-dep-1.3.1.jar;..\lib\xml\dom.jar;..\lib\xml\jaxb-api.jar;..\lib\xml\jaxb-libs.jar;..\lib\xml\jaxb-ri.jar;..\lib\xml\jaxb-xjc.jar;..\lib\xml\jaxp-api.jar;..\lib\xml\jax-qname.jar;..\lib\xml\namespace.jar;..\lib\xml\providerutil.jar;..\lib\xml\sax.jar;..\lib\xml\xercesImpl.jar;

"%JAVA_EXE%" -cp "%CLASS_PATH%" org.huihoo.jfox.xmlet.XMLetAgent

goto end
:error
echo ERROR: JAVA_HOME not set:
:end