Package guidelines for apps requiring a specific Java version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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
situation.

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?

Thanks,
Max


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux