Questions tagged [jsvc]

Jsvc is a set of libraries and applications for making Java applications run on UNIX more easily.

Jsvc is a set of libraries and applications for making Java applications run on UNIX more easily.

http://commons.apache.org/proper/commons-daemon/jsvc.html

65 questions
36
votes
3 answers

How to convert a java program to daemon with jsvc?

I wrote a program and now I am expected to convert it to a daemon. Since I am a noob and dont know anything about it, can you please tell me how can I do it or can you please give me basic tutorials or readings about it ? I really want to learn how…
Ozer
  • 1,245
  • 4
  • 20
  • 27
33
votes
3 answers

What benefit do I get from JSVC over just using systemd?

The Tomcat documentation describes the process of compiling and installing JSVC which can be used to run Tomcat as a daemon. As per my understanding, JSVC has two benefits: It launches as root allowing for the use of a privileged port (like 80 or…
user636044
16
votes
3 answers

Access resources from another jar file

I have a simple structure: A data jar file which contains a batch of data, and a service jar file, which runs a service using the data. To make the data easy to replace, I have them separate, and service.jar's classpath contains the directory which…
Dave
  • 44,275
  • 12
  • 65
  • 105
10
votes
1 answer

Apache jsvc fails to stop daemon

I am using a native compiled jsvc to launch a java daemon. I am running this on an openSUSE 32 bit vm. The code implements Apache's daemon interface, and I'm executing the deamon with the following command. ./jsvc -home jre -errfile logs/jsvc.err…
Noah
  • 1,966
  • 1
  • 14
  • 29
8
votes
1 answer

How can I setup the nested class loading when launched by apache commons daemon jsvc?

I want to use jsvc to start my spring boot application because it's on the target system already and the alternative is to spend time debugging shell scripts for edge cases. I've implemented the Daemon interface so that SpringApplication.run() is…
7
votes
2 answers

How can I get Jsvc to find the DaemonLoader?

I have the commons-daemon-x.jar in the classpath. The Jsvc is successfully launching the Java VM. But jsvc is reporting that it cannot find the daemon loader class even though it is in the classpath. Does anyone know how to solve this problem? I’m…
johnnieb
  • 3,982
  • 4
  • 29
  • 32
7
votes
4 answers

Cannot locate Java home

I'm writing an application that leverages jsvc to start up a Java service as a daemon. I need to use something like jsvc because my application utilizes ports under 1024 and yet I'd really like to not run it as root so that created files are owned…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
6
votes
2 answers

jscv : Cannot locate JVM library file

When I try to start a demo jsvc implementation I get the following error output of jsvc: jsvc -cp ApacheDeamonDemo.jar -pidfile /mypath/pid.txt -outfile /mypath/log.txt -errfile /mypath/err.log net.example.deamon.DemoDeamon I get the following…
toom
  • 12,864
  • 27
  • 89
  • 128
6
votes
2 answers

jsvc 1.0.15 installation on CentOS 6.x

After some google search, it seems that I can only install apache jsvc jsvc-1.0.1-8.9.el6 on CentOS 6.x. It's the latest version for CentOS. See…
Junius
  • 331
  • 2
  • 10
5
votes
1 answer

How to register(install) as service java application with JSVC wrapper on MacOS X

I have an application which i want to run as service on MacOS X. I used JSVC as wrapper and currently it starts in console just fine, shutdown process is correct, etc. So now i have to register it as service. Found some manuals, wrote .plist file.…
Aleksandr Kravets
  • 5,750
  • 7
  • 53
  • 72
5
votes
1 answer

MacOS and JSVC: SCARD_E_NO_SERVICE: The Smart card resource manager is not running

I got a JAR file that needs to run as a daemon in MacOS Sierra and I decided to use Apache Commons Daemon and JSVC for that purpose. I am aware that maybe JSVC is not really needed for this purpose (it seems only allows to open ports in a low range)…
Miguel Febres
  • 2,153
  • 2
  • 21
  • 31
5
votes
1 answer

Using multiple jars in the jsvc classpath

I am trying to get a Java application to run as a Linux service using jsvc. I found How to convert a java program to daemon with jsvc? which was able to get me most of the way, but I am still struggling to get the classpath figured out. I am getting…
5
votes
1 answer

Daemonizing java application with JSVC

I'm trying to daemonize my application using Apache Commons Daemon using the Daemon interface. Java application it self isn't doing anything just writes to stout. I compiled jsvc: http://people.apache.org/~mturk/daemon-1.0.10/ (even tried newest…
user987220
  • 207
  • 1
  • 2
  • 10
4
votes
3 answers

How to start Java program as a daemon using Jsvc

I am using Jsvc to start a java program that implements the Daemon interface. However when I issue the command /usr/bin/jsvc -user walikha -home $JAVE_HOME -outfile out.file -errfile '$1' Jooist.Server.jar Main However the command silently…
Waliaula Makokha
  • 815
  • 1
  • 11
  • 21
4
votes
0 answers

How to do things as root with jsvc?

I'm trying to use jsvc to make a daemon process, and it sounds like certain things can be done as root with it (for example, Tomcat can apparently bind to privileged ports). What I'm wondering is how to do that. In my simple Daemon program, I try to…
Brendan Long
  • 53,280
  • 21
  • 146
  • 188
1
2 3 4 5