How to create a Windows Service for an EPAgent Process?

Document ID : KB000030390
Last Modified Date : 14/02/2018
Show Technical Document Details

 

Description:

To Configure EPAgent to run as Windows Service.

Solution: 

There is no explicitly supported method for running the EPAgent as a service on Windows, but there are a few ways to accomplish this: 

 

Some of the third-party tools to do this are listed below: 

http://www.coretechnologies.com/products/AlwaysUp/Apps/RunJavaApplicationAsAService.html 

http://www.devx.com/Java/Article/34438 

 

Or, there are free alternatives, like below: 

http://wrapper.tanukisoftware.com/doc/english/qna-service.html 

 

http://stackoverflow.com/questions/68113/how-to-create-a-windows-service-from-java-app 

 

Below are the instructions that have helped other customers to enable EPAgent to run as a service: 

-------------------- 

1. Download a Java Wrapper from http://wrapper.tanukisoftware.org 

 

2. Extract wrapper_win32_3.1.2.zip to c:\ (C:\wrapper_win32_3.1.2 folder will be created automatically). 

 

3. Copy the following files to <ISCOPE_folder> 

 

C:\wrapper_win32_3.1.2\bin\wrapper.exe 

C:\wrapper_win32_3.1.2\bin\InstallTestWrapper-NT.bat 

C:\wrapper_win32_3.1.2\bin\UninstallTestWrapper-NT.bat 

 

4. Copy the following files to <ISCOPE_folder>\lib 

 

C:\wrapper_win32_3.1.2\lib\wrapper.jar 

C:\wrapper_win32_3.1.2\lib\wrappertest.jar 

 

5. Copy C:\wrapper_win32_3.1.2\conf\wrapper.conf to <ISCOPE_folder>\config 

 

6. Update the following parameters in <ISCOPE_folder>\config\wrapper.conf 

 

# Java Classpath (include wrapper.jar) Add class path elements as 

# needed starting from 1 

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp 

# Java Classpath (include wrapper.jar) Add class path elements as 

# needed starting from 1 

wrapper.java.classpath.1=lib\wrapper.jar 

wrapper.java.classpath.2=lib\EPAgent.jar 

# Java Library Path (location of Wrapper.DLL or libwrapper.so) 

wrapper.java.library.path.1=lib 

# Application parameters. Add parameters as needed starting from 1 

wrapper.app.parameter.1=com.wily.introscope.api.IntroscopeEPAgent 

# Title to use when running as a console 

wrapper.console.title=EPAgent Wrapper Application 

# Name of the service 

wrapper.ntservice.name=EPAgent 

# Display name of the service 

wrapper.ntservice.displayname=EPAgent Wrapper Application 

# Description of the service 

wrapper.ntservice.description=TEPAgent Wrapper Application Description 

 

7. Update the _WRAPPER_CONF environment variable in the following files: 

 

<ISCOPE_folder>\InstallTestWrapper-NT.bat 

<ISCOPE_folder>\UninstallTestWrapper-NT.bat 

set _WRAPPER_CONF="%_REALPATH%\..\conf\wrapper.conf" 

 

to 

 

set _WRAPPER_CONF="%_REALPATH%\config\wrapper.conf" 

 

8. Run <ISCOPE_folder>\InstallTestWrapper-NT.bat 

 

9. Open Start>Control Panel>Administrative Tools>Services, (the new service  "EPAgent Wrapper Application" will be displayed). 

 

10. Start new EPAgent Wrapper Application service.