FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-23-2012, 07:13 PM
Willie WY Wong
 
Default Setting Java VM for just one program

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?

Thanks,

Willie
--
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
et vice versa ~~~ I. Newton
 
Old 02-23-2012, 07:26 PM
András Csányi
 
Default Setting Java VM for just one program

On 23 February 2012 21:13, Willie WY Wong <wongwwy@member.ams.org> 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.

--
- -
--* Csanyi Andras (Sayusi Ando)* -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--* ""Trust in God and keep your gunpowder dry!" - Cromwell
 
Old 02-23-2012, 09:33 PM
Willie WY Wong
 
Default Setting Java VM for just one program

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 <wongwwy@member.ams.org> 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
 

Thread Tools




All times are GMT. The time now is 10:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org