1 |
On Thu, Feb 23, 2012 at 09:26:56PM +0100, Penguin Lover András Csányi squawked: |
2 |
> On 23 February 2012 21:13, Willie WY Wong <wongwwy@××××××××××.org> wrote: |
3 |
> > Hi list, |
4 |
> > |
5 |
> > Is there a way to set the Java VM based on program? |
6 |
> > |
7 |
> > For the most part I would like to keep icedtea-bin-7 as my system VM, |
8 |
> > but there is one program (jabref-2.6) which doesn't run well with |
9 |
> > java-7, but works fine with icedtea-bin-6. |
10 |
> > |
11 |
> > Is there a "Gentoo" way of setting this? |
12 |
> |
13 |
> I don't think there would be a way to achieve this. I think, there is |
14 |
> a way to set the java vm for your application when you start it. You |
15 |
> can create an alias to handle easier the program starting, for |
16 |
> example. |
17 |
> |
18 |
|
19 |
I just realised that /usr/bin/jabref is a bash script, which says |
20 |
|
21 |
--------------- |
22 |
gjl_package=jabref |
23 |
gjl_main="net.sf.jabref.JabRef" |
24 |
source /usr/share/java-config-2/launcher/launcher.bash |
25 |
--------------- |
26 |
|
27 |
and launcher.bash contains the lines |
28 |
|
29 |
---snip------- |
30 |
# Source package env |
31 |
# --------------------- |
32 |
gjl_user_env="${HOME}/.gentoo/java-config-2/launcher.d/${gjl_package}" |
33 |
gjl_system_env="/etc/java-config-2/launcher.d/${gjl_package}" |
34 |
if [[ -f "${gjl_user_env}" ]]; then |
35 |
source "${gjl_user_env}" |
36 |
elif [[ -f "${gjl_system_env}" ]]; then |
37 |
source "${gjl_system_env}" |
38 |
fi |
39 |
---end snip--- |
40 |
|
41 |
which makes me suspect that there is a way to give per-package |
42 |
specifications. Is there documented anywhere? |
43 |
|
44 |
Cheers, |
45 |
W |
46 |
-- |
47 |
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire |
48 |
et vice versa ~~~ I. Newton |