我有以下启动配置(存储在 中acme.plist
),我分别加载并开始使用launchctl load acme.plist
和launchctl start acme.plist
。
<?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.acme</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-jar /usr/local/acme/acme-latest.jar</string>
</array>
<key>StandardErrorPath</key>
<string>/tmp/acme-error</string>
</dict>
</plist>
每当我尝试运行它时,我都会得到以下信息/tmp/acme-error
:
Unrecognized option: -jar /usr/local/acme/acme-latest.jar
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
然而,从 bash 运行时我绝对没有问题。有任何想法吗?