I have created a jar file in java, and I want to make the application automatically start during system boot up. I found I have to write a shell script for that. What should be that shell script look like? Is there anything else I have to do to make an application automatically start at boot up?
The preferred way to launch programs at OS X startup is to create a launchd
daemon as explained here.
In mac os x you can also just run "open program.jar" (or any folder, '-a' for native applications) and it will open detached from the terminal with any default environment settings that it would use if you just double clicked it.
You can also add a program (or the script) to the user's login items through System Preferences > Accounts > 'username' > Login items. This is completely point and click and doesn't require a shell script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With