@echo off

rem install directory is directory of given script by default
if not defined SEMSPECT_HOME (
    set SEMSPECT_HOME=%~dp0
)
call "%SEMSPECT_HOME%java-settings.bat"
set MAIN_CLASS="de.derivo.semspect.server.view.rest.SemSpectServer"

echo ===
echo Starting SemSpect with configuration:
echo Java command path: %SEMSPECT_JAVA_PATH%
echo Java class path: %CLASS_PATH%
echo JDK options: %JDK_OPTIONS%
echo ===

REM 3 ways to specify parameters:
REM - Define parameters using application arguments '--semspect.rdf.mode=generate'
REM - Use an external configuration file with the application argument '--spring.config.additional-location="path/to/config.yaml"' (.yaml or .properties, cf. example)
REM - Define parameters using JVM arguments '"-Dsemspect.rdf.mode=generate"'' (Note: each parameter has to be enclosed by double quotes!)
"%JAVA_PATH%" %JDK_OPTIONS% -cp %CLASS_PATH% %MAIN_CLASS% %*