anoop c
anoop c

Reputation: 127

Running a JAR file as a background service in MAC OS

I have created a java application and packaged as jar file. My requirement is to run it as a background service in mac and this service should always run once installed( after the machine reboot too) What would be the best way to do this

Upvotes: 1

Views: 1363

Answers (1)

闫伯元
闫伯元

Reputation: 465

Maybe append the command nohup java -cp {your jar and dependencies} > /dev/null 2>&1 & into the starting script ~/.bash_profile or ~/.bashrc.

Upvotes: 2

Related Questions