Questions tagged [procrun]

Procrun is a set of applications that allow Windows users to wrap (mostly) Java applications (e.g. Tomcat) as a Windows service.

Procrun is a set of applications that allow Windows users to wrap (mostly) Java applications (e.g. Tomcat) as a Windows service.

The service can be set to automatically start when the machine boots and will continue to run with no user logged onto the machine.

Procrun comprises 2 applications:

  1. Prunmgr is a GUI application for monitoring and configuring procrun services.
  2. Prunsrv is a service application for running applications as services. It can convert any application (not just Java applications) to run as a service.

For more information, visit Apache Commons site here Daemon:Procrun

102 questions
1
vote
1 answer

Tomcat as a service modify service parameter values

I currently have tomcat up as a service on a windows server and I want to update a service parameter via cmd. I'm using the below command to do this: Tomcat9.exe //US//Tomcat9 ++JvmOptions="-DAURA_VERSION=CMD_VERSION" This works fine, but one thing…
WhitneyChia
  • 746
  • 2
  • 11
  • 28
1
vote
1 answer

Apache Common Daemons : PrunServ --StartPath parameter overriding PATH on windows

I am running a java program on windows 10 workstation. I wanted to run my java program as a service so i used apache commons tool prunserv http://commons.apache.org/proper/commons-daemon/procrun.html Issue is my java program runs some windows shell…
SRJ
  • 2,092
  • 3
  • 17
  • 36
1
vote
0 answers

procrun windows service not reading my config file and not producing logs(log4J)

I am trying to run a jar as a windows service using Apache Commons Daemon(procrun). the services don't produce logs and not reading the config file. The jar has started successfully. I am using log4j for logs in my jar and have included the…
1
vote
1 answer

Commons Daemon procrun fails with exit code 5 - "apxServiceControl()" errors

I'm using Apache Commons Procrun (prunsrv.exe, renamed testService.exe) to install a .jar as a windows service. It installs the service successfully, and it appears in the Windows Service Manager. When I try to start the service, it fails. Here's…
1
vote
1 answer

How does a java Windows service "know" it has finished initializing?

TL;DR: I have a Windows service written in Java, jarred, and installed with Procrun. I am starting it with W32Service.startService(). When does the service tell Windows it has started? I'm working with windows services written in Java. I've been…
Lord Farquaad
  • 712
  • 1
  • 12
  • 33
1
vote
1 answer

Procrun logs "missing Service ImageFile" (error code 1)

I try to install a JAR file as a windows service using Apache Commons Procrun. The service gets installed, but executing it gives me the following error: [2018-02-26 14:00:26] [info] [38792] Starting service... [2018-02-26 14:00:26] [error] [38792]…
1
vote
0 answers

How to use static methods for service control with Procrun

I am writing an SFTP service using Apache SSHD. The server will be installed on Windows using Apache commons daemon procrun. I'd like to handle service start/stop using static methods start() and stop() similar to how Tomcat does it. However I don't…
Ben Foltz
  • 48
  • 6
1
vote
1 answer

prunsrv service with external properties file

I have a java .jar file I created using NetBeans. I am using apaches procrun (prunsrv.exe) to install that .jar as a Windows Service. I modified the code to get a property from a config.properties file. I added the config.properties file to the…
1
vote
1 answer

Can't set User to run the service

I'm using prunsrv to run a jar file as a windows service. I need to change the user that runs the service from LocalSystem to a machine user and i can't seem to make it work. This is the bash script i have to create the service: %PRUNSRV%…
djointster
  • 346
  • 3
  • 12
1
vote
2 answers

Fail to start windows service created using Procrun in powerShell

I created a java application(.jar) as a windows service using Procrun. This Service get installed and runs successfully when I use a batch(.bat) file. but I have this requirement of creating the same service using windows powerShell. When I use…
diyath.nelaka
  • 193
  • 14
1
vote
2 answers

Apache prunsrv: error parsing command line

I'm trying to start a Java program as a Windows Service. Googling I've found a install.bat to install and start my service. As I found on the Internet, I've renamed prunsrv.exe to…
Nilo Paim
  • 428
  • 6
  • 22
1
vote
1 answer

Procrun cannot find the Registry key for service

I'm trying to get my program to be a service so I found procrun from http://commons.apache.org/proper/commons-daemon/procrun.html but I made a installService.bat and keep recieving the same error message when I try to run ./prunsrv.exe…
tstraley
  • 31
  • 1
  • 3
1
vote
0 answers

Procrun on Windows 2012 Server with too long classpath-parameter defect report

I have a problem with procrun on Windows 2012 Server. The classpath is too long(about 12k signs). Procrun give a defect report: "The selected data area is too small". So is there a posibility to change the length of the classpath? Or what should i…
M. Rengnal
  • 11
  • 2
1
vote
1 answer

how to delete izpack installer window services via control panel

I am working with java window service i am using Apache Procrun for creating service and izpack for java installer and launch4j for convert jar into exe. I know in izpack have an option to add installer to control panel by adding COIOSHelper.dll"…
venkat
  • 69
  • 2
  • 9
1
vote
1 answer

Stop method not getting called when terminating the windows service

I have converted a java application into a windows Service using procrun. When I stop the service using Windows Services program it gets hung and doesn't respond. When launch it using the debug mode and then when I terminate it using ctrl+c, I can't…
AnOldSoul
  • 4,017
  • 12
  • 57
  • 118