@echo off

java.exe -Xmx2048m -enableassertions -cp onzen-windows.jar DataModel > NUL:
if errorlevel 64 goto 64
if errorlevel 32 goto 32
goto error

:64
  java.exe -Xmx2048m -enableassertions -jar onzen-windows_64.jar --debug %*
  if errorlevel 64 goto 64
goto end

:32
  java.exe -Xmx2048m -enableassertions -jar onzen-windows.jar --debug %*
  if errorlevel 64 goto 32
goto end

:error
  echo ERROR: cannot detect data model (32/64 bit) - VM failure?
goto end

:end
@echo on
