[arch-general] Package guidelines for apps requiring a specific Java version
silverhammermba at gmail.com
Thu Oct 2 16:41:55 UTC 2014
I'm working on a PKGBUILD for a Java app that must be built and run using
Java 8, but I couldn't find any guidelines on best practices for such a
The easy part is including 'java-environment=8' and 'java-runtime=8' in
makedepends and depends respectively, but how to ensure the right version
is set as default when building and running (rather than spitting out the
opaque Java errors you get when using the wrong version)?
Right now at the start of build() I have
echo "Checking that default Java is version 8..."
java -version 2>&1 | grep 'version "1.8'
Which seems reasonable since building is infrequent. But what about for the
shell script that starts the app? I could put a similar check there, but
that seems like it would be really annoying for people who have multiple
Java versions installed. Could there be a good way of letting my app always
use Java 8, even if some other version is set as the default?
More information about the arch-general