an alternative invocation mechanism for unix-daemon-like java code.
Questions tagged [apache-commons-daemon]
62 questions
2
votes
2 answers
Set Windows service's working directory
I'm using Apache Commons Daemon's procrun to wrap a Java application as a Windows service. The issue I am having is related to the working directory of the service which is C:\Windows\system32. The configuration files needed by the service are…

jzonthemtn
- 3,344
- 1
- 21
- 30
2
votes
2 answers
running Scala with commons-daemon from jsvc
I'm trying to write a basic Scala application that can run as a daemon using commons-daemon. The following code was based on the java program in this post
package daemon
import org.apache.commons.daemon._
import java.util.{ Timer, TimerTask, Date…

awfulHack
- 857
- 1
- 10
- 25
2
votes
3 answers
Windows Service - Apache commons daemon class not found
I have a Jar file that needs to be installed as a windows service. I'm using Apache commons daemon procrun.
Though the service appears in the Services tab in task manager its not running. Its in stopped state and attempting to start it seems not…

helloworld
- 965
- 5
- 14
- 34
2
votes
0 answers
Does Commons-Daemon exist to make your executable JAR a service?
Say I have an executable JAR called myapp.jar. Does Apache Commons-Daemon exist so that I could then write a /etc/init.d/myapp service script (for starting/stopping a myapp service), and then treat myapp like a regular Linux service:
service myapp…

DirtyMikeAndTheBoys
- 1,077
- 3
- 15
- 29
2
votes
4 answers
How do I setup a standalone java application to run as a service using procrun?
I'm trying to setup a standalone java service using commons-daemon (procrun)
Does anyone know where to get procrun and how to get it up and running?
Are there any alternatives? (I would use Java Service Wrapper but I can't use GPL Licensed code)

ScArcher2
- 85,501
- 44
- 121
- 160
2
votes
1 answer
How to use Apache Commons Daemon with Cross-Platform Service?
I have a Java daemon (system service running 24/7/365) that needs to deploy as an executable JAR, however I would like users (on Windows, Linux and Mac alike) to be able to start/stop the application via:
service myapp start
service myapp stop
(Or…
user1768830
1
vote
0 answers
"Failed creating Java" when using Windows Services to start Cassandra
I have had Cassandra 3.11.1 up and running correctly with no Java issues. I've been trying to set it up as a service using Apache Commons Daemon as recommended in the install guide. I was able to install it as a service, but when I attempt to start…

Stu
- 11
- 1
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
2 answers
Java service on Linux - How to ensure constant uptime. Deamon, Shell script or Wrapper?
I have a Java worker that are polling a external queue system for jobs, through web service calls.
What is the most solid way to ensure that the worker is operating at any given time?

dropson
- 1,111
- 2
- 12
- 23
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…

Anand Aron
- 11
- 3
1
vote
1 answer
java.lang.NoClassDefFoundError: ajavaservice/DemoService
I am trying to run a Java program as a Windows service and my log file shows this error. I guess there is an error in providing the path but I am not able to figure it out.
2017-06-27 15:43:21 Commons Daemon procrun stderr initialized
…

Prerna Achtani
- 11
- 2
1
vote
0 answers
Cannot start service created with Apache Daemon on Windows Server - Amazon EC2
I'm facing some trouble while trying to start a windows service that I've created with Apache Daemon on an Amazon EC2 Instance (Windows Server 2012 R2). The error I'm getting is "Windows could not start the service_name on local Computer. For more…

David Krenkel
- 393
- 2
- 25
1
vote
1 answer
Solr Windows Service won't stop
I have Solr set up on my server and running as a service, everything runs beautifully until I come to try and stop the service, it just hangs. I have tried amending the arguments and spent forever trying to see if anyone has got the same problem. …

Gohan950
- 121
- 1
- 9
1
vote
1 answer
Is jsvc supposed to restart a program which stops because of an uncaught exception
I am using commons-daemon-1.0.15 and Ubuntu 14.04.
I followed the tutorial here: http://www.neilson.co.za/creating-a-java-daemon-system-service-for-debian-using-apache-commons-jsvc/
In my program I generate a runtime-exception which is caught by the…

Rene
- 11
- 4