@echo off
rem *** Batch file, called from wrun.bat, 
rem *** that starts the Browser running under 
rem *** secure Jini ERI/jsse

set JDK_HOME=%1
set JINI_HOME=%2
set EXAMPLE_HOME=%3
set HOSTNAME=%4
set CODEBASE_PORT=%5
set DEBUG_ON=%6
set MESSAGE_DIGEST=%7

if on==%DEBUG_ON% set DEBUG=access,failure

set START_SERVICE=%JDK_HOME%\bin\java ^
-Djava.security.manager= ^
-Djava.security.policy=%EXAMPLE_HOME%\example\browser\jsse\policy\browser.policy ^
-Djava.rmi.server.codebase=httpmd://%HOSTNAME%:%CODEBASE_PORT%/browser-dl.jar\;sha=%MESSAGE_DIGEST% ^
-Djava.security.auth.login.config=%EXAMPLE_HOME%\example\common\jsse\login\client.login ^
-Djavax.net.ssl.trustStore=%EXAMPLE_HOME%\example\common\jsse\truststore\jini-ca.truststore ^
-Djava.protocol.handler.pkgs=net.jini.url ^
-Djava.security.properties=%EXAMPLE_HOME%\example\common\jsse\props\dynamic-policy.properties ^
-Djava.util.logging.config.file=%EXAMPLE_HOME%\example\common\logging\jini.logging ^
-Dconfig=%EXAMPLE_HOME%\example\browser\jsse\config\browser.config ^
-DserverHost=%HOSTNAME% ^
-DjiniDir=%JINI_HOME% ^
-DinstallDir=%EXAMPLE_HOME% ^
-Djava.security.debug=%DEBUG% ^
-jar %JINI_HOME%\lib\browser.jar ^
%EXAMPLE_HOME%\example\browser\jsse\config\browser.config

echo.
echo %START_SERVICE%
echo.

start %START_SERVICE%
