On Thu, Feb 23, 2012 at 09:26:56PM +0100, Penguin Lover András Csányi squawked:
> On 23 February 2012 21:13, Willie WY Wong <[email protected]> wrote:
> > Hi list,
> >
> > Is there a way to set the Java VM based on program?
> >
> > For the most part I would like to keep icedtea-bin-7 as my system VM,
> > but there is one program (jabref-2.6) which doesn't run well with
> > java-7, but works fine with icedtea-bin-6.
> >
> > Is there a "Gentoo" way of setting this?
>
> I don't think there would be a way to achieve this. I think, there is
> a way to set the java vm for your application when you start it. You
> can create an alias to handle easier the program starting, for
> example.
>
I just realised that /usr/bin/jabref is a bash script, which says
---------------
gjl_package=jabref
gjl_main="net.sf.jabref.JabRef"
source /usr/share/java-config-2/launcher/launcher.bash
---------------
and launcher.bash contains the lines
---snip-------
# Source package env
# ---------------------
gjl_user_env="${HOME}/.gentoo/java-config-2/launcher.d/${gjl_package}"
gjl_system_env="/etc/java-config-2/launcher.d/${gjl_package}"
if [[ -f "${gjl_user_env}" ]]; then
source "${gjl_user_env}"
elif [[ -f "${gjl_system_env}" ]]; then
source "${gjl_system_env}"
fi
---end snip---
which makes me suspect that there is a way to give per-package
specifications. Is there documented anywhere?
Cheers,
W
--
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
et vice versa ~~~ I. Newton