@echo off

rem set CB=%BATCH_HOME%\framework\classes\
set CB=%BATCH_HOME%\lib\fwBatch.jar
set CODEBASE=file://%CB%
set POLICY=%BATCH_HOME%\bin\.java.policy
set CP=%BATCH_HOME%\lib\log4j-core-2.8.2.jar

cd /d %BATCH_HOME%

start %JAVA_HOME%\bin\java -cp %CP% org.apache.logging.log4j.core.net.SocketServer 20001 %BATCH_HOME%\classes\log4j2Server.xml

start %JAVA_HOME%\bin\rmiregistry -J-Djava.rmi.server.codebase=%CODEBASE% 20000

set PATH=%BATCH_HOME%\bin;%PATH%

set CP=%BATCH_HOME%\classes;%CP%;%CB%;%BATCH_HOME%\lib\postgresql-42.0.0.jar;%BATCH_HOME%\lib\fwBase.jar

start %JAVA_HOME%\bin\java -cp %CP% -Djava.rmi.server.codebase=%CODEBASE% -Djava.security.policy=%POLICY% -Dlog4j.configuration=file:%BATCH_HOME%/classes/log4j2JM.xml batch.controller.JobManagerImpl

set CB=
set CP=
set CODEBASE=
set POLICY=
