I have LaunchAgent plist file that contains the following Program Arguments
<key>ProgramArguments</key>
<array>
<string>/Applications/UniFi.app/Contents/PlugIns/jre1.8.0_121.jre/Contents/Home/jre/bin/java</string>
<string>-Djava.awt.headless=true</string>
<string>-Xmx1024M</string>
<string>-jar</string>
<string>/Applications/UniFi.app/Contents/Resources/lib/ace.jar</string>
<string>start</string>
</array>
The initial path to the embedded java distribution (int this case version jre1.8.0_121.jre) changes when the people from Ubiquiti update their application, but the installed that they provide does not include the LaunchAgent modification, so I have to do it by hand every time.
I tried to put something like
<string>/Applications/UniFi.app/Contents/PlugIns/jre*.jre/Contents/Home/jre/bin/java</string>
… but as I have read here there is no substitution inside the plist file.
Any ideas on how to achieve this? This way the plist file can stay the same regardless the updated version of the embedded distribution.
Thank you you all