I am trying to run a command
java -jar ccu-historian.jar
as launch item
When I run the command on the commandline everything is working
When I try to run it as launchAgent via
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.bob.ccuhistorian</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-jar</string>
<string>/Users/user/Applications/ccuhistorian/ccu-historian.jar</string>
</array>
</dict>
</plist>
I get the error message that it cannot run
13.11.11 15:15:34 com.bob[1445] 15:15:34|SEVERE |Exception: Can't access configuration file ccu-historian.config
the file is in the same folder and I tried changing via chmod 777 – no change, and it can be read when calling from the command line – what am I doing wrong?
I found a working solution:
writing a bash-script
and calling
as only parameter to the XML is working, but shouldn’t be there a more elegant solution?