@echo on
SET APP_HOME=%~dp0..\
SET JMX_PORT=12345
SET PATH=%APP_HOME%Jre\bin;%PATH%
SET LOGS_DIR=%APP_HOME%logs
SET CLASSPATH=%APP_HOME%lib\*
SET CUSTOM_ARGUMENTS=-Xmx512m
SET JAVA_ARGUMENTS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%LOGS_DIR% -Dlog_folder=%LOGS_DIR% -Dlogging.config=file:config\log4j2.properties -Dcom.sun.management.jmxremote.port=%JMX_PORT% -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
SET JAVA_CLASS=-jar %APP_HOME%lib\UHFConcentrator.jar
SET APPLICATION_ARGUMENTS=--spring.config.location=%APP_HOME%config/application.properties
START /D %APP_HOME% java.exe %CUSTOM_ARGUMENTS% %JAVA_ARGUMENTS% %JAVA_CLASS% %APPLICATION_ARGUMENTS%
pause