Codename K
Codename K

Reputation: 744

MAC OS - Terminal command to set JAR program to run at startup?

This is where MAC OS stores its start-up items,

/Library/LaunchAgents

How to set a JAR program from Terminal to run at startup? Also how to remove existing program from startup?

I need to use either Terminal or any other script code to add JAR program to load at startup.

Upvotes: 0

Views: 1076

Answers (1)

Edd
Edd

Reputation: 1370

  • Write a bash script that runs your JAR.

    #!/bin/bash

    java -jar /path/to/my/jar

  • Create a .plist entry in /Library/LaunchAgents as shown here

Upvotes: 2

Related Questions