@echo off
setlocal

set dist=%~dp0

set jars=%dist%\xerces.jar;%dist%\resolver.jar;%dist%\relaxng.jar;%dist%\jh.jar;%dist%\saxon.jar;%dist%\saxon9.jar

if exist "%dist%\xxe.jar" goto jar
set cp=%dist%\..\class;%jars%
goto fi
:jar
set cp=%dist%\xxe.jar;%jars%
:fi

if exist "%dist%\jre\bin\java.exe" goto privatejre
set java=java
goto fi2
:privatejre
set java=%dist%\jre\bin\java.exe
:fi2

rem -DXXE_GUI is useful if -l is used.

"%java%" -Xss4m -Xmx512m -DXXE_GUI="%XXE_GUI%" -DXXE_ADDON_PATH="%XXE_ADDON_PATH%" -DXXE_PREFS_DIR="%XXE_PREFS_DIR%" -classpath "%cp%" com.xmlmind.xmleditapp.convert.StartConvertDoc %*
