@echo off
setlocal

set dist=%~dp0

set jars=%dist%\xp.jar;%dist%\resolver.jar;%dist%\relaxng.jar;%dist%\xsc.jar;%dist%\jh.jar;%dist%\saxon.jar

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

rem --------------------------------------------------------------------------
rem Notes about the Java[tm] command line:
rem
rem * Replace "start javaw" by "start java" if you need to see 
rem   Java exception stack traces and other low-level error messages 
rem   printed on the console.
rem 
rem * -Xss1m is needed to support *really* large XML-Schemas.
rem   -Xmx128m is needed from Java[tm] 1.4.2 which by default sets 
rem   this to 64m.
rem
rem * -Dsun.java2d.noddraw=true is a workaround for a very severe bug 
rem   (reported on Windows 2000/ATI graphics card driver) which causes 
rem   a Windows machine to freeze. This bug was supposed to have been 
rem   fixed by Java[tm] 1.4.1_02. This property prevents using DirectX
rem   for rendering.
rem --------------------------------------------------------------------------

start javaw -Xss1m -Xmx128m -DXXE_GUI="%XXE_GUI%" -DXXE_ADDON_PATH="%XXE_ADDON_PATH%" -DXXE_USER_PREFERENCES="%XXE_USER_PREFERENCES%" -classpath "%cp%" com.xmlmind.xmleditapp.start.Start %*

endlocal
