[aur-general] Launch script: distinguish Java version

Simon Legner simon.legner at gmail.com
Thu Jan 31 09:05:41 UTC 2019


Hi,

is there a canonical way to distinguish the active Java version in the
launch script of a Java application?
(a) I could do a switch on the `archlinux-java get` output. However,
this strategy might fail for unconsidered JVMs from AUR.
(b) I could parse the `java -version` output. However, the output is
somewhat complex to parse and its syntax differs between Java versions
and implementations.
(c) Some packages rely on aur/archlinux-java-run.
The Arch Linux Wiki page does not mention any strategy or preferred way. [0]

Rationale: jd-gui needs additional JVM arguments to make it run on Java ⩾9. [1]

Thanks,
simon04

[0] https://wiki.archlinux.org/index.php/Java_package_guidelines
[1] https://github.com/java-decompiler/jd-gui/issues/187#issuecomment-408341767


More information about the aur-general mailing list