echo %3 @echo off chdir %3 setlocal set host=10.10.10.74 set port=%3% set TAMS_SYNCH_DISABLE=Y set jndiport=1099 if not defined host (goto hostmissing) if not defined port (set port=8080) set SILVERSTREAM_HOME=.\SilverJRunner_OpenJRE set TAMS_CLIENT_HOME=.\tams_Java8 set SILVER_HOME=%SILVERSTREAM_HOME% set THE_JRE_HOME=%SILVERSTREAM_HOME%\jre set path=%path%;%SILVERSTREAM_HOME%\bin REM Code change for TAMSIIS-1497 starts set cacertpath=%THE_JRE_HOME%\lib\security\cacerts set keytoolpath=%THE_JRE_HOME%\bin\keytool REM To download the public certificate from Server bitsadmin /transfer certtransfer /download /priority normal http://%host%:18080/tomcatcert.cer %USERPROFILE%\tomcatcert.cer REM Get the SHA1 key %keytoolpath% -printcert -file %USERPROFILE%\tomcatcert.cer|findstr /c:"SHA1:">%USERPROFILE%\SHA.txt REM Remove the unwanted part from SHA1 key set /p SHA=<%USERPROFILE%\SHA.txt set shakey=%SHA:~8% REM check if the Server SHA1 key is present in jdk %keytoolpath% -list -keystore %cacertpath% -storepass changeit|findstr %shakey% >%USERPROFILE%\key.txt set keyfile=%USERPROFILE%\key.txt REM Import the Certificate if the key is not present for /f %%i in ("%keyfile%") do set size=%%~zi if 0%size% equ 0 ( %keytoolpath% -delete -storepass changeit -alias %host% -keystore %cacertpath% %keytoolpath% -importcert -noprompt -storepass changeit -trustcacerts -alias %host% -file %USERPROFILE%\tomcatcert.cer -keystore %cacertpath% ) else ( echo certificate is present in JVM ) REM Delete the temporary files del /f %USERPROFILE%\tomcatcert.cer del /f %USERPROFILE%\SHA.txt del /f %USERPROFILE%\key.txt REM Code change for TAMSIIS-1497 ends REM Code change for TNSS-3625 starts set cacertpath=%THE_JRE_HOME%\lib\security\cacerts set keytoolpath=%THE_JRE_HOME%\bin\keytool REM To download the public certificate from Server bitsadmin /transfer certtransfer /download /priority normal http://%host%:18080/esbCert.cer %USERPROFILE%\esbCert.cer REM Get the SHA1 key %keytoolpath% -printcert -file %USERPROFILE%\esbCert.cer|findstr /c:"SHA1:">%USERPROFILE%\SHA.txt REM Remove the unwanted part from SHA1 key set /p SHA=<%USERPROFILE%\SHA.txt set shakey=%SHA:~8% REM check if the Server SHA1 key is present in jdk %keytoolpath% -list -keystore %cacertpath% -storepass changeit|findstr %shakey% >%USERPROFILE%\key.txt set keyfile=%USERPROFILE%\key.txt REM Import the Certificate if the key is not present for /f %%i in ("%keyfile%") do set size=%%~zi if 0%size% equ 0 ( %keytoolpath% -delete -storepass changeit -alias %host%_esbCert -keystore %cacertpath% %keytoolpath% -importcert -noprompt -storepass changeit -trustcacerts -alias %host%_esbCert -file %USERPROFILE%\esbCert.cer -keystore %cacertpath% echo ESB certificate added to keystore ) else ( echo certificate is present in JVM ) REM Delete the temporary files del /f %USERPROFILE%\esbCert.cer del /f %USERPROFILE%\SHA.txt del /f %USERPROFILE%\key.txt REM Code change for TNSS-3625 ends set SYSClasspath=%SILVER_HOME%\lib\SilverJRunner.zip;%SILVER_HOME%\lib\OtherSilverApplication.zip;%SILVER_HOME%\lib\ejb.jar set TIIObjClasspath=%TAMS_CLIENT_HOME%\jars\BackofficeCommon.jar;%TAMS_CLIENT_HOME%\jars\BusinessServiceClient.jar;%TAMS_CLIENT_HOME%\jars\ClientBackoffice.jar;%TAMS_CLIENT_HOME%\jars\ClientCommon.jar;%TAMS_CLIENT_HOME%\jars\POSPricingClient.jar;%TAMS_CLIENT_HOME%\jars\POSPricingCommon.jar;%TAMS_CLIENT_HOME%\common\jars\Common.jar;%TAMS_CLIENT_HOME%\jars\EJB-Common.jar;%TAMS_CLIENT_HOME%\jars\GPC_FRAME.jar;%TAMS_CLIENT_HOME%\common\jars\GPC_TAMS.jar;%TAMS_CLIENT_HOME%\jars\PointOfSale.jar;%TAMS_CLIENT_HOME%\server\jars\Server.jar;%TAMS_CLIENT_HOME%\common\jars\TAMS_Config.jar;%TAMS_CLIENT_HOME%\common\jars\TAMS_DAO.jar;%TAMS_CLIENT_HOME%\common\jars\TAMS_Localize.jar;%TAMS_CLIENT_HOME%\jars\TAMS_Media.jar;%TAMS_CLIENT_HOME%\common\jars\TAMS_ValueObjects.jar;%TAMS_CLIENT_HOME%\common\jars\POSPricingLocalize.jar;%TAMS_CLIENT_HOME%\common\jars\POSPricingConfig.jar rem maybe set forms as extdir? set TIIFormsClasspath=%TAMS_CLIENT_HOME%\forms\TAMS_Forms.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_CM.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_CO.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_DI.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_ETM.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_IM.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_OR.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_RGN.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_RMS.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_SA.jar;%TAMS_CLIENT_HOME%\forms\TAMS_Forms_SM.jar set TIIEJBClasspath=%TAMS_CLIENT_HOME%\ejb\GPC_ACLRemote.jar;%TAMS_CLIENT_HOME%\ejb\POS_EJB_CustomerRemote.jar;%TAMS_CLIENT_HOME%\ejb\POS_EJB_EmployeeRemote.jar;%TAMS_CLIENT_HOME%\ejb\POS_EJB_InventoryRemote.jar;%TAMS_CLIENT_HOME%\ejb\POS_EJB_InvoiceRemote.jar;%TAMS_CLIENT_HOME%\ejb\POS_EJB_RefTablesRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_ApplicationMessageRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_CustomerStatementRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_ETMRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_InterstoreCommunicationsRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_HardwareRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_MessageRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_OrderingRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_PaymentRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_PriceRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_ProfileRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_RMSRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_RefRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_ServicesRemote.jar;%TAMS_CLIENT_HOME%\ejb\TAMS_EJB_SystemRemote.jar set ASPECTJAR=%TAMS_CLIENT_HOME%\common\lib\aspectjrt.jar; set TIIJasperClasspath=%TAMS_CLIENT_HOME%\common\lib\jasperreports-1.2.8.jar;%TAMS_CLIENT_HOME%\common\lib\commons-digester-1.7.jar;%TAMS_CLIENT_HOME%\common\lib\commons-collections-3.2.2.jar;%TAMS_CLIENT_HOME%\common\lib\itext-1.01.jar;common\lib\poi-2.0.jar rem echo seven rem echo on rem echo %TIIReleaseClasspath% rem echo %SYSClasspath% rem echo %TIIObjClasspath% rem echo %TIIEJBClasspath% rem echo %TIIFormsClasspath% rem echo %ASPECTJAR% set classpath=.\log4j.properties;%TIIReleaseClasspath%;%SYSClasspath%;%TIIObjClasspath%;%TIIEJBClasspath%;%TIIFormsClasspath%;%ASPECTJAR%;%TIIJasperClasspath% echo Starting TAMSII %THE_JRE_HOME%\bin\java -version %THE_JRE_HOME%\bin\java -Ds4=true -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -Dsun.java2d.noddraw=true -Djava.naming.provider.url=jnp://%host%:%jndiport% -Ddevelopment=false -Djava.ext.dirs=%SILVER_HOME%\jre\lib\ext;%TAMS_CLIENT_HOME%\lib;%TAMS_CLIENT_HOME%\common\lib -Dsssw.home=%SILVER_HOME% -Dsssw.jre.home=%THE_JRE_HOME% -DTAMS_SYNCH_DISABLE=%TAMS_SYNCH_DISABLE% -Xms1024m -Xmx2048m com.gpc.client.backoffice.TAMSIIMain %host%:%port% TAMSII FrmTAMS_Start goto end :hostmissing echo Host is required. goto end :end