I'm trying to reproduce the code written in this post:
How to convert a java program to daemon with jsvc?
Without the fancy bash script.
I created the jar. This is the command I'm running:
jsvc -verbose -outfile tmp/example.out -cp /pathto/commons-daemon-1.0.13/commons-daemon-1.0.13.jar:/pathto/MyProject.jar my.package.MyClass
Now... This does absolutely nothing. No output whatsoever. I even tried it with the script. No output again. And since jsvc doesn't throw any kind of error at all I have no clue what the problem is.
I even tried running it with -server
or with sudo
. Then I can see it appearing under processes but it still does nothing. Also verbose doesn't do anything and JAVA_HOME
is properly configured.
Any clues / ideas? Did anybody make this work under OSX at all ever?
EDIT:
Logging is system out which according to that post and the manual of jscv should be captured in outfile.
Yes I did try setting an error file. Again no luck there was nothing in it it wasn't even created.
I tried giving it a user. And the code is exactly the same as in the linked issue that's why I didn't clutter this ticket with it.
I compiled my jsvc and have no tomcat installed.
Have you tried running with the -debug
flag? It spits out a fairly amount of useful information about why things may not be running as anticipated.