Install CLA2 as Windows Service

CLA2 Installation on a remote server – as a windows service
Copy the following files on a remote server:
- copy the file JavaService.exe (you can find it in folder /SI_install_dir/install/client/msmq/installJavaService)
- copy the file CLA2Client.jar (you can find it in folder /SI_install_dir/install/client/cmdline2
- write the script InstallCLA2.cmd so it fits your installation :
_______________________________________________________________
REM *** INSTALLS A CLA2 Client as Windows Service ***
REM *** CHANGE TO MATCH YOUR INSTALL ***
set ListenPort=13052
set ClientJar=C:\CLA2\CLA2Client.jar
set JVM="C:\Program Files\Java\jre1.5.0\bin\client\jvm.dll"
set StdOut="C:\CLA2\serviceOutput.txt"
set ErrorOut="C:\CLA2\serviceError.txt"
REM *** DO NOT HAVE TO CHANGE ***
set ServiceName=SI_CLA2Adapter_%ListenPort%
set StartClass=com.sterlingcommerce.woodstock.services.cmdline2.CmdLine2RemoteImpl
REM *** CHANGE TO MATCH YOUR INSTALL ***
C:\CLA2\JavaService -install "%ServiceName%" %JVM% -Djava.class.path=%ClientJar% -start %StartClass% -params %ListenPort% -out %StdOut% -err %ErrorOut%
_______________________________________________________________
Java version on a remote system must be the same as one used by IBM Sterling Integrator.
- run the script
- after installation go to Start → Run → regedit
- find HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SI_CLA2Adapter_16052* (*the name of the service)
- choose Parametars → JVM Option Number 0 and write the right path for CLA2Client.jar file.
This part is only for CLA2 used in PGP encryption
- Start → Control Panel → Administrative Tools → Services
- Choose CLA2 service and click on Properties → Log On. Click This account and set the user which generated keys.
*** OR ***
nssm install "Command Line Adapter" "c:\Program Files\Java\jre6\bin\java.exe" "-jar c:\cla2\CLA2Client.jar 12699"