Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making jsvc work on OSX

Tags:

java

macos

jsvc

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.

like image 905
Hannibal Avatar asked Dec 09 '25 00:12

Hannibal


1 Answers

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.

like image 118
nullPainter Avatar answered Dec 11 '25 15:12

nullPainter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!