@echo off
rem Script: setup.cmd
rem Title:  Script start executable setup jar

set JAVAWBIN=javaw.exe
if exist "%JAVA_HOME%\bin\javaw.exe" set JAVAWBIN=%JAVA_HOME%\bin\javaw.exe
set JAVABIN=java.exe
if exist "%JAVA_HOME%\bin\java.exe" set JAVABIN=%JAVA_HOME%\bin\java.exe

set PARAM_XML_FILE=%~f1
if not defined PARAM_XML_FILE (
  start "JS7 JobScheduler Controller" "%JAVAWBIN%" -jar "%~dp0js7_controller_windows.2.8.3-SNAPSHOT.jar"
) else (
  "%JAVABIN%" -jar "%~dp0js7_controller_windows.2.8.3-SNAPSHOT.jar" "%PARAM_XML_FILE%"
)
exit /B %ERRORLEVEL%

