@REM THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
@REM 5724-J34 (C) COPYRIGHT International Business Machines Corp., 2007
@REM All Rights Reserved * Licensed Materials - Property of IBM
@REM US Government Users Restricted Rights - Use, duplication or disclosure
@REM restricted by GSA ADP Schedule Contract with IBM Corp.

@echo off
REM Usage: WSGrid <job properties file>
setlocal

call "%~dp0/../bin/setupCmdLine.bat" %*

@REM CONSOLE_ENCODING controls the output encoding used for stdout/stderr
@REM    console - encoding is correct for a console window
@REM    file    - encoding is the default file encoding for the system
@REM    <other> - the specified encoding is used.  e.g. Cp1252, Cp850, SJIS
@REM SET CONSOLE_ENCODING=-Dws.output.encoding=console

:loop
if '%1'=='-JVMOptions' goto javaoption
if '%1'=='' goto runcmd
goto again

:javaoption
shift 
set javaoption=%1
goto runcmd

:again
shift
goto loop


:runcmd
set PATH=%WAS_HOME%\bin;%PATH%
set JMS_PATH=%WAS_HOME%\lib\WMQ\java\lib\com.ibm.mq.jar;%WAS_HOME%\lib\WMQ\java\lib\com.ibm.mqjms.jar;%WAS_HOME%\lib\WMQ\java\lib\dhbcore.jar


@if defined DEFAULTSERVERNAME (set WAS_DEFAULTSERVERNAME=-Dcom.ibm.CORBA.BootstrapHost=%DEFAULTSERVERNAME%) else (set set WAS_DEFAULTSERVERNAME=)
@if defined SERVERPORTNUMBER (set WAS_SERVERPORTNUMBER=-Dcom.ibm.CORBA.BootstrapPort=%SERVERPORTNUMBER%) else (set set WAS_SERVERPORTNUMBER=)

"%JAVA_HOME%\bin\java" %javaoption% "%CLIENTSSL%" %CONSOLE_ENCODING% -Dcom.ibm.ws.container=standalone -Dwas.install.root="%WAS_HOME%" -Dws.ext.dirs="%WAS_EXT_DIRS%" %WAS_DEFAULTSERVERNAME% %WAS_SERVERPORTNUMBER% %USER_INSTALL_PROP% -classpath "%WAS_CLASSPATH%;%JMS_PATH%" "com.ibm.ws.bootstrap.WSLauncher" "com.ibm.ws.grid.comm.WSGrid" %*

endlocal

