:: check processor architecture and select appropriate jre

set Arch=x64
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
   if not defined PROCESSOR_ARCHITEW6432 set Arch=x86
)

if "%Arch%" == "x64" (
.\jre_x64\bin\java.exe -jar LcDcmReader.jar %1 %2
) else (
.\jre_x86\bin\java.exe -jar LcDcmReader.jar %1 %2
)

exit