Reputation: 127
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
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