@echo off SETLOCAL enabledelayedexpansion if "%EXP_LANG%" == "" set EXP_LANG=en set PROGNAME=Expeditee set EXPEDITEE_OS=windows :: go into the folder where this script lives and run expeditee from there pushd "%CD%" CD /D "%~dp0" set EXPEDITEE_HOME=%CD% :: -------- Run Expeditee -------- :: JRE_HOME or JAVA_HOME must be set correctly to run Expeditee :: ---- Check Java ---- :chkjava :: call the findjava script so that we have the variables JAVA_EXECUTABLE and EXP_JAVA_HOME that it sets set exit_status=0 :: Need to find Java. If found, JAVA_EXECUTABLE will be set :: call findjava.bat %EXP_LANG% %PROGNAME% call "%EXPEDITEE_HOME%\bin\findjava.bat" if "%JAVA_EXECUTABLE%" == "" echo **** No Java executable found& goto exit set PATH=%EXP_JAVA_HOME%\bin;%PATH% ::echo port: %port%& echo conf: %conf%& echo.& echo. :: Do not remove the quotes around %* !!! It's what helps Server2.jar deal with spaces in configfile path "%JAVA_EXECUTABLE%" -jar Expeditee.jar %* :exit popd ENDLOCAL