@echo off
setlocal ENABLEDELAYEDEXPANSION

set sts=0

::The value can be modified
set -path=C:\etd\exe\

for /f "delims=" %%a in (gui_bat_params.ini) do (

    set param=!param! %%a
)

if not exist %-path%VaRMarginCalculator-gui.jar (
    echo [%-path%VaRMarginCalculator-gui.jar] does not exist.
    goto failed
) else (
    start javaw %param% -jar %-path%VaRMarginCalculator-gui.jar && (goto succeed) || goto failed
)


:succeed

    echo The process was completed normally.
    set sts=0
    goto end

:failed

    echo The process was completed abnormally.
    set sts=1

:end
